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

FlagDescription
--help, -hShow help.
--version, -vShow version.
--verboseEnable verbose output.

Model

FlagDescription
--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

FlagDescription
--print, -pNon-interactive mode: process the prompt and exit.
--mode <mode>Output mode: text (default) or json.

Session

FlagDescription
--continue, -cContinue the most recent session.
--session <path>Use a specific session file.
--session-dir <dir>Custom directory for session storage.
--no-sessionDon't save the session (ephemeral).

Tools & Thinking

FlagDescription
--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

FlagDescription
--system-prompt <text>Override the generated system prompt (mapped to SDK systemPromptOptions.customPrompt).
--append-system-prompt <text>Append text to the system prompt.

Skills

FlagDescription
--skill <path>Load a skill file or directory (repeatable).
--no-skillsDisable 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

VariableDescription
ANTHROPIC_API_KEYAnthropic Claude API key.
OPENAI_API_KEYOpenAI GPT API key.
GEMINI_API_KEYGoogle Gemini API key.
ANTHROPIC_OAUTH_TOKENAnthropic OAuth token (takes precedence over API key).
PI_CODING_AGENT_DIRCustom agent config directory (default: ~/.pi/agent).