A
ankurhalder/codebase-snapshot
Local CLI and MCP server that packs a repository into budgeted Markdown parts, writes a manifest of every…
★ 2·updated 2026-11-19
View on GitHub ↗Direct link · no redirect page
After install: how to tell it works
- What you see after install — The command exits 0 and the terminal shows no "command not found" or "permission denied".
- One-line self-check — Run the smallest usage example from that repository's README. If the output matches what the README describes, it is working.
- If that does not work — This project has no troubleshooting notes. Search its issues for "install".
The install command comes from the repository; these checks describe observable results only and do not replace the project's own docs.
- Star count
- 2 ★ · ankurhalder/codebase-snapshot · read from the GitHub search API · (checked 2026-11-19 20:00:48)
- Source
- read directly from its GitHub page · type: open-source project
- Harvest history
- first seen 2026-11-18 · last seen 2026-11-20 · seen 3× · listed by 1 sources
- Score
- score 103 · 2 ★ · 1 sources · repo
- Install
- see Install & config above
FAQ (answers come from our records)
Who is it for?
We filed it under these tags: Open Source. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository
ankurhalder/codebase-snapshot;first catalogued 2026-11-18;last seen 2026-11-20。There is no official certification or quality rating here — we record sources and dates only.README excerpt (English, untranslated) · Read the full README on GitHub →
codebase-snapshot
Excerpted from the repository README (abridged)
A snapshot you can prove is current.
Plain-text parts under a hard byte budget, an index of every file and every skipped
file with the reason, and a validate command that fails when the code moves.
bash
npx codebase-snapshot generate # no install: straight to the snapshot
snapshot # once installed: detects the project, sets it up, generates
That writes ./snapshot/ — a directory you can drop into a chat, a prompt, a RAG pipeline or a
repository review. TypeScript and JavaScript first, but also Python, Go, Rust, Java/Kotlin,
C#/.NET, PHP, Ruby, C/C++, Vue, Svelte and Astro, without configuration.
Install ·
Quick start ·
Trust ·
AI agents ·
Docs ·
Site
## Why
Feeding a real repository to a model is awkward: files are too big, context windows are too small,
and choosing what matters by hand neither scales nor repeats. This does it deterministically.
A hard ceiling, not a target. maxPartBytes is a limit, and nothing overflows it silently:
a file too big for a part becomes a head/tail excerpt with an omission marker, and manifest.json
records it in incomplete[] with the line ranges it lost.
An index, not just text. manifest.json lists every included file with its layer, kind,
language, part, hash and a structural summary, every excluded file with the reason, and an
incomplete[] list of every file it could only emit in part, with the line ranges it lost.
Provably current. validate re-hashes the repository against the snapshot and exits non-zero
on any drift, so a pipeline can gate on the context being fresh.
Repeatable. Two runs over unchanged input give byte-identical parts and the same
manifest.fingerprint; only the artifacts that carry a timestamp, run id or pid differ.
## Install
bash
npm install -g codebase-snapshot # puts snapshot on your PATH
npx codebase-snapshot generate # or no install at all, one-off
npm install -D codebase-snapshot # or add it to a project
codebase-snapshot is the canonical name to script against; snapshot is the short command a
global install provides, and from a project dependency the same binary is npx snapshot or the
npm run snapshot script init writes.
Requires Node.js 18+. Any npm client works — npm, yarn (classic and Berry with strict PnP), pnpm
and bun. Published from GitHub Actions with build
provenance, so npm audit signatures
verifies the tarball came from this repository at a tagged commit.
This is a 0 .x release: the CLI surface may still change in a minor
release until 1.0.0, so pin an exact version if you need a fixed surface today.
→ Installation guide
## Quick start
Type it. That is the whole first run.
bash
snapshot
It recognises the project and says what it keyed on — Detected nextjs / Because next.config.ts
— then offers the recommended setup in one keystroke, or a walk through every setting with each
question starting on its default. Either way it writes the config, adds the npm scripts and the
devDependency, installs with your package manager, and generates. A project that already has a
config just generates.
Nothing to press — CI, a container, an agent:
bash
npx codebase-snapshot --autopilot
A first run never guesses. With no terminal and no --autopilot it exits 2 and names the
Plain-text parts under a hard byte budget, an index of every file and every skipped
file with the reason, and a validate command that fails when the code moves.
bash
npx codebase-snapshot generate # no install: straight to the snapshot
snapshot # once installed: detects the project, sets it up, generates
That writes ./snapshot/ — a directory you can drop into a chat, a prompt, a RAG pipeline or a
repository review. TypeScript and JavaScript first, but also Python, Go, Rust, Java/Kotlin,
C#/.NET, PHP, Ruby, C/C++, Vue, Svelte and Astro, without configuration.
Install ·
Quick start ·
Trust ·
AI agents ·
Docs ·
Site
## Why
Feeding a real repository to a model is awkward: files are too big, context windows are too small,
and choosing what matters by hand neither scales nor repeats. This does it deterministically.
A hard ceiling, not a target. maxPartBytes is a limit, and nothing overflows it silently:
a file too big for a part becomes a head/tail excerpt with an omission marker, and manifest.json
records it in incomplete[] with the line ranges it lost.
An index, not just text. manifest.json lists every included file with its layer, kind,
language, part, hash and a structural summary, every excluded file with the reason, and an
incomplete[] list of every file it could only emit in part, with the line ranges it lost.
Provably current. validate re-hashes the repository against the snapshot and exits non-zero
on any drift, so a pipeline can gate on the context being fresh.
Repeatable. Two runs over unchanged input give byte-identical parts and the same
manifest.fingerprint; only the artifacts that carry a timestamp, run id or pid differ.
## Install
bash
npm install -g codebase-snapshot # puts snapshot on your PATH
npx codebase-snapshot generate # or no install at all, one-off
npm install -D codebase-snapshot # or add it to a project
codebase-snapshot is the canonical name to script against; snapshot is the short command a
global install provides, and from a project dependency the same binary is npx snapshot or the
npm run snapshot script init writes.
Requires Node.js 18+. Any npm client works — npm, yarn (classic and Berry with strict PnP), pnpm
and bun. Published from GitHub Actions with build
provenance, so npm audit signatures
verifies the tarball came from this repository at a tagged commit.
This is a 0 .x release: the CLI surface may still change in a minor
release until 1.0.0, so pin an exact version if you need a fixed surface today.
→ Installation guide
## Quick start
Type it. That is the whole first run.
bash
snapshot
It recognises the project and says what it keyed on — Detected nextjs / Because next.config.ts
— then offers the recommended setup in one keystroke, or a walk through every setting with each
question starting on its default. Either way it writes the config, adds the npm scripts and the
devDependency, installs with your package manager, and generates. A project that already has a
config just generates.
Nothing to press — CI, a container, an agent:
bash
npx codebase-snapshot --autopilot
A first run never guesses. With no terminal and no --autopilot it exits 2 and names the
Listed badge (optional)
Copy this line into the README if you want the listing mark. Optional, and it does not affect being listed.
[](https://anclum.com/en/s/ankurhalder-codebase-snapshot/)
- Source
- github · https://github.com/ankurhalder/codebase-snapshot
- Browse by field
- Open source
- Traction
- 2 ★
- added
- today
More entries
Filed under
Every tag opens the full list for that filter. Counts are the live catalogue figures.