# Plandex

> Terminal AI coding agent built for large tasks and real-world projects

- Category: AI Coding / Autonomous Coding Agents
- Language: Go
- Licence: MIT
- Repository: https://github.com/plandex-ai/plandex
- Website: https://plandex.ai
- Canonical page: https://ai-tldr.dev/tools/plandex/

## In short

Plandex is a terminal-based AI development tool that can plan and execute large coding tasks that span many steps and touch dozens of files. It sits in the Autonomous Coding Agents category of the AI Coding tools and is open-source, written in Go and licensed MIT. To get started: install the CLI.

## Overview

Plandex is a terminal-based AI development tool that can plan and execute large coding tasks that span many steps and touch dozens of files. It handles up to 2M tokens of context directly (around 100k per file) and can index larger directories using tree-sitter project maps, so it stays useful even when a project grows past the point where other tools struggle.

A cumulative diff review sandbox keeps AI-generated changes separate from your project files until they are ready to go in. Command execution is controlled, so you can roll back and debug easily. You can run Plandex with full autonomy or keep tight, step-by-step control, and combine models from Anthropic, OpenAI, Google, and open-source providers through curated model packs.

It installs as a one-line, zero-dependency CLI and runs in a REPL inside any project directory. On Windows it works only inside WSL, not the Windows command prompt or PowerShell.

## What it does

- 2M token effective context window with the default model pack; Plandex loads only what each step needs and stays reliable in large projects and files
- Fast project map generation and syntax validation with tree-sitter, supporting 30+ languages
- Cumulative diff review sandbox that isolates AI changes until they are ready, plus full version control with branches for the plan
- Configurable autonomy, from full auto mode to fine-grained, step-by-step control
- Automated debugging of terminal commands like builds, linters, tests, and scripts, plus browser app debugging when Chrome is installed
- Project-aware chat mode, git integration with commit message generation, and a REPL with fuzzy auto-complete for commands and file loading

## Getting started

Install the CLI with one line, set a provider key, then start the REPL inside any project directory. On Windows, run these inside WSL.

1. Install the CLI

   Run the one-line, zero-dependency install script. See the docs for more installation options.

```bash
curl -sL https://plandex.ai/install.sh | bash
```

2. Set a provider key

   For self-hosted or bring-your-own-key mode, set the key for the model provider you are using, for example an OpenRouter.ai key. If you have a Claude Pro or Max subscription, Plandex can use it for Anthropic models and will ask to connect it on first run.

```bash
export OPENROUTER_API_KEY=...
```

3. Start in your project

   Change into your project directory (optionally initialize a git repo, which Plandex integrates with well), then start the REPL. It opens in chat mode by default for fleshing out ideas before implementation.

```bash
cd your-project-dir
git init
plandex
```

## When to use it

- Implementing large features that span many steps and touch dozens of files in a single coordinated plan
- Working in big projects and large files where other AI tools break down once the codebase grows
- Reviewing AI-generated changes in an isolated diff sandbox before applying them, with easy rollback and version control
- Exploring and asking questions about an unfamiliar codebase using project-aware chat mode before writing code
