Skip to content

Pi coding agent cheatsheet

Pi is a small coding-agent harness whose defaults are intentionally inspectable: the installed v1.4.0 binary exposes read, bash, edit, and write, while skills, extensions, prompt templates, and packages add capability. This page separates facts read from pi --help from behavior documented in the official repository.

The verification date is 2026-10-23. Treat project-local settings and extensions as executable input: review them before approving or automating a run.

Command drill

16 verified Pi coding agent commands. Read the task, type the command, press Enter. Every answer is on this page's tables - this drill only asks what the verified data already states.

Answer key - all 16 commands
  1. Print the installed Pi version. pi --version
  2. Start an interactive session in the current directory. pi
  3. Continue the previous session for this project. pi --continue
  4. Choose a session to resume. pi --resume
  5. Run ephemerally without saving the session. pi --no-session
  6. Override where sessions are stored and found. pi --session-dir ./tmp/pi-sessions
  7. Show the active session file, ID, messages, tokens, and cost. /session
  8. Navigate to an earlier point and continue from that branch. /tree
  9. Run the line-oriented JSON RPC interface without persisting a session. pi --mode rpc --no-session
  10. Export a session file to HTML. pi --export session.jsonl output.html
  11. Check whether a provider's credentials are ready; refreshes expired OAuth unless `--no-refresh`. pi auth check --provider openai
  12. Print an API key for an external client. pi auth print-api-key --provider openai
  13. Switch models inside an interactive session. /model
  14. Enable or disable models used by Ctrl+P cycling. /scoped-models
  15. Open the TUI for enabling/disabling package resources. pi config
  16. Edit common interactive settings. /settings