pi-coding-agent 1.0.0

Interactive coding agent CLI (Rust port of @earendil-works/pi-coding-agent). Streaming REPL, session persistence, AGENTS.md loader, slash commands, per-tool permissions. Install with `cargo install pi-coding-agent`; the binary is `pi`.
pi-coding-agent-1.0.0 is not a library.

pi-coding-agent

Interactive coding agent CLI. Part of the pi agent harness — a Rust port of @earendil-works/pi-coding-agent.

The crate name is pi-coding-agent; the installed binary is pi.

Install

cargo install pi-coding-agent

Usage

export ANTHROPIC_API_KEY=sk-ant-...
# or: OPENAI_API_KEY=..., GOOGLE_API_KEY=..., GEMINI_API_KEY=...

# Interactive REPL
pi

# One-shot prompt
pi -p "List the .rs files in this directory and summarize them"

# JSON-lines event stream for scripting
pi -p "..." --json

# Resume a saved session
pi --resume <id>

# Skip permission prompts (DANGEROUS — bash/write/edit run unconfirmed)
pi --yolo -p "Run the test suite and fix any failures"

# Session management
pi sessions list
pi sessions show <id>
pi sessions delete <id>

Pick the model explicitly:

PI_MODEL=claude-opus-4-7   pi -p "..."
PI_MODEL=gpt-4o            pi -p "..."
PI_MODEL=gemini-2.0-flash  pi -p "..."

Slash commands (interactive)

/help                show command list
/quit  /exit         quit pi
/reset               start a fresh session
/model               print the active model
/tools               list builtin tools
/cost                show accumulated token usage
/sessions            list saved sessions
/resume <id>         load a saved session by id
/session             print current session id

What's included

  • Streaming text — assistant output prints as it arrives.
  • Session persistence under $XDG_CONFIG_HOME/pi/sessions/<id>.json, saved after every turn.
  • AGENTS.md / CLAUDE.md / .pi/instructions.md loader walks up from the current directory and concatenates each file into the system prompt.
  • Per-tool permission promptsbash, write, edit require confirmation by default. --yolo skips all prompts.
  • Built on pi-ai and pi-agent, so any code consuming these crates speaks the same protocol as the CLI.

License

MIT