/plandex

An AI coding engine for complex tasks

Primary LanguageGoGNU Affero General Public License v3.0AGPL-3.0


๐Ÿ”ฎ An open source, terminal-based AI coding engine for complex tasks.

PRs Welcomeโ€‚ Release Release

Install ยท Usage ยท Self-Hosting ยท Development ยท Discord


Plandex uses long-running agents to complete tasks that span multiple files and require many steps. It breaks up large tasks into smaller subtasks, then implements each one, continuing until it finishes the job. It helps you churn through your backlog, work with unfamiliar technologies, get unstuck, and spend less time on the boring stuff.


Plandex intro video

๐ŸŒŸ  Build complex software with LLMs

โšก๏ธ  Changes are accumulated in a protected sandbox so that you can review them before automatically applying them to your project files. Built-in version control allows you to easily go backwards and try a different approach. Branches allow you to try multiple approaches and compare the results.

๐Ÿ“‘  Manage context efficiently in the terminal. Easily add files or entire directories to context, and keep them updated automatically as you work so that models always have the latest state of your project.

๐Ÿง   Plandex relies on the OpenAI API and requires an OPENAI_API_KEY environment variable. Support for open source models, Google Gemini, and Anthropic Claude is coming soon. Use the OPENAI_ENDPOINT environment variable for a custom OpenAI endpoint.

โœ…  Plandex supports Mac, Linux, FreeBSD, and Windows. It runs from a single binary with no dependencies.

Install  ๐Ÿ“ฅ

Quick install

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

Grab the appropriate binary for your platform from the latest release and put it somewhere in your PATH.

Build from source

git clone https://github.com/plandex-ai/plandex.git
git clone https://github.com/plandex-ai/survey.git
cd plandex/app/cli
go build -ldflags "-X plandex/version.Version=$(cat version.txt)"
mv plandex /usr/local/bin # adapt as needed for your system

Windows

Windows is supported via WSL.

Get started  ๐Ÿš€

If you don't have an OpenAI account, first sign up here.

Then generate an API key here.

cd your-project
export OPENAI_API_KEY=...
export OPENAI_ENDPOINT=... # optional e.g. https://<your-proxy>/v1
export OPENAI_ORG_ID=... # optional - set the OrgID if you have multiple OpenAI orgs
plandex new

After any plandex command is run, commands that could make sense to run next will be suggested. You can learn to use Plandex quickly by jumping in and following these suggestions.

Usage  ๐Ÿ› ๏ธ

Here's a quick overview of the commands and functionality.

Help  โ„น๏ธ

To see all available commands:

plandex help

For help on any command:

plandex [command] --help

Why Plandex?  ๐Ÿค”

๐Ÿ—๏ธ  Go beyond autocomplete to build complex functionality with AI.
๐Ÿšซ  Stop the mouse-centered, copy-pasting madness of coding with ChatGPT.
๐Ÿ“‘  Manage context efficiently in the terminal.
โšก๏ธ  Ensure AI models always have the latest versions of files in context.
๐Ÿช™  Retain granular control over what's in context and how many tokens you're using.
๐Ÿšง  Experiment, revise, and review in a protected sandbox before applying changes.
โช  Rewind and retry as needed.
๐ŸŒฑ  Explore multiple approaches with branches.
๐Ÿ”€  Run tasks in the background or work on multiple tasks in parallel.
๐ŸŽ›๏ธ  Try different models and model settings, then compare results.

Plandex Cloud  โ˜๏ธ

Plandex Cloud is the easiest and most reliable way to use Plandex. You'll be prompted to start an anonymous trial (no email required) when you create your first plan with plandex new. Trial accounts are limited to 10 plans and 10 AI model replies per plan. You can upgrade to an unlimited account with your name and email.

Plandex Cloud accounts are free for now. In the future, they will cost somewhere in the $10-20 per month range.

Self-hosting  ๐Ÿ 

Read about self-hosting Plandex here.

Limitations and guidance โš ๏ธ

  • Plandex can provide a significant boost to your productivity, but as with any other AI tool, you shouldn't expect perfect results. Always review a plan carefully before applying changes, especially if security is involved. Plandex is designed to get you 80-90% of the way there rather than 100%.

  • Due to the reasoning limitations of LLMs, automatically applied file updates also aren't perfect. While these can be improved over time with better prompting strategies (contributions welcome) and better models, be prepared for occasional updates that aren't quite right. Use the plandex changes command to review pending updates in a TUI. If a file update has mistakes, make those changes yourself with copy-and-paste and reject the file in the changes TUI.

  • The more direction and detail you provide, the better the results will be. Working with Plandex often involves giving it a prompt, seeing that the results are a bit off, then using plandex rewind to go back and iterate on the prompt or add context before trying again. Branches are also useful for trying different approaches.

  • While it can be tempting to just dump your entire project into context if it fits under the token limit, with current models you will tend to see better results (and pay less) by being more selective about what's loaded into context.

Security  ๐Ÿ”

Plandex Cloud follows best practices for network and data security. And whether cloud or self-hosted, Plandex protects model provider API keys (like your OpenAI API key). Read more here.

Privacy and data retention  ๐Ÿ›ก๏ธ

Read about Plandex Cloud's privacy and data retention policies here.

Roadmap  ๐Ÿ—บ๏ธ

๐Ÿง   Support for open source models, Google Gemini, and Anthropic Claude in addition to OpenAI
๐Ÿค  Plan sharing and team collaboration
๐Ÿ–ผ๏ธ  Support for GPT4-Vision and other multi-modal modelsโ€”add images and screenshots to context
๐Ÿ–ฅ๏ธ  VSCode and JetBrains extensions
๐Ÿ“ฆ  Community plugins and modules
๐Ÿ”Œ  Github integration
๐ŸŒ  Web dashboard and GUI
๐Ÿ”  SOC2 compliance
๐Ÿ›ฉ๏ธ  Fine-tuned models

This list will grow and be prioritized based on your feedback.

Discussion and discord  ๐Ÿ’ฌ

Speaking of feedback, feel free to give yours, ask questions, report a bug, or just hang out:

Contributors  ๐Ÿ‘ฅ

โญ๏ธ  Please star, fork, explore, and contribute to Plandex. There's a lot of work to do and so much that can be improved.

Work on tests, evals, prompts, and bug fixes is especially appreciated.

Here's an overview on setting up a development environment.

Comparable tools โš–๏ธ

About the developer  ๐Ÿ‘‹

Hi, I'm Dane. I've been building and launching software products for 17 years. I went through YCombinator in winter 2018 with my devops security company, EnvKey, which I continue to run today. I'm fascinated by LLMs and their potential to transform the practice of software development.

I live with my wife and 4 year old daughter on the SF peninsula in California. I grew up in the Finger Lakes region of upstate New York. I like reading fiction, listening to podcasts, fitness, and surfing.