codetree-claude
v1.7.9
Published
MCP server & CLI: codebase index + cache for Claude Code, Cursor, OpenAI Codex, Google Antigravity/Gemini. Model Context Protocol tools (codetree_read, codetree_search, …), hooks on Claude, rules on other IDEs. Token savings, SQLite index, symbol search,
Downloads
2,287
Maintainers
Keywords
Readme
CodeTree
Your AI coding assistant keeps re-reading the same files — and you keep paying for it. CodeTree gives Claude Code, Cursor, Codex, and Gemini a fast, always-accurate memory of your codebase, so they read less, stay grounded in the real code, and cost less — with an optional team dashboard that turns AI usage into honest, provable numbers.
Works with Claude Code · Cursor · OpenAI Codex · Google Gemini / Antigravity · any MCP-compatible editor.
Why teams use it
💸 Cut wasted tokens. Every AI session re-runs the same file reads and pulls identical source into context over and over. CodeTree serves what your assistant already has, skips re-reads of unchanged files, and hands back a compact outline or diff when the whole file isn't needed. You stop paying to re-send code that hasn't changed.
🎯 Fewer hallucinations, less rework. Your assistant always works from the current file — every read is checked against what's actually on disk. Switch branches, pull, or edit outside the editor and CodeTree reflects it immediately. No more fixes built on a stale copy.
🧰 One setup, every tool. A single command wires the same memory into Claude Code, Cursor, Codex, and Gemini. Switch tools without losing the benefit.
📊 Finally see your AI spend. An optional team dashboard shows real token savings, coaches developers toward sharper prompts, flags rework, and ranks efficiency across the team — with numbers you can actually prove, never inflated.
How it pays off
| For developers | For teams & leads | |----------------|-------------------| | Faster answers — served from a local cache, not a fresh re-read | See what AI is costing and saving, per person and per team | | More accurate edits — the agent never works from a stale file | Prompt coaching that turns vague asks into precise, cheaper ones | | Less rework — grounded context means fewer wrong turns | Rework signals that show where AI output had to be redone | | Works in the tool you already use | A friendly efficiency leaderboard, scoped to your organization |
Quick start
In your editor (recommended)
Install “CodeTree” from the VS Code Marketplace. It sets everything up and shows your live savings dashboard. Reload the window and you're done.
From the command line
npm install -g codetree-claude
cd your-project
codetree initThen reload your editor — CodeTree starts automatically on your next AI session.
Prefer per-project?
npm install --save-dev codetree-claude && npx codetree init
Works with your tools
| Your assistant | Support | |----------------|---------| | Claude Code (Anthropic) | ✅ Full — automatic, including native-read acceleration | | Cursor | ✅ Full | | OpenAI Codex | ✅ Full | | Google Gemini / Antigravity | ✅ Full | | Any MCP-compatible editor | ✅ Works over standard MCP |
codetree init configures each tool for you. The setup it adds is safe to commit, so your whole team gets the same benefit from one run.
What your assistant can do with it
CodeTree gives your AI a smarter toolkit than raw file reads:
- Read smarter — pull a whole file, just its outline, or just the one function it needs — and skip files it already read this session.
- Search smarter — find a symbol or its usages across the repo without scanning every file.
- Navigate — get an instant project map and overview instead of crawling the tree.
- Edit safely — make precise edits and writes that keep everything in sync.
- Remember — carry key findings across sessions, so context isn't rebuilt from scratch every time.
Your assistant picks these up automatically. You just work as usual.
Honest by design
Most “tokens saved” numbers are marketing fiction. CodeTree counts only real reduction — content your assistant genuinely didn't have to send. A full read that puts the whole file into context counts as zero, because it saved nothing. What you see is what you actually saved. That honesty is the entire point of measuring it.
Your code stays yours
CodeTree is local-first. Your source and its index live on your machine — your code is never uploaded. If your organization turns on the team dashboard, only usage metrics (token counts and tool stats) and — for prompt coaching — your prompts are synced. Your source files never leave your computer.
Configuration
Sensible defaults work out of the box. To tune, edit .codetreerc.json in your project root:
{
"ignore": [".git", "node_modules", "dist", "build", ".next"],
"maxFileSize": 1048576,
"cache": { "memoryLimitMB": 256, "contentCacheMaxMB": 512 },
"watch": { "enabled": true }
}Anything you leave out falls back to a safe default.
Command line
codetree init # Set up CodeTree for every project in this folder
codetree status # Is it running? How many files are indexed?
codetree stats # Token savings and cache performance
codetree reindex # Rebuild the index from scratch
codetree doctor # Health-check your setup (run after Node / npm upgrades)Requirements
- Node.js 20 or newer
- macOS, Windows, or Linux
License
See LICENSE. © CodeTree. All rights reserved.
