CLI Overview

Command-line tools for Echo PDK

CLI Overview

The Echo PDK CLI (echopdk) provides command-line tools for rendering, validating, evaluating, and managing prompt templates.

Installation

bash
npm install -g @goreal-ai/echo-pdk-cli
# or use locally
npx echopdk --help

Commands

  • echopdk init — Initialize an Echo PDK workspace
  • echopdk new <name> — Scaffold a new prompt project
  • echopdk render <template> — Render a template with variables
  • echopdk validate <template> — Check template syntax
  • echopdk edit <name> — Open a prompt in your editor
  • echopdk run <prompt> — Execute a prompt against an LLM
  • echopdk eval [file] — Run evaluation suites

Render

bash
# Render with inline variables
echopdk render prompts/welcome.pdk -c '{"name": "Alice", "tier": "pro"}'

# Render with a context file
echopdk render prompts/welcome.pdk -f context.json -o output.txt

Validate

bash
echopdk validate prompts/welcome.pdk
echopdk validate prompts/*.pdk --strict

Run

bash
# Send a rendered prompt to an LLM
echopdk run welcome-email -c '{"name": "Alice"}' -m gpt-4o-mini
echopdk run welcome-email --show-rendered

Workspace Config

The echo.workspace.yaml file configures your prompt workspace:

yaml
name: my-prompts
version: "1.0.0"
ai:
  provider: openai
  model: gpt-4o-mini
  apiKey: ${OPENAI_API_KEY}
plp:
  server: https://api.echostash.com
  auth:
    type: token
    token: ${ECHO_PLP_TOKEN}

Environment Variables

  • OPENAI_API_KEY — OpenAI provider authentication
  • ANTHROPIC_API_KEY — Anthropic provider authentication
  • ECHO_API_KEY — Generic provider key (fallback)
  • ECHO_PLP_TOKEN — PLP server authentication