CLI Overview
edge-pi-cli provides the epi command — an interactive terminal coding agent built on the edge-pi SDK. It supports multiple AI providers, session management, skills, and both interactive and non-interactive modes.
Installation
npm install -g edge-pi-cli
Usage
epi [options] [@files...] [messages...]
Examples
# Interactive mode
epi
# Interactive with initial prompt
epi "List all .ts files in src/"
# Include files in the initial message
epi @prompt.md "Refactor this"
# Non-interactive mode (process and exit)
epi -p "List all .ts files in src/"
# Continue previous session
epi --continue "What did we discuss?"
# Use a specific model
epi --provider anthropic --model claude-sonnet-4-20250514
# Read-only tools (no file modifications)
epi --tools readonly -p "Review the code in src/"
# Pipe input
echo "Explain this error" | epi -p
Options
General
| Flag | Description |
|---|
--help, -h | Show help. |
--version, -v | Show version. |
--verbose | Enable verbose output. |
Model
| Flag | Description |
|---|
--provider <name> | Provider: anthropic, openai, or google. |
--model <id> | Model ID. Auto-detected from provider if omitted. |
--api-key <key> | API key override. Defaults to stored credentials or environment variables. |
Mode
| Flag | Description |
|---|
--print, -p | Non-interactive mode: process the prompt and exit. |
--mode <mode> | Output mode: text (default) or json. |
Session
| Flag | Description |
|---|
--continue, -c | Continue the most recent session. |
--session <path> | Use a specific session file. |
--session-dir <dir> | Custom directory for session storage. |
--no-session | Don't save the session (ephemeral). |
Tools & Thinking
| Flag | Description |
|---|
--tools <set> | Tool set: coding (default), readonly, or all. |
--thinking <level> | Thinking level: off, minimal, low, medium, or high. |
--max-steps <n> | Maximum agent steps per prompt (default: 50). |
System Prompt
| Flag | Description |
|---|
--system-prompt <text> | Override the generated system prompt (mapped to SDK systemPromptOptions.customPrompt). |
--append-system-prompt <text> | Append text to the system prompt. |
Skills
| Flag | Description |
|---|
--skill <path> | Load a skill file or directory (repeatable). |
--no-skills | Disable automatic skill discovery. |
Input Methods
Direct prompt
epi "Explain the main function"
File references
Prefix a file path with @ to include its contents in the initial message:
epi @src/index.ts "Review this file"
epi @prompt.md @context.txt
Piped input
cat error.log | epi -p "Explain this error"
git diff | epi -p "Review these changes"
Environment Variables
| Variable | Description |
|---|
ANTHROPIC_API_KEY | Anthropic Claude API key. |
OPENAI_API_KEY | OpenAI GPT API key. |
GEMINI_API_KEY | Google Gemini API key. |
ANTHROPIC_OAUTH_TOKEN | Anthropic OAuth token (takes precedence over API key). |
PI_CODING_AGENT_DIR | Custom agent config directory (default: ~/.pi/agent). |