Skip to content
Pi logo

Pi cheat sheet

$ pi earendil-works Official docs

Every command, flag and slash command for pi — A minimal, extensible terminal coding agent — four tools by default (read / write / edit / bash), extended via skills + packages. 13+ commands, verified July 2026.

Pi deliberately ships no MCP, sub-agents or plan mode out of the box — everything is added through extensions, skills and "pi packages".

Install
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
curl -fsSL https://pi.dev/install.sh | sh
Start & run
pi                              # interactive TUI
pi "List all .ts files in src/" # interactive with an initial prompt
pi -p "Summarize this codebase" # headless: print and exit
export ANTHROPIC_API_KEY=sk-… ; pi     # or /login for a subscription
pi @code.ts @test.ts "Review these"    # attach files with @

Key flags

FlagWhat it does
-p, --printHeadless: print and exit (also reads piped stdin)
--mode json / --mode rpcJSON event stream / RPC over stdio
--model <pattern>e.g. sonnet:high, openai/gpt-4o
--thinking <level>offmax
-c, --continue / -r, --resumeContinue / browse sessions
--tools <list> / --no-toolsAllowlist / disable tools
-e, --extension <src> / --skill <path>Load an extension / skill
--no-sessionEphemeral (don't save)

In-session commands

CommandWhat it does
/login · /modelAuth · switch models
/resume · /new · /compactSessions · new · compact context
/tree · /fork · /cloneSession tree · fork · duplicate
/export · /copy · /shareExport HTML/JSONL · copy · gist
!cmd · @Run a shell command into the model · fuzzy-find files
Config
~/.pi/agent/settings.json   ·   .pi/settings.json     # global / project
~/.pi/agent/AGENTS.md       # context (also AGENTS.md / CLAUDE.md in cwd + parents)
~/.pi/agent/sessions/       # auto-saved JSONL sessions

export ANTHROPIC_API_KEY=…  # any provider env var, or /login for a subscription
Common one-liners
cat README.md | pi -p "Summarize this text"
pi --tools read,grep,find,ls -p "Review the code for bugs"    # read-only review
pi --model openai/gpt-4o --thinking high "Refactor the auth module"
pi -c "Add error handling to the change we just made"

More CLI cheat sheets

Stop memorizing flags

Run Pi — and every other agent — from one app

TheVibeFather orchestrates Pi alongside every other coding CLI in one native macOS app. Bring the models you already pay for; keep your keys.