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
The distribution is named crumbs-cli; it provides the crumbs command.
pipx install crumbs-cli # isolated, on your PATH (recommended)
# or, no install at all:
uvx --from crumbs-cli crumbs --help
# or, from a clone:
pip install -e . # dev install
python3 -m crumbs --help # run without installing
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.
Use with Claude Code (MCP)
crumbs ships an MCP server (crumbs mcp) so an MCP host — Claude Code, Claude
Desktop, or any MCP client — can call it as native tools. It speaks the MCP wire
protocol over stdio with zero dependencies (no SDK).
One-command install (Claude Code plugin):
/plugin marketplace add crumbs1505/crumbs
/plugin install crumbs@crumbs
This bundles the MCP server and a skill; repo paths are auto-indexed on first
use. See plugin/ for details.
Manual registration (e.g. in a project .mcp.json or your Claude Code config):
{
"mcpServers": {
"crumbs": { "command": "uvx", "args": ["--from", "crumbs-cli", "crumbs", "mcp"] }
}
}
uvx fetches and runs crumbs on demand, so nothing needs to be installed first.
(If you installed via pipx, use "command": "crumbs", "args": ["mcp"] instead.)
The server exposes five model-controlled tools — crumbs_map, crumbs_search,
crumbs_context, crumbs_index, crumbs_list — and auto-indexes a repo path on
first use, so there is no manual setup step.
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
Releasing
Releases are published to PyPI automatically by
CI (.github/workflows/publish.yml) whenever a version
tag is pushed. To cut a release:
-
Bump the version in all three places:
pyproject.toml,crumbs/__init__.py, andplugin/.claude-plugin/plugin.json(keep them in sync). -
Commit the bump and push to
main. -
Tag and push it:
git tag v0.3.1 && git push origin v0.3.1
CI then builds the sdist + wheel, runs twine check, and publishes to PyPI via
Trusted Publishing (OIDC — no token stored
in the repo). PyPI versions are immutable, so every release needs a new version number.
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.4.0.tar.gz.
File metadata
- Download URL: crumbs_cli-0.4.0.tar.gz
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0a49a71f24ced8d6113c8c90884fb76287a9153f73881f0409819f6f5750a27
|
|
| MD5 |
253fda08546f751a9b500e1e318105e9
|
|
| BLAKE2b-256 |
11f1ef558b9fff95216a737bd59234688f9dcfaa03590a92cc9345f6a88957f1
|
Provenance
The following attestation bundles were made for crumbs_cli-0.4.0.tar.gz:
Publisher:
publish.yml on crumbs1505/crumbs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crumbs_cli-0.4.0.tar.gz -
Subject digest:
c0a49a71f24ced8d6113c8c90884fb76287a9153f73881f0409819f6f5750a27 - Sigstore transparency entry: 2027491006
- Sigstore integration time:
-
Permalink:
crumbs1505/crumbs@a58d75462b1519ce62fab1a9c8baf1339f3b868b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/crumbs1505
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a58d75462b1519ce62fab1a9c8baf1339f3b868b -
Trigger Event:
push
-
Statement type:
File details
Details for the file crumbs_cli-0.4.0-py3-none-any.whl.
File metadata
- Download URL: crumbs_cli-0.4.0-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d033180953bfd638ddf7f6888b345be6240ff2f8eb1e5e92f76f0b716ea5d52b
|
|
| MD5 |
b0a18e15414005d2f6c2ace2410dbdbc
|
|
| BLAKE2b-256 |
86d885f17035904ae348ddd6d198bca361c1914469561e027e2e12736336090c
|
Provenance
The following attestation bundles were made for crumbs_cli-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on crumbs1505/crumbs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
crumbs_cli-0.4.0-py3-none-any.whl -
Subject digest:
d033180953bfd638ddf7f6888b345be6240ff2f8eb1e5e92f76f0b716ea5d52b - Sigstore transparency entry: 2027491328
- Sigstore integration time:
-
Permalink:
crumbs1505/crumbs@a58d75462b1519ce62fab1a9c8baf1339f3b868b -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/crumbs1505
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a58d75462b1519ce62fab1a9c8baf1339f3b868b -
Trigger Event:
push
-
Statement type: