Plandex CLI Cheatsheet - Terminal Planning AI Coding Agent (pdx)
The split between coding agents today is less about model quality than about how changes reach your files. Plandex, invoked as pdx, takes the conservative route: edits accumulate inside a protected plan, you review them, and only then are they applied to the project, with rollback available at every step. What separates it from agents that write straight into the working tree is that a plan is a first-class artifact, created with new, extended with tell, and scoped with load so only chosen files enter context. This table is grouped by installation and auth, planning and loading, execution and iteration, and branching, showing how to append requirements across turns and how to break one large change into independently verifiable batches. Reach for it before a refactor spanning a dozen files, when requirements are still moving but you want the shared understanding written down, or when a migration decision needs to stay auditable. The dividing line is that you no longer write snapshot scripts to guard against a bot rewriting your files.
Install & Auth 4
curl -sL https://plandex.ai/install.sh | bashexport OPENAI_API_KEY=...plandexpdxPlan & Load 6
plandex newplandex load some-file.ts another-file.tsplandex load src/components -rplandex load src --treeplandex load src/**/*.tsplandex load https://raw.githubusercontent.com/.../README.mdExecute & Iterate 4
plandex tell "add a new line chart..."plandex tell -f prompt.txtplandex helpplandex <command> --helpBranches & Iteration 25
plandex plansplandex cdplandex currentplandex lsplandex rmplandex clearplandex updateplandex showplandex chatplandex continueplandex buildplandex debug "npm test"plandex diffplandex apply --commitplandex reject --allplandex logplandex rewind 3plandex branchesplandex checkout -yplandex delete-branchplandex configplandex set-configplandex set-autoplandex modelsplandex set-modelTips
- Plandex core is plan-then-implement: changes accumulate in a protected sandbox for review before applying to project files, with built-in version control to roll back anytime.
plandex load -rloads a directory recursively,--treeloads structure only, and**/*.tsuses glob — control context precisely and avoid wasting tokens.- It defaults to OpenAI but also works with Anthropic Claude, Gemini, Mixtral, Llama, and more via OpenRouter.ai or any OpenAI-compatible endpoint.
FAQ
How is Plandex different from ordinary AI chat coding?
Plandex targets large tasks: changes accumulate in a sandbox for your review before applying; built-in version control rolls back, branches try multiple approaches in parallel, and context stays current automatically.
Must Plandex use OpenAI?
It defaults to OpenAI (needs OPENAI_API_KEY) but also supports Anthropic Claude, Google Gemini, Mixtral, Llama, and more via OpenRouter.ai or any OpenAI-compatible provider.
Official References
Each command links to its official documentation below, so you can verify the latest usage and read deeper.
Maintained by LaoHand
Publicly updated on Aug 26, 2026, continuously proofread against official docs.
Contact Us
Wrong command or description? Send us corrections, business inquiries or product feedback by email.
Contact Us