Plandex
An open-source, terminal-based AI coding agent built for large tasks and real codebases — with its own version control for plans, a 2M-token effective context window, and self-hosted or cloud deployment.
Plandex is a terminal-native AI coding agent designed around a specific gap: most AI coding tools work well on small edits but struggle with tasks spanning dozens of files or requiring many sequential steps. It builds a fast project map with tree-sitter (supporting 30+ languages), loads only the context each step actually needs, and validates both syntax and logic before applying file edits, with fallback layers when something doesn’t check out.
Plans in Plandex aren’t just chat sessions — they’re version-controlled, branchable units of work, so you can explore multiple approaches to the same task or compare outputs from different models before committing to one. A REPL mode with fuzzy autocomplete, a project-aware chat mode for exploring ideas before implementation, and automated debugging of terminal commands (builds, tests, linters, and — with Chrome installed — browser apps) round out the workflow.
The project is a Go client-server application (app/cli and app/server) distributed under MIT, installable as a one-line, dependency-free CLI. It supports a Dockerized local self-hosted mode as well as a cloud-hosted option, and lets you mix and match models from OpenAI, Anthropic, Google, and open-source providers via curated “model packs.”
What You Get
- A terminal-native CLI and REPL for driving AI coding tasks, with a client-server architecture separating the CLI from the agent server
- Version-controlled, branchable “plans” instead of disposable chat sessions, so you can compare approaches or models before committing
- Tree-sitter-based project mapping and 30+ language support for fast, accurate context building on large codebases
- Self-hosted local mode via Docker, or a cloud-hosted option, with the same CLI either way
Common Use Cases
- Driving multi-file refactors or feature implementations that span dozens of files, where most chat-based coding tools lose context
- Comparing how different LLM providers (OpenAI, Anthropic, Google, open models) handle the same coding task via curated model packs
- Automating debugging loops for builds, tests, linters, and deployment scripts instead of manually re-running and re-pasting errors
- Self-hosting an AI coding agent locally via Docker for teams that don’t want code and prompts leaving their infrastructure
Under The Hood
Architecture
Plandex is split into app/cli (the terminal client and REPL), app/server (the agent orchestration backend), and app/shared (types and logic used by both), following a client-server model even when running fully locally via the Dockerized self-hosted mode. Plans are treated as first-class, version-controlled objects with branching, which means the system tracks a plan’s history and diverging attempts explicitly rather than treating each AI response as disposable chat output.
Tech Stack Go for both CLI and server, tree-sitter for project-map generation and syntax validation across 30+ languages, and multi-provider LLM support (OpenAI, Anthropic, Google, plus open-source model packs) with context caching to control cost and latency. Distributed as a single dependency-free binary with a one-line install script, and Dockerized for local self-hosting.
Code Quality
A dedicated test/ directory exists alongside the app/ and docs/ structure, and the project ships stable CLI releases tracked under releases/; however, GitHub activity signals show low recent commit velocity relative to its scope, worth checking before relying on it for active feature requests.
What Makes It Unique Most AI coding tools treat each interaction as ephemeral chat; Plandex instead makes the unit of work a version-controlled, branchable “plan” with its own diff/revision history, syntax and logic validation before edits apply, and automated debugging of the commands those edits trigger — a workflow closer to a change-management system than a chatbot wrapper.
Self-Hosting
Licensing Model MIT licensed — the CLI, server, and local self-hosted mode are fully open source with no license key.
Self-Hosting Restrictions None found for local/Docker self-hosting; the same code runs whether self-hosted or used against Plandex’s cloud-hosted option.
Cloud vs Self-Hosted Plandex offers an optional cloud-hosted service alongside the self-hosted Docker mode “for extra reliability and convenience,” per the README — self-hosting avoids that dependency but requires running the server yourself.
License Key Required No.
Related Apps
claw-code
AI Agents · AI Code Assistants
A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.
claw-code
MITOpenCode
AI Code Assistants
A fully open-source AI coding agent built for the terminal, with a TUI, desktop app, web client, plugin system, and SDK — one of the most-starred AI coding agents on GitHub.
OpenCode
MITcodex
AI Code Assistants · Developer Tools
OpenAI's open-source CLI coding agent that reads, edits, and runs code in your terminal using natural language prompts.