claudexer
v0.3.0
Published
70% cost savings on Claude Code. Auto-indexes your codebase and injects smart context via hooks. One command setup.
Maintainers
Readme
Claudexer
70% cost savings on Claude Code. One command setup.
Claudexer indexes your codebase and auto-injects smart context via Claude Code hooks. Claude knows your code structure before you even ask.
Quick Start
cd your-project
npx claudexer installThat's it. Use Claude Code normally - it's now optimized.
Benchmarks
Tested on a 500+ file NestJS backend:
| Task | Without Claudexer | With Claudexer | Savings | |------|-------------------|----------------|---------| | Simple (health endpoint) | 27s, 6 turns, $0.17 | 19s, 4 turns, $0.11 | 35% | | Complex (new module) | 318s, 41 turns, $1.39 | 82s, 18 turns, $0.42 | 70% |
How It Works
You: "add a price alerts feature"
WITHOUT Claudexer:
Claude: *reads app.module* *reads prisma schema* *searches services*
*reads trading.service* *reads another file*...
→ 41 turns, $1.39
WITH Claudexer:
Hook injects: app.module.ts imports, prisma schema, similar service template
Claude: *creates all files in one batch*
→ 18 turns, $0.42The magic: Claudexer shows Claude the exact edit points (where to add imports, where to add models) so it doesn't need to explore.
Features
- Turbo Mode - 2ms hook latency, zero API calls
- Smart Matching - Intent patterns detect "notify when stock drops" → price-alerts
- Prompt Detection - Different context for implement/fix/question prompts
- Auto-Sync - New files get indexed automatically via git diff
- Graceful Fallback - Lists files Claude can read if needed
Commands
npx claudexer install # One-time setup (indexes + installs hooks)
npx claudexer sync # Manual re-sync (usually automatic)
npx claudexer status # Show stats and metrics
npx claudexer uninstall # Remove hooks (keeps index)What Gets Created
your-project/
├── .claudexer/ # Index files (gitignored)
│ ├── deep-index.json # Full codebase index
│ ├── key-files.json # Service/controller templates
│ └── codebase-map.md # Compressed overview
└── .claude/
└── hooks/ # Claude Code hooks
└── claudexer-hook.mjsSupported Languages
| Language | Support | |----------|---------| | TypeScript/JavaScript | Full | | Dart/Flutter | Full | | Python, Go, Rust | Good | | Java, Kotlin, Swift | Good | | C#, Ruby, PHP | Basic |
Requirements
- Node.js 18+
- Claude Code CLI
How the Savings Work
- Shows exact edit points - Claude sees where to add imports, not the whole file
- Provides templates - Similar services shown, Claude copies the pattern
- Aggressive instructions - "Create ALL files in single batch, no verification needed"
- Skips exploration - Context is pre-loaded, no file reading needed
License
MIT
