FAQ
Frequently asked questions
Quick answers to the most common questions.
What is larkx and how does it work?
larkx is a CLI tool that parses your codebase with tree-sitter, builds a queryable graph of every file, function, class, import, and call relationship, then makes it available to AI agents in three ways: as an MCP server (6 query tools for MCP clients), as a pre-generated .larkx/context.md file (readable by any agent), or via the larkx context CLI command.
How much does larkx save in AI tokens?
Approximately 60-85% on typical projects. Example: a 200-file project costs ~16,000 tokens via larkx level 2 versus ~120,000 tokens reading every file directly. Searching for one function costs ~30 tokens with search_symbol versus ~600 tokens reading the file. Actual savings vary by project size, task, and AI model.
What is .larkx/context.md?
A pre-generated plain-text codebase map written automatically on every larkx index run. Any AI agent that can read files uses it — no MCP server needed. It contains the same level-2 output as get_project_index: file paths, function names, line numbers, and imports at ~80 tokens per file. It is gitignored.
Which AI agents does larkx support?
MCP clients (Claude Code, Cursor, Continue, Zed, Windsurf) use the 6 MCP tools. All other agents (GitHub Copilot, OpenAI Codex, Gemini CLI) read .larkx/context.md directly. Any agent or tool can also use larkx context CLI output by pasting it into the chat.
Do I need an API key to use larkx?
No. The indexer, MCP server, context.md generation, and CLI all work with zero API keys. AI summaries (larkx index --ai) are optional and require either the claude CLI (free with your Claude subscription) or an Anthropic API key.
How do AI summaries work and which provider should I choose?
AI summaries generate a one-sentence description per file, stored in .larkx/summaries.json. Choose Local Claude (uses the claude CLI with your Claude Pro/Team subscription, no extra API key) or Anthropic API key (billed per token, uses claude-haiku-4-5). Skip is the recommended default — summaries cost extra tokens to generate.
Which programming languages does larkx support?
TypeScript, JavaScript (.ts .tsx .js .jsx .mjs .cjs), Python, Go, Rust, Java, C, C++, C#, Ruby, Swift, Kotlin, Scala, and Shell. Tree-sitter is used where native bindings are available, with a regex fallback for everything else.
Is larkx open source and free?
Yes. MIT licensed. Free for personal and commercial use. No telemetry, no SaaS, runs entirely on your machine.
Does larkx send my code anywhere?
No. Everything stays local. The only optional external call is larkx index --ai, which sends each file to the LLM provider you configured (Local Claude via claude CLI, or Anthropic API via your own key).
How does larkx handle Next.js routes that are not imported anywhere?
Auto-detection. If next is in package.json, larkx treats app/**/page.tsx, app/**/layout.tsx, route handlers, and middleware.ts as entry points for reachability analysis. They never appear as dead code.
Will larkx leak my .env files or API keys?
No. The default exclude list includes .env, .env.*, *.key, *.pem, *.cert, credentials*, secrets/, and *.token. These files are never parsed or indexed.
How long does indexing take?
A 1,000-file TypeScript project takes 10-30 seconds on the first index. Subsequent runs are incremental (SHA-256 hashed) and typically under 2 seconds. The context.md file is regenerated on every run.
Why are my larkx MCP tools not showing in VS Code?
Make sure .mcp.json exists in your project root, then Ctrl+Shift+P → Developer: Reload Window. Claude Code will prompt to approve the server — click Allow. Run larkx mcp --check to verify the server responds.
What is the UserPromptSubmit hook?
A Claude Code hook written to .claude/settings.json that runs before every prompt. With MCP enabled it reminds Claude to use larkx MCP tools first. Without MCP it tells Claude to read .larkx/context.md first. larkx init sets this up automatically.
Can I run larkx on a monorepo?
Yes. Run larkx init and larkx index from the monorepo root. Use --folder to scope get_project_index to a specific package when working in one area.
Does larkx work on Windows?
Yes. Fully supported on Windows 10/11. Path separators are normalized automatically.
Can larkx index Vue or Svelte files?
Not yet. .vue and .svelte parsers are on the roadmap. Those files are skipped for now.
Didn't find your answer? Open an issue on GitHub.