Modes

The epi CLI supports two primary modes of operation: interactive mode for ongoing conversations and print mode for one-shot tasks.

Interactive Mode

The default mode. Launches a streaming REPL where you can have a back-and-forth conversation with the agent.

# Start interactive mode
epi

# Start with an initial prompt
epi "Help me refactor the auth module"

Features

Commands

In interactive mode, the following commands are available:

CommandDescription
/helpShow available commands.
/skillsList loaded skills.
/skill:<name>Invoke a skill by name.
/loginLogin to the OAuth provider (Anthropic).
/logoutLogout from the OAuth provider.
/quit, /exitExit the CLI.
Ctrl+CExit the CLI.

Display Format

On startup, interactive mode displays:

During execution, tool calls are shown as [tool_name] with a preview of their arguments, followed by the result.


Print Mode

Non-interactive mode for scripting and automation. Processes the prompt and exits.

# Basic usage
epi -p "List all TypeScript files in src/"

# With file input
epi -p @src/index.ts "Explain this file"

# Piped input
git diff | epi -p "Summarize these changes"

Text Output (default)

By default, print mode outputs only the final text response:

$ epi -p "What is 2 + 2?"
2 + 2 = 4

JSON Output

Use --mode json to get structured output:

$ epi -p --mode json "What is 2 + 2?"
{
  "type": "result",
  "text": "2 + 2 = 4",
  "stepCount": 0,
  "usage": {
    "input": 42,
    "output": 12
  }
}

The JSON output includes:

FieldTypeDescription
typestringAlways "result".
textstringThe agent's text response.
stepCountnumberNumber of tool steps executed.
usageobjectToken usage (input and output counts).

Combining Modes with Options

# Read-only analysis in print mode
epi -p --tools readonly "Review the code in src/"

# Use a specific model in interactive mode
epi --provider openai --model gpt-4o

# Ephemeral session with higher thinking
epi --no-session --thinking high "Design a caching system"

# Custom max steps for complex tasks
epi --max-steps 100 "Refactor the entire auth module"