LeanToken
Optimizes AI coding agent token usage by providing local-first code intelligence for efficient searching, structural inspection, and precise retrieval.
LeanToken acts as a local-first code intelligence layer designed to make AI coding tokens go further. It enables coding agents to efficiently navigate, search, and retrieve specific code segments from large repositories, reducing the need for broad, token-expensive file reads. By indexing source code locally and providing focused tools, LeanToken empowers agents to understand code structure, trace history, and obtain exact ranges within an explicit token budget, ultimately leading to significant savings in model input tokens.
Key Features
01Local-first code indexing for rapid, private retrieval and discovery
02Seamless integration with popular AI coding agents like Claude Code, Cursor, and OpenCode
03Explicit token budgets for every response, preventing large files from consuming context
04Measured token savings, demonstrating significant reduction in AI model input tokens
05Specialized CLI and MCP tools for ranked search, file discovery, structural outlining, and Git history tracing
069 GitHub stars
Use Cases
01Efficiently narrowing down large codebases to only the relevant files and code ranges for an AI agent's task
02Assisting AI coding agents in understanding and acting on complex tasks requiring deep code context
03Providing precise code snippets and structural information to AI models without exceeding token limits