contextlake
A local context layer for your AI tools: mirror your repos, index them into a knowledge graph, and serve it over MCP.
On this page
For anyone new to contextlake who wants to know what it is and where to start.
contextlake is a local context layer for your AI tools. It mirrors your repositories to your machine, indexes them into a knowledge graph, and serves that graph over MCP (the protocol AI tools use to call external tools). Your agent then answers from real source instead of guessing.
The mirror and the knowledge layer run on your machine. A hosted model or a hosted connector is opt-in.

Start here#
- Installing and upgrading: pick a channel, run one command. It also holds the versioning promise.
- Quickstart: try it on one repo with no setup, then follow the whole fleet path.
- contextlake, explained: what changes on your screen, and why it is built this way.
The three layers#
You adopt the layers one at a time. The mirror is useful on its own.
- Mirror. Clone every repository you can reach into a local copy of its namespace tree. It works with GitLab, GitHub, Bitbucket, Gitea, Codeberg and Forgejo.
- Knowledge layer (optional). Turn the mirror into a graph you can query, with semantic search, a wiki and connectors.
- Serve. Expose the result over MCP, and as an offline graph viewer and dashboard.
Where to go next#
- Configure it: Configuration says where settings live and which one wins.
- Build and use a knowledge base: Mirroring repositories, The knowledge layer, Serving over MCP and Using the dashboard.
- Operate it: Keeping it fresh, Scheduling runs and Troubleshooting.
- Look something up: Command reference and Console output.
- Contribute: Contributing and Writing style.
Commands#
Run any command as contextlake <command>, and add --help for its own help. Verbs sit under
the noun they belong to: mirror for git repositories and kb for the knowledge layer.
init, bootstrap, version, completion, doctor and schedule sit at the top, because they
span both layers or neither. The command reference (linked above) lists every command, flag
and exit code.
Local by default#
contextlake has no telemetry, no analytics, no usage reporting and no crash reporting.
To check that a run stays local, add --offline (or set CONTEXTLAKE_OFFLINE=1). It refuses
every non-loopback connection this process makes, and keeps loopback open for the MCP server, the
dashboard and a local Ollama. The Command reference says what
--offline covers and what it does not.
