Local, token-efficient cross-repo context for LLMs. CLI + MCP server.
Project description
crumbs
Local, token-efficient cross-repo context for LLMs.
crumbs indexes your repositories into compact context crumbs — file maps and
symbol signatures (typed function/class/type declarations + one-line docs + line
ranges), never the full file bodies. An assistant like Claude can then
understand many repos at once by reading a tiny map instead of paying tokens to
read the entire source tree.
Indexing this very tool produces a map of ~1,200 tokens standing in for
~8,400 tokens of source — an ~86% reduction — while still naming every
file and symbol. Each symbol carries its full type signature and a source line
range (e.g. def build_parser() -> ArgumentParser [L125-168]), so the assistant
can open just that slice of a file rather than the whole thing.
- 🪶 Zero dependencies. Pure Python 3.8+ stdlib. Runs on any device.
- 🔒 Fully local. Crumbs live in
~/.crumbs. Nothing leaves your machine. - 🧠 Cross-repo. Search and pull context across every repo you've indexed.
- 🎯 High signal. Python is parsed via
ast; JS/TS/Go/Rust/etc. via fast regex. Skipsnode_modules,.git, build dirs, lockfiles, and binaries.
Install
pip install -e . # provides the `crumbs` command
# or run without installing:
python3 -m crumbs --help
Usage
crumbs index ~/code/my-api ~/code/my-web # index one or more repos
crumbs list # show indexed repos + stats
crumbs map my-api --stats # compact map of one repo (+ token estimate)
crumbs search "auth token" # rank matching symbols across all repos
crumbs context "rate limiting" --repo my-api # LLM-ready context slice
crumbs refresh # re-index everything
crumbs remove my-web # drop a repo from the index
A repo can be referenced by name, id, or path.
Workflow with Claude
crumbs indexthe repos you work across (once, or on acrumbs refreshcron).- Ask Claude to run
crumbs map <repo>orcrumbs context "<topic>"instead of reading whole files. It gets the structure and the relevant symbols for a fraction of the tokens, then reads full files only where it actually needs to.
How it stays cheap
| Full repo read | crumbs map |
|
|---|---|---|
| What | every byte of every file | file tree + typed signatures + 1-line docs + line ranges |
| Bodies | yes | no |
| Cost | grows with codebase | grows with interface size |
Because every symbol records its line range, the follow-up step is cheap too: the
assistant reads path:start-end for the one function it needs instead of opening
the entire file.
Storage layout (~/.crumbs, override with CRUMBS_HOME):
registry.json # id -> {name, path, indexed_at, stats}
repos/<id>.json # full crumb data for one repo
Supported languages
Python (AST), JavaScript/TypeScript, Go, Rust, and a generic declaration matcher for Java, Ruby, PHP, C/C++, C#, Swift, Kotlin. Markdown is indexed by heading. Anything else is skipped from symbol extraction but still ignored safely.
Tests
python3 -m unittest discover -s tests -v
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crumbs_cli-0.3.0.tar.gz.
File metadata
- Download URL: crumbs_cli-0.3.0.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac5341b8b118d7cc46a1f74a1e60096ea290b8985916e401ab7979184e967761
|
|
| MD5 |
010c85eebdc470a05526e958f46d3843
|
|
| BLAKE2b-256 |
3baca40d306b05a880d63934ac4ae39539168a9368e7e928d868be0f95a98f47
|
File details
Details for the file crumbs_cli-0.3.0-py3-none-any.whl.
File metadata
- Download URL: crumbs_cli-0.3.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f61035dd55fb570b4f8f5450506a4ed9b7824787c94e82be25570f2a5f30aae
|
|
| MD5 |
ebfa1d15314b83f6b09b482833e60f07
|
|
| BLAKE2b-256 |
ae769062cf505e8966892d7e7e23e7ab5346aaebecd3d8c346c0af1e36f1045a
|