Terminal-native AI coding agent with background jobs, parallel worktrees, forkable sessions, and multi-model support
pip install pcode==0.1.5 Copy PIP instructions
pcode is a terminal-native coding agent that lets you change what's visible in your scrollback, even after the work is done. Expand commands, output, and diffs when you need the details; hide them when you want to read the conversation. The same history, with the detail you choose.
Long-running commands continue in the background and wake the agent when they finish. Run sessions in separate git worktrees, or rewind and branch a conversation to try another approach.
It runs on any model Pydantic AI supports, or on your Claude or ChatGPT subscription.
brew tap cruxwell/pcode https://github.com/cruxwell/pcode.git brew install cruxwell/pcode/pcode Or from PyPI with uv:
uv tool install --python 3.14 'pcode[claude]' brew install --HEAD tracks master instead of the latest release.
pcode -m claude:claude-sonnet-5 # Claude subscription; run /login claude if not signed in pcode -m openai-codex:gpt-5.6-luna # ChatGPT subscription (/login openai-codex) pcode -m anthropic:claude-sonnet-5 # or any provider, with its API key set pcode # reuses the model /model (Ctrl+L) saved; with none, an offline preview pcode -C /path/to/repo "Summarize the open TODOs" git diff | pcode -p --no-save # non-interactive: reply to stdout pcode --continue # resume this directory's newest session pcode --theme-preview # offline sample output and the style gallery The agent edits files and runs shell commands with your permissions and no approval prompt. Read tool permissions before pointing it at anything you care about.
The same pages build into a browsable site with make docs-serve; make docs checks every page and anchor link.
Bugs: open an issue. Security problems: see SECURITY.md. Setup and checks are in CONTRIBUTING.md.
make test # fast suite; real-tmux regressions skipped make test-all # everything, before touching layout, streaming, the editor, or the prompt AGENTS.md has the worktree workflow and the traps worth knowing before editing. Contributor notes (architecture, dependencies, profiling, prompt caching, provider design) live in dev/, outside the published docs.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.




