The problem

Your AI is only as good as what it can see.

Point it at one file and it's sharp. Ask it about the system across dozens of repos, and it starts guessing.

contextlake gives your tools the real source to read: mirrored to your machine, indexed into a queryable graph, and served to your editor over MCP. Everything runs locally and offline, so no code leaves your machine.

How it works

Three layers, adopted one at a time

The mirror is useful on its own. Each layer above it is optional, turn on only what you need.

01

Mirror

Clone every repo in a GitLab group, GitHub org, Bitbucket workspace, or Codeberg owner into a faithful mirror, each parked on its most active branch and kept fresh with one command, never touching the branch you're on.

02

Knowledge optional

Parse the mirror into a code and dependency graph, then add semantic search, a council-verified wiki, and Atlassian / Figma / GitLab connectors.

03

Serve

Expose it all over MCP and an offline graph visualizer, so agents answer “where is X defined?” instead of grepping.

See it

A whole codebase as one navigable graph

contextlake kb graph renders a bounded, offline, interactive map, fleet overview, a symbol's neighbourhood, or a single repo. Type glyphs, language lettermarks, confidence-coded edges, level-of-detail labels, and a navigator minimap keep even dense graphs legible.

The contextlake graph visualizer: a repository's symbols laid out as a node graph with per-type glyphs, a kind legend, a search field, and a minimap in the corner.

The real visualizer, running right here on contextlake's own code. Drag, zoom, and search. Vendored and offline, no network. Export to Mermaid, DOT, or JSON.

What's inside

Built for real working machines

your editor · connected to contextlake over MCP
youwhat depends on the Embedder interface?
contextlakeblast_radius("Embedder")
30 nodes affected within 3 hops. Direct subclasses:
  • OllamaEmbedder
  • BuiltinEmbedder
  • OpenAIEmbedder
Plus build_embedder and 26 callers across cmd_embed, serve, wiki, eval, and the tests.
BuiltinEmbedder OllamaEmbedder OpenAIEmbedder build_embedder Embedder

A real blast_radius call, answered from the graph inside your editor. No model, no network.

MCP setup →

Offline-first

The core tool is stdlib-only; nothing leaves your machine. The knowledge layer is opt-in and runs locally, so your source and your context stay on your disk.

contextlake · sync
$contextlake mirror sync
Found 8 local repositories
billing-apiupdated, main
=notify-workerup to date
gatewayupdated, main
web-frontendupdated, main
=search-indexup to date
=docs-siteup to date
8/8
3 updated · 3 unchanged · 2 skipped · 0 errors

A real sync run over a local test fleet. Uncommitted work is detected and left untouched, and the same pass scales to hundreds of repos, concurrent and resumable.

Syncing →

Curated wiki

LLM-synthesized, council-verified pages grounded strictly in graph facts, with provenance footers.

Editor steering

Generate AGENTS.md, .mcp.json, rules, and a skills library, wired to your graph.

Use cases

When you reach for contextlake

The same graph answers a handful of everyday questions that are painful across many repos.

Land in an unfamiliar fleet

New to a codebase spread across dozens of repos? Ask where a symbol is defined, what calls it, and how repos connect, without cloning your way through it by hand.

$ contextlake kb query "RateLimiter"

Ground your AI editor

Point Claude Code, Cursor, Windsurf, or Kiro at the graph over MCP so they answer from your real source with cited file:line, instead of guessing from training data.

$ contextlake kb serve

Check blast radius before a change

See what depends on a class or module across every repo before you touch it, so a small edit does not quietly break a service three repos away.

$ contextlake kb impact Embedder

Find who knows it

Surface the likely owners and reviewers for a repo or path from commit history, so you know who to ask before a change lands.

$ contextlake kb owners billing-api
Why not just…

grep, or a hosted vector database?

vs. grep across repos

grep finds strings, one repo at a time. It cannot tell a definition from a call, cannot cross repo boundaries, and buries the answer in matches. contextlake parses code into a typed graph, so you ask for callers, dependents, or owners and get cited file:line answers across the whole fleet.

vs. a hosted vector DB

A hosted vector database means standing up infra and usually shipping your code to a third party. contextlake is offline and graph-first: exact edges instead of fuzzy nearness, token-cheap for agents, and semantic vectors are an opt-in local layer, not a dependency. Your source and your context stay on your disk.

vs. other local code-graph tools

Tools like Graphify and GitNexus index a codebase, on demand, one at a time. contextlake mirrors and continuously keeps fresh a whole fleet of repos, on their real branches, with a graph, search, and a wiki that stay in sync across all of them, automatically.

vs. AI wiki generators (DeepWiki)

DeepWiki turns a single public repo into an AI-written wiki, on demand, in the cloud, one at a time, and your own code needs a paid account to go through it privately. contextlake mirrors your whole fleet locally and keeps a graph, search, and wiki offline and current across every repo you have, nothing leaves your disk to get there.

Pebble, the contextlake otter, holding up a glowing stone with obvious pride
Meet Pebble

Otters keep a favorite stone. Pebble keeps yours.

Every repo you care about, mirrored to your own lake and kept on its most active branch, so the context is always within reach for you and your agents. No stone goes missing, and the work you have not committed yet is never dropped.

How branch-safety works →
Get started

Up and running in a minute

No GitLab or config needed to try it on a repo you already have. Point it at any local git repo and open the graph.

$ pip install "contextlake[kb]" $ contextlake kb index --source . # parse this repo $ contextlake kb graph --overview --open $ contextlake kb serve # or serve it over MCP
Contribute

Open source, and small on purpose

contextlake is MIT-licensed and deliberately focused. Small, sharp tools live or die by their edges, so bug reports, fixes, and well-scoped features are all welcome.

$ gh repo clone sayak-sarkar/contextlake $ python -m venv .venv && source .venv/bin/activate $ pip install -e ".[dev,kb]" $ ruff check src tests && pytest # the whole loop
  • Keep it lean. One job, done well; features that stray from it are a hard sell.
  • No network in tests, and every change ships with the test that proves it.
  • Conventional Commits, atomic and well-scoped, with a clear why.