Table of Contents

Plandex

Plandex is an open-source, terminal-based AI coding agent designed for large-scale software development across complex, multi-file codebases.1) It combines autonomous planning, intelligent context discovery, and a sandbox-first workflow to deliver production-grade code changes safely and efficiently.

ai_agent cli coding planning open_source

Repository https://github.com/plandex-ai/plandex
Website https://plandex.ai
Language Go
License Open Source
Stars 14,000+
Creator Dane (Plandex)

Overview

Plandex is built for developers who need AI assistance on real-world projects with large codebases. Unlike simpler AI coding assistants, Plandex can autonomously handle tasks spanning dozens of files, supporting projects with 20M+ tokens and codebases with millions of lines.2) It uses a unique plan/apply workflow where all changes accumulate in a version-controlled sandbox before being applied to the project.

Key Features

Architecture

Plandex uses a client-server architecture. The server can be self-hosted locally via Docker or accessed through Plandex Cloud. The plan/apply workflow proceeds through distinct phases:4)

  1. Context Discovery – Tree-sitter project maps identify relevant files
  2. Planning – AI creates a detailed execution plan
  3. Implementation – Each step is executed systematically
  4. Change Application – A race orchestration between multiple strategies (deterministic edits, diff edits, whole file builds)
  5. Validation – Commands run for dependency installation, builds, and tests
  6. Auto-Debugging – Failed commands are automatically debugged

graph TD A[User Prompt] --> B[Context Discovery] B --> C[Tree-sitter Project Map] C --> D[Planning Phase] D --> E[Implementation] E --> F{Change Strategy Race} F --> G[Deterministic Edits] F --> H[Diff Edits] F --> I[Whole File Build] G --> J[Sandbox] H --> J I --> J J --> K{User Review} K -->|Approve| L[Apply to Project] K -->|Reject| M[Rewind / Branch] L --> N[Run Tests] N -->|Fail| O[Auto-Debug] O --> E N -->|Pass| P[Done]

Supported LLMs

Plandex supports a wide range of model providers through built-in integrations and model packs:

Built-in model packs include gemini-planner, google, and o3-planner for different workflow optimizations.

Installation

Plandex can be self-hosted locally with Docker or used via Plandex Cloud:5)

# Self-hosted local mode with Docker
docker run plandex/plandex
 
# Cloud mode - two tiers available:
# 1. Integrated Models (no API keys needed)
# 2. BYO API Key (use your own accounts)

Configuration is JSON-based with IDE integration support. Model settings (temperature, top-p) are version-controlled, enabling A/B testing across branches.

CLI Usage

# Configure models for current plan
plandex set-model
 
# Set default models for new plans
plandex set-model default
 
# Manage custom providers and model packs
plandex models custom
 
# JSON editing mode
plandex set-model --json

See Also

References

3)
https://plandex.ai|Official Website