Reduce Claude Code token usage by 60-70% with persistent codebase caching.
Features
Live Dashboard
Visual dashboard showing real-time token savings, cache hit rates, and performance metrics.
Sidebar Panel
- Token Savings — Live stats: hits, misses, tokens saved, cost saved
- Indexed Files — Browse your indexed project tree
- Symbols — Search extracted functions, classes, types
How it works
CodeTree indexes your codebase into a persistent SQLite database. When Claude Code tries to read a file, search for code, or list files — CodeTree intercepts the call and serves cached results instead, saving tokens.
| Claude Code Action | Without CodeTree | With CodeTree |
|---|---|---|
| Read a file | Full file re-read every time | Served from cache if unchanged |
| Grep for a symbol | Scans all files | Returns indexed matches instantly |
| Glob for file structure | Lists entire directory | Returns cached tree |
Status Bar
Shows live cache hit rate and cumulative token savings right in your status bar.
Getting Started
- Install this extension
- Open any project
- Click "Initialize CodeTree" when prompted (or run
CodeTree: Initializefrom command palette) - Done — CodeTree starts working automatically
Requirements
- Node.js 20+
codetree-claudenpm package (the extension will prompt to install it)
Commands
| Command | Description |
|---|---|
CodeTree: Initialize |
Set up CodeTree for the current project |
CodeTree: Open Dashboard |
Open the visual dashboard |
CodeTree: Show Status |
Quick status check |
CodeTree: Reindex Project |
Force a full re-index |
CodeTree: Enable/Disable |
Toggle CodeTree on/off |
Settings
| Setting | Default | Description |
|---|---|---|
codetree.autoActivate |
true |
Auto-activate when workspace opens |
codetree.memoryLimitMB |
256 |
In-memory cache size (MB) |
codetree.maxFileSize |
1048576 |
Max file size to index (1MB) |
codetree.showStatusBar |
true |
Show status bar item |
codetree.refreshInterval |
15 |
Dashboard refresh interval (seconds) |