plandex-ai/plandex
Open source AI coding agent. Designed for large projects and real world tasks.
Slowing — last commit 7mo ago
worst of 4 axestop contributor handles 97% of recent commits; no tests detected
Has a license, tests, and CI — clean foundation to fork and modify.
Documented and popular — useful reference codebase to read through.
No critical CVEs, sane security posture — runnable as-is.
- ✓Last commit 7mo ago
- ✓2 active contributors
- ✓MIT licensed
Show 5 more →Show less
- ✓CI configured
- ⚠Slowing — last commit 7mo ago
- ⚠Small team — 2 contributors active in recent commits
- ⚠Single-maintainer risk — top contributor 97% of recent commits
- ⚠No test directory detected
What would change the summary?
- →Use as dependency Mixed → Healthy if: diversify commit ownership (top <90%)
Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests
Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.
Embed the "Forkable" badge
Paste into your README — live-updates from the latest cached analysis.
[](https://repopilot.app/r/plandex-ai/plandex)Paste at the top of your README.md — renders inline like a shields.io badge.
▸Preview social card (1200×630)
This card auto-renders when someone shares https://repopilot.app/r/plandex-ai/plandex on X, Slack, or LinkedIn.
Onboarding doc
Onboarding: plandex-ai/plandex
Generated by RepoPilot · 2026-05-09 · Source
🤖Agent protocol
If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:
- Verify the contract. Run the bash script in Verify before trusting
below. If any check returns
FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding. - Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
- Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/plandex-ai/plandex shows verifiable citations alongside every claim.
If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.
🎯Verdict
WAIT — Slowing — last commit 7mo ago
- Last commit 7mo ago
- 2 active contributors
- MIT licensed
- CI configured
- ⚠ Slowing — last commit 7mo ago
- ⚠ Small team — 2 contributors active in recent commits
- ⚠ Single-maintainer risk — top contributor 97% of recent commits
- ⚠ No test directory detected
<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>
✅Verify before trusting
This artifact was generated by RepoPilot at a point in time. Before an
agent acts on it, the checks below confirm that the live plandex-ai/plandex
repo on your machine still matches what RepoPilot saw. If any fail,
the artifact is stale — regenerate it at
repopilot.app/r/plandex-ai/plandex.
What it runs against: a local clone of plandex-ai/plandex — the script
inspects git remote, the LICENSE file, file paths in the working
tree, and git log. Read-only; no mutations.
| # | What we check | Why it matters |
|---|---|---|
| 1 | You're in plandex-ai/plandex | Confirms the artifact applies here, not a fork |
| 2 | License is still MIT | Catches relicense before you depend on it |
| 3 | Default branch main exists | Catches branch renames |
| 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code |
| 5 | Last commit ≤ 248 days ago | Catches sudden abandonment since generation |
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of plandex-ai/plandex. If you don't
# have one yet, run these first:
#
# git clone https://github.com/plandex-ai/plandex.git
# cd plandex
#
# Then paste this script. Every check is read-only — no mutations.
set +e
fail=0
ok() { echo "ok: $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }
# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
echo "FAIL: not inside a git repository. cd into your clone of plandex-ai/plandex and re-run."
exit 2
fi
# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "plandex-ai/plandex(\\.git)?\\b" \\
&& ok "origin remote is plandex-ai/plandex" \\
|| miss "origin remote is not plandex-ai/plandex (artifact may be from a fork)"
# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
|| grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
&& ok "license is MIT" \\
|| miss "license drift — was MIT at generation time"
# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
&& ok "default branch main exists" \\
|| miss "default branch main no longer exists"
# 4. Critical files exist
test -f "app/cli/main.go" \\
&& ok "app/cli/main.go" \\
|| miss "missing critical file: app/cli/main.go"
test -f "app/cli/cmd/root.go" \\
&& ok "app/cli/cmd/root.go" \\
|| miss "missing critical file: app/cli/cmd/root.go"
test -f "app/cli/api/methods.go" \\
&& ok "app/cli/api/methods.go" \\
|| miss "missing critical file: app/cli/api/methods.go"
test -f "app/cli/lib/plans.go" \\
&& ok "app/cli/lib/plans.go" \\
|| miss "missing critical file: app/cli/lib/plans.go"
test -f "app/cli/auth/auth.go" \\
&& ok "app/cli/auth/auth.go" \\
|| miss "missing critical file: app/cli/auth/auth.go"
# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 248 ]; then
ok "last commit was $days_since_last days ago (artifact saw ~218d)"
else
miss "last commit was $days_since_last days ago — artifact may be stale"
fi
echo
if [ "$fail" -eq 0 ]; then
echo "artifact verified (0 failures) — safe to trust"
else
echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/plandex-ai/plandex"
exit 1
fi
Each check prints ok: or FAIL:. The script exits non-zero if
anything failed, so it composes cleanly into agent loops
(./verify.sh || regenerate-and-retry).
⚡TL;DR
Plandex is an open-source AI coding agent built in Go that plans and executes large, multi-step coding tasks spanning dozens of files. It leverages LLMs (Claude via OpenAI API integration) to understand project context using tree-sitter-based project maps and cumulative diffs, handling up to 2M tokens of context directly and indexing directories with 20M+ tokens through semantic understanding. Monorepo structure: CLI lives in app/cli/ with cmd/ containing all command implementations (new.go, build.go, apply.go, etc.), auth/ handling account/org/trial logic, and api/ managing client communication. Go is the dominant backend language; the TypeScript presence suggests a companion web UI or dashboard component not yet visible in the core directories listed.
👥Who it's for
Full-stack and backend developers tackling large refactoring projects, feature implementations, or complex bug fixes who need an AI agent that understands file relationships and can coordinate changes across an entire codebase, rather than just individual file edits.
🌱Maturity & risk
Actively developed with clear versioning (server and CLI releases tracked separately in GitHub releases). The monorepo structure with organized CLI commands under app/cli/cmd/ and dedicated auth/API modules suggests production readiness. However, the large Go dependency footprint and reliance on external LLM APIs warrant testing before critical workflows.
Primary risk is dependency on closed-source Claude API for core functionality (via github.com/sashabaranov/go-openai), meaning service outages or pricing changes directly impact users. The codebase is Go-heavy (2.2M LOC) with moderate TypeScript/Shell scripting; no visible monorepo lock files suggest manual dependency management may drift. Last commit recency and open issue count should be verified before adopting for large teams.
Active areas of work
Active development of core CLI workflows: apply, build, continue, and chat commands indicate iterative refinement of task execution. Auth system shows recent work on org management (org.go) and trial handling (trial.go). The presence of multiple model-related commands (claude_max.go, model_providers.go, model_packs.go) suggests expanding LLM provider support beyond initial Claude-only implementation.
🚀Get running
Clone the repo, navigate to app/, and inspect the Makefile (if present) or check go.mod for build instructions. Likely: cd app && go build -o plandex ./cli or similar. Set up API credentials (likely via environment variables for OpenAI/Claude access) before running commands like plandex new or plandex chat.
Daily commands:
Exact start steps uncertain without Makefile inspection, but likely: cd app && go mod download && go build ./cli && ./cli login (or equivalent auth flow), then ./cli new <project-name> to initialize. See GitHub workflows (.github/workflows/docker-publish.yml) for CI-driven build patterns. Local mode mentioned in README likely runs plandex in offline/self-hosted configuration.
🗺️Map of the codebase
app/cli/main.go— Entry point for the CLI application—initializes the Cobra command structure and command routingapp/cli/cmd/root.go— Root command definition that establishes the primary command tree and global flags for all subcommandsapp/cli/api/methods.go— Core API client methods that handle all communication with the backend server; critical for plan execution and state managementapp/cli/lib/plans.go— Plan lifecycle management library—handles creation, loading, and state transitions for all plan operationsapp/cli/auth/auth.go— Authentication and authorization logic—manages user session state, API token handling, and org-level permissionsapp/cli/lib/apply.go— Plan application logic that orchestrates file changes, diffs, and execution workflow—core to the AI agent's outputapp/cli/cmd/chat.go— Chat command implementation—primary user interaction point for sending prompts to the AI agent
🛠️How to make changes
Add a new CLI command
- Create a new file in
app/cli/cmd/named after your command (e.g.,app/cli/cmd/mycommand.go) (app/cli/cmd/mycommand.go) - Define a Cobra
&cobra.Commandstruct withUse,Short,Runfields; copy the pattern from similar commands likechat.goorapply.go(app/cli/cmd/mycommand.go) - Register your command in
app/cli/cmd/root.goby callingrootCmd.AddCommand(mycommand.Cmd)(app/cli/cmd/root.go) - If your command needs backend API calls, add methods to
app/cli/api/methods.gofollowing the pattern of existing methods (e.g.,CreatePlan,GetPlan) (app/cli/api/methods.go) - If your command needs local state management, add helper functions in
app/cli/lib/(e.g.,app/cli/lib/mycommand_helper.go) (app/cli/lib/mycommand_helper.go)
Add support for a new AI model provider
- Add provider configuration to model credential storage by extending
app/cli/lib/model_credentials.goto handle the new provider's API key format (app/cli/lib/model_credentials.go) - Add model definitions and list in
app/cli/lib/custom_models.goor via backend sync inapp/cli/lib/models_sync.go(app/cli/lib/custom_models.go) - Update model selection logic in
app/cli/cmd/set_model.goto expose the new provider's models to users (app/cli/cmd/set_model.go) - The backend API (
app/cli/api/methods.go) will handle routing prompts to the correct provider—ensure your CLI passes the model name correctly (app/cli/api/methods.go)
Add a new plan operation or workflow state
- Define the new state or operation in the backend (not in this CLI repo), then update
app/cli/lib/plans.goto recognize and handle the new state (app/cli/lib/plans.go) - If the operation requires file system changes, add logic to
app/cli/lib/apply.goto execute the changes (app/cli/lib/apply.go) - Add a new command in
app/cli/cmd/(e.g.,app/cli/cmd/myoperation.go) that calls the appropriate API method fromapp/cli/api/methods.go(app/cli/cmd/myoperation.go) - Update plan history display in
app/cli/lib/rewind.goif the operation affects undo/rollback logic (app/cli/lib/rewind.go)
Add context auto-detection for a new file type or directory pattern
- Edit
app/cli/lib/context_auto_load.goto add detection logic for your new file type or directory pattern (app/cli/lib/context_auto_load.go) - Add path rules or globs in
app/cli/fs/paths.goto properly resolve and list files of your type (app/cli/fs/paths.go) - Update context loading in
app/cli/lib/context_load.goto handle any special parsing or filtering for the new type (app/cli/lib/context_load.go) - Test the detection by running
plandex contextand verifying files appear in the context summary (app/cli/cmd/context_show.go)
🪤Traps & gotchas
Likely requires OpenAI API credentials (OPENAI_API_KEY or similar env var) to function. The presence of org.go and trial.go suggests cloud-hosted API validation; self-hosted mode may require bypass. Tree-sitter project maps imply a backend service running separately (not visible in CLI directory alone). CLI may expect a backend server at a specific address (check api/clients.go for hardcoded URLs). Auth state likely persists to ~/.plandex or similar; clearing this breaks authentication.
🏗️Architecture
💡Concepts to learn
- Cumulative Diff Strategy — Plandex's core innovation: instead of requesting full file rewrites, it tracks changes incrementally across steps, allowing the AI to reason about modifications without token waste; understanding this is key to why it handles 2M+ tokens efficiently
- Token-Level Context Management — The repo explicitly mentions '2M tokens of context directly (~100k per file)' — this is a constraint you'll hit; understanding token budgeting, pruning, and LLM context windows is critical for extending Plandex without breaking
- Tree-Sitter Project Maps — Plandex can index directories with 20M+ tokens using tree-sitter-based semantic maps rather than raw source; this is how it scales beyond single-file edits and understands cross-file dependencies
- Server-Sent Events (Streaming) — The
api/stream.gomodule indicates Plandex streams LLM responses in real-time rather than buffering; critical for implementing interactive CLI feedback without blocking - Cobra Command Routing — All user-facing commands wire through Cobra; understanding subcommands, flags, and middleware is essential for adding new features or modifying existing CLI behavior
- Plan-Based Task Decomposition — Unlike single-turn AI editors, Plandex separates planning (understanding the task) from execution (applying changes); the plan/build/apply command sequence reflects this and is unique to this architecture
- OAuth/Token-Based Auth with Org Scoping — The auth module (org.go, account.go, trial.go) indicates multi-tenant design with org hierarchies and trial management; critical to understand before modifying user-facing features or permissions
🔗Related repos
aider-ai/aider— Direct alternative: Python-based AI coding agent with similar multi-file editing and LLM orchestration; different language choice and approachandrew-codes/engineer— Similar space: AI-assisted code generation with project understanding; smaller scope but overlapping use casesopenai/gpt-engineer— Predecessor/inspiration: early GPT-based code generation system; Plandex builds on lessons from this approach with better context managementtree-sitter/tree-sitter— Critical dependency (implied): Plandex uses tree-sitter for project parsing and semantic understanding; study its API to understand code context extractionspf13/cobra— Direct dependency: Plandex CLI built entirely on Cobra framework; understanding Cobra's command routing is essential for CLI modifications
🪄PR ideas
To work on one of these in Claude Code or Cursor, paste:
Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.
Add unit tests for CLI auth package (app/cli/auth/)
The auth package (account.go, api.go, auth.go, org.go, state.go, trial.go) handles critical functionality like authentication, organization management, and trial state, but there's no visible test coverage. This is high-risk code that would benefit significantly from unit tests to prevent regressions when refactoring or adding features.
- [ ] Create app/cli/auth/auth_test.go with tests for auth.go functions (login flow, token validation)
- [ ] Create app/cli/auth/account_test.go for account management functions
- [ ] Create app/cli/auth/org_test.go for organization-related operations
- [ ] Mock API calls using testify/mock or similar
- [ ] Aim for >80% code coverage on auth package
Add GitHub Actions workflow for Go linting and code quality (golangci-lint)
The repo has a docker-publish.yml workflow but no Go-specific CI for linting. Given the Go codebase spans multiple packages (api, auth, cmd), adding automated linting would catch code style issues, potential bugs, and enforce consistency before PRs are merged.
- [ ] Create .github/workflows/go-lint.yml that runs on pull_request and push to main
- [ ] Configure golangci-lint with a .golangci.yml config file in the repo root
- [ ] Include checks for: gofmt, govet, errcheck, ineffassign, unused
- [ ] Set up the workflow to run 'go mod tidy' check to prevent dependency drift
- [ ] Add workflow status badge to README.md
Extract and document CLI model provider configuration (app/cli/cmd/model_providers.go)
The model_providers.go file appears to handle multiple model providers (OpenAI, Claude, etc.) but related helpers exist in model_helpers.go and model_packs.go. Creating a centralized provider configuration module with clear documentation would improve maintainability and make it easier for contributors to add new providers.
- [ ] Create app/cli/cmd/providers/ directory to organize provider logic
- [ ] Move provider registration logic from model_providers.go into providers/registry.go
- [ ] Extract provider-specific config into providers/{openai,anthropic,etc}.go files
- [ ] Create app/cli/cmd/providers/README.md documenting how to add a new provider
- [ ] Update imports in model_helpers.go and model_packs.go to reference new structure
- [ ] Add example provider integration in documentation
🌿Good first issues
- Add tests for
app/cli/cmd/new.goandapp/cli/cmd/build.go— these high-level commands lack visible unit test coverage and are critical user workflows - Document the exact environment variables required for local-mode operation in README.md (OPENAI_API_KEY, PLANDEX_API_URL, etc.) — current docs mention self-hosting but don't list required config
- Implement missing help text generation for newly added LLM provider commands (model_providers.go appears skeletal) — test that
plandex model-providers --helpreturns useful output
⭐Top contributors
Click to expand
Top contributors
- [@Dane Schneider](https://github.com/Dane Schneider) — 97 commits
- @danenania — 3 commits
📝Recent commits
Click to expand
Recent commits
e2d7720— link to cloud wind down post (Dane Schneider)4577abc— updates for Plandex Cloud wind down beginning 10/3/2025 (Dane Schneider)9017ba3— fix broken docs link (Dane Schneider)df17a18— Bump version to 2.2.1 (Dane Schneider)fed1aa4— Bump version to 2.2.1 (Dane Schneider)8a59b0c— Bump version to 2.2.1 (Dane Schneider)9cd3eb4— fix for provider fallback on stream error. don't increment retries on claude max quota exhaustion. claude-status command (Dane Schneider)80da6de— Merge branch 'main' into claude_max (Dane Schneider)4744362— fixes for custom models config, opus planner model pack (Dane Schneider)e461209— Add Claude Pro/Max subscription documentation (Dane Schneider)
🔒Security observations
- High · Outdated Chromedp Dependency with Known Vulnerabilities —
app/cli/go.mod - github.com/chromedp/chromedp v0.13.3, github.com/chromedp/cdproto v0.0.0-20250319231242-a755498943c8. The codebase uses chromedp v0.13.3 and cdproto v0.0.0-20250319231242-a755498943c8 (pre-release). Chromedp is used for browser automation and may contain vulnerabilities in older versions. The use of pre-release/untagged versions increases the risk of unvetted code. Fix: Update to the latest stable version of chromedp. Avoid using pre-release commit hashes (v0.0.0-*) in production. Consider pinning to specific stable versions. - High · Unvetted Pre-release Dependency Version —
app/cli/go.mod - github.com/plandex-ai/go-prompt v0.0.0-20250304173555-1f364907fc6c. The go-prompt dependency is pinned to a pre-release commit hash (v0.0.0-20250304173555-1f364907fc6c) rather than a stable release. This version has not gone through official release vetting and may contain unreviewed security issues. Fix: Use stable tagged releases instead of pre-release commit hashes. If stable releases don't exist, consider vendoring the code and performing security review, or contributing to upstream to create stable releases. - Medium · Potential API Client Vulnerability —
app/cli/api/clients.go, app/cli/api/methods.go, app/cli/api/stream.go, app/cli/api/errors.go. The codebase contains API client code (app/cli/api/clients.go, methods.go, stream.go, errors.go) for interacting with external services including OpenAI. Without reviewing the implementation, there's a risk of improper credential handling, insecure TLS configuration, or information disclosure through error messages. Fix: Review API client implementation for: proper credential storage (no hardcoded secrets), secure TLS configuration, proper error handling that doesn't expose sensitive information, and secure token management. Implement credential rotation policies. - Medium · Authentication State Management —
app/cli/auth/state.go, app/cli/auth/auth.go. The auth state module (app/cli/auth/state.go) manages authentication tokens and user credentials. Improper implementation could lead to token exposure, session hijacking, or privilege escalation. Fix: Verify that authentication tokens are stored securely (e.g., using OS-level credential managers where available), not logged, cleared on logout, and use secure session practices. Implement token expiration and refresh mechanisms. - Medium · AWS SDK Integration Without Visible Configuration Review —
app/cli/go.mod - aws-sdk-go-v2/* dependencies. The codebase integrates with AWS SDK (aws-sdk-go-v2). Without visible configuration files, there's potential risk of misconfigured credentials, overly permissive IAM policies, or exposed AWS keys. Fix: Ensure AWS credentials are never hardcoded. Use environment variables or AWS credential profiles. Implement least-privilege IAM policies. Review and rotate AWS access keys regularly. Use STS temporary credentials where possible. - Medium · Browser Automation Process Management —
app/cli/lib/apply_cgroup_linux.go, app/cli/lib/apply_cgroup_other.go, app/cli/lib/apply_proc.go. The codebase uses chromedp for browser automation with process management (apply_cgroup_linux.go, apply_cgroup_other.go, apply_proc.go). Improper process isolation could allow privilege escalation or resource exhaustion attacks. Fix: Verify that browser processes are properly isolated, resource limits are enforced, and temporary files are securely managed. Ensure Chrome/Chromium is run with sandboxing enabled. Clean up temporary files after use. - Low · Logging and Debug Information —
undefined. The presence of debug.go and lumberjack logging (app/cli/cmd/debug.go, gopkg.in/natefinch/lumberjack.v2) suggests extensive logging. Debug logs Fix: undefined
LLM-derived; treat as a starting point, not a security audit.
👉Where to read next
- Open issues — current backlog
- Recent PRs — what's actively shipping
- Source on GitHub
Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.