Index your code
Parse every file and build the graph.
Basic usage
larkx indexThis parses every file in supported languages using tree-sitter (or a regex fallback), builds the graph, and saves it to .larkx/.
Supported languages
Files with these extensions are parsed:
- JavaScript / TypeScript:
.js .jsx .ts .tsx .mjs .cjs - Python:
.py - Go:
.go - Rust:
.rs - Java:
.java - C/C++:
.c .cpp - C#:
.cs
What gets skipped
node_modules,dist,build,.next,out,coverage,.turbo,.cache- Anything in your
.gitignoreor.claudeignore - Security defaults from
.larkx/config.json:.env*,*.key,*.pem,credentials*, etc. - Minified files (
.min.js,.min.css), lock files
Incremental indexing
Each file's SHA-256 hash is stored. On subsequent runs, only files whose hash changed are reparsed. A 1000-file project typically reindexes in under 2 seconds when little has changed.
Force a full reindex
larkx index --forceBypasses the cache. Use this if you suspect stale data or after upgrading larkx.
AI summaries
Optional one-line file summaries generated by Claude Haiku. Stored in .larkx/summaries.json, used in level 4 context output and shown in the visual graph UI.
ANTHROPIC_API_KEY=sk-... larkx index --aiCost: roughly $0.001-0.003 per file using Haiku. A 500-file project costs ~$1.
--ai runs only summarize new or changed files.Watch mode
Reindex automatically when files change:
larkx index --watchUses chokidar. Each save triggers an incremental reparse for that file only.
After indexing
- Run
larkx statsto see file counts and token estimates - Run
larkx serveto explore the graph in the browser - Try the AI tools, Claude Code should now use them automatically
Next: Verify setup