Getting Started

Index your code

Parse every file and build the graph.

Basic usage

bash
larkx index

This 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 .gitignore or .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

bash
larkx index --force

Bypasses 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.

bash
ANTHROPIC_API_KEY=sk-... larkx index --ai

Cost: roughly $0.001-0.003 per file using Haiku. A 500-file project costs ~$1.

Summaries are cached. Once generated, subsequent --ai runs only summarize new or changed files.

Watch mode

Reindex automatically when files change:

bash
larkx index --watch

Uses chokidar. Each save triggers an incremental reparse for that file only.

After indexing

  • Run larkx stats to see file counts and token estimates
  • Run larkx serve to explore the graph in the browser
  • Try the AI tools, Claude Code should now use them automatically

Next: Verify setup