Skip to content

Indexing ​

Package: elsai-codegraph  v1.6.2

One command parses the repository with Tree-sitter and writes a SQLite graph into <repo>/.elsai-codegraph/. Nodes are files, functions, methods, classes, imports, and routes. Edges are calls, imports, and type references.

Index a repository ​

Mount the folder that holds the repository at /repos.

bash
docker run --rm -v /path/to/repos:/repos elsai-codegraph init -i /repos/helpdesk
docker run --rm -v /path/to/repos:/repos elsai-codegraph status /repos/helpdesk

A small Python service (32 files) indexes in a few seconds: on the order of 400 nodes and 800 edges. Add .elsai-codegraph/ to .gitignore. The index can always be rebuilt from the source.

Keep it current ​

While serve --mcp is running, a file watcher updates the index about 1–2 seconds after an edit. If files changed while no server was running, refresh the index:

bash
docker run --rm -v /path/to/repos:/repos elsai-codegraph sync /repos/helpdesk

Index from a native disk. A large repository read through a Windows drive mounted into WSL takes much longer than the same repository on a Linux disk.

Next steps ​

Copyright © 2026 elsai foundry.