Dumping 150,000 tokens into an AI prompt every time an agent runs is expensive and sloppy.
We benchmarked TokenCap on full-repo tasks and brought payload size from 152,000 tokens down to 12,450 tokens. That is a 12.2x reduction.
How it works:
Instead of sending raw text, TokenCap parses the code into an AST graph using local tree-sitter WASM grammars. It scores every function and file based on real call-graph proximity and gates the output against a hard token budget.
Run it locally in one command:
npx tokencap make
No API keys. Zero cloud dependencies. Your code never leaves your terminal.
Check the technical documentation and benchmarks at tokencap.vansharora.app