Introduction

What is larkx?

A high-level overview of what larkx does, who it's for, and why it exists.

The problem

Every time an AI agent (Claude Code, Cursor, GitHub Copilot, ChatGPT) needs to understand your codebase, it has to read source files. Each file is a few hundred to a few thousand tokens. A medium-sized project burns 200,000+ tokens just to learn its own structure, before the AI has done any real work.

That cost is paid every conversation, every refactor, and every time the AI gets confused and re-reads files. It is the single largest source of wasted spend in agentic coding workflows.

The fix

larkx indexes your codebase once into a compact queryable graph stored on disk. The graph contains every file, function, class, import, and call relationship, represented in a token-efficient format the AI can consume in seconds.

Through the Model Context Protocol (MCP), the AI gets six tools that let it navigate that graph instead of reading files:

  • get_project_index, full project overview with tiered detail levels (1-4)
  • get_file_summary, symbols and imports for a single file
  • search_symbol, find where a function or class is defined
  • get_impact, list every file that depends on a target file
  • get_call_chain, trace callers and callees of a symbol
  • get_dead_code, files and functions unreachable from any entry point
The resultAI agents answer the same questions using approximately 60-85% fewer tokens on typical projects (up to ~90% on focused tasks). You save money. The AI is also more accurate because it has a structured map instead of guessing from partial reads. Exact savings depend on project size, the task, and the AI model used.

Who it's for

  • Developers using AI agents daily, Claude Code, Cursor, Copilot, ChatGPT
  • Teams paying API bills, every conversation costs less
  • Anyone building MCP-based AI tools, larkx is a reference implementation
  • Power users of code intelligence, the visual graph UI works standalone too

How it works in three commands

setup
npm install -g larkx
cd your-project
larkx init && larkx index

That's it. init sets up the index folder, asks which AI agents you use, and creates the MCP config. index parses every file using tree-sitter and builds the graph. Restart your editor and the AI has six new tools.

What it is not

  • Not an AI itself. It's a tool that makes AI cheaper and smarter.
  • Not a replacement for reading code. The AI still reads files when it genuinely needs them, just far less often.
  • Not language-locked. Works for TypeScript, JavaScript, Python, Go, Rust, Java, C, C++, C#.
  • Not a SaaS. Runs entirely on your machine. No data leaves your laptop.

Next steps