Getting Started

Index your code

Parse every file and build the graph.

Basic usage

bash
larkx index

This parses supported files, using tree-sitter for TypeScript and JavaScript when native bindings are available and a regex fallback for the other supported languages, 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. When little has changed, incremental reindexes are typically much faster than a full parse.

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 are generated by the provider you configure during larkx init (Local Claude or the Anthropic API). They are stored in .larkx/summaries.json, used in level 4 context output, and shown in the visual graph UI.

bash
larkx index --ai

If you choose the Anthropic API provider, set ANTHROPIC_API_KEY first or enter it during larkx init. Local Claude uses your installed claude CLI and does not require an API key.

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