About codebase-snapshot
codebase-snapshot is a local CLI and MCP server for turning a repository into LLM-ready context that a person or an agent can actually check. It is maintained by Ankur Halder, a software engineer who builds developer tools and writes about context engineering.
This page exists for the same reason the rest of the documentation does: a technical claim is easier to trust when you can see who made it, how it was tested, and how to correct it.
What this project is
- A deterministic scanner that writes Markdown parts under a hard byte budget.
- A manifest that records every included file, every skipped path and the reason, and every file whose body was shortened, with the missing line ranges.
- A secret redactor that masks matched values in place, and an audit that re-scans the result.
- A validator that re-hashes the tree and exits non-zero when the snapshot no longer matches it.
- A live index and an MCP server with seven tools — six read-only and one writable
(
snapshot_generate) — so an agent can ask for the one file, symbol or impact report it needs instead of reading the whole repository. - A small, dependency-light TypeScript package: one runtime dependency, no native binary.
What this project is not
- Not a hosted service. The CLI reads a directory you name and writes a directory you name. The MCP server runs on your machine. Nothing is uploaded by the tool itself.
- Not a code graph or a replacement for a compiler. The language profiles are heuristics; the optional TypeScript pass is confined and capped, and the docs say where it stops.
- Not a guarantee that a model will answer correctly. Better context removes one failure mode. It does not replace tests, review or a reproducible build.
- Not a secret scanner with a compliance certificate. Redaction is defence in depth, not a promise that every possible credential shape is known. The security review states the residual risks plainly.
How the claims are tested
The repository runs one offline gate before every publish: lint, typecheck, the test suite, a tarball check, the docs site and a link audit. A separate deep run generates a real snapshot, validates it against the source tree, verifies every git path is accounted for, and proves the run is reproducible.
Every snapshot this project publishes about itself is generated by the tool and checked by the same validator users get. The docs quote measured numbers, name the version and date, and keep the script that produced them in the repository. When a number changes, the page changes with it or the number is removed.
The site is built from the same Markdown that ships in the package. There is no second copy of the prose to drift, and every page shows its last-updated date from git history.
Editorial policy
- Original, tested explanations. Guides are written from the repository, the tests and real runs, not assembled from other people's summaries.
- No paid placements. Comparisons are written by the maintainer and say where the other tool is the better choice. There are no bought listicles, paid reviews or guaranteed-placement schemes.
- Corrections are public. Open an issue at github.com/ankurhalder/codebase-snapshot/issues with the page, the claim and the evidence. A correction is committed like any other change.
- AI-assisted editing is used; mistakes are treated as defects. Every command, number and security claim is still required to survive the test suite and a manual read. A wrong claim is corrected, not defended because a model wrote it.
How this site is built
The source of truth is README.md and docs/. A build script renders them to static HTML with a canonical URL, a Markdown twin, structured data and a sitemap. There is no client-side router and no JavaScript required to read a page.
The llms.txt and llms-full.txt files are generated from the same source for agents that prefer one fetch. They are an agent convenience, not a search-engine ranking trick.
Elsewhere
- Source and issues: github.com/ankurhalder/codebase-snapshot
- Package: npmjs.com/package/codebase-snapshot
- Author: GitHub, npm
- MCP listings: Glama, M8ven
Related
- FAQ — short answers to the questions this page raises.
- Security review — the threat model and residual risks.
- All documentation — every guide, reference and comparison.