Skip to main content
ToolPotion
AI Advisor
Submit a Tool (Free)

codebase-snapshot

codebase-snapshot generates LLM-ready snapshots of code repositories, ensuring deterministic output under a strict byte budget. It creates a verifiable manifest indexing all files, including skipped ones with reasons, and offers a validation command to detect drift. This tool is designed for AI agents and human developers to provide current, accurate, and context-window-friendly code representations.

Visit Website
Share
codebase-snapshot screenshot
codebase-snapshot screenshot

codebase-snapshot is a utility designed to transform a code repository into a set of LLM-ready parts, adhering to a strict byte budget. It addresses the challenges of feeding large repositories to language models, where files can be too big and context windows too small. The tool operates deterministically, ensuring consistent output across runs for unchanged input.

Read More

The core functionality revolves around creating a `snapshot/` directory containing plain-text parts. Each part is limited by a `maxPartBytes` ceiling; files exceeding this budget are truncated with explicit omission markers. For very large files, it provides a head/tail excerpt. Alongside the code parts, it generates a `manifest.json` file. This manifest acts as a comprehensive index, listing every included file with details like its layer, kind, language, part, hash, and a structural summary. Crucially, it also records every excluded file along with the specific reason for its omission, such as `gitignore`, `sensitive-file`, or `binary`.

A key feature for maintaining context integrity is the `validate` command. This command re-hashes the repository against the generated snapshot and exits with a non-zero code if any drift is detected. This ensures that the LLM context remains fresh and accurate, preventing models from working with outdated code. The tool is designed to be safe by default, skipping credential files unless explicitly requested, redacting secret-shaped strings, and preventing accidental deletion of source code by refusing to overwrite directories it didn't create.

codebase-snapshot supports a wide range of programming languages and frameworks, including TypeScript, JavaScript, Python, Go, Rust, Java/Kotlin, C#/.NET, PHP, Ruby, C/C++, Vue, Svelte, Astro, Next.js, Nuxt, Remix, Angular, Solid, NestJS, Express, Fastify, Koa, Django, FastAPI, Flask, Laravel, and Rails, often without requiring configuration. It provides 25 automatic presets that contribute layers, kinds, ecosystem ignore patterns, and recommended part budgets. For non-TypeScript languages, it generates import/export/class/function summaries, labeling them as `ast`, `structural`, or `heuristic` to indicate their reliability.

Beyond human interaction, codebase-snapshot is built for AI agents. It offers a machine-readable contract and an installable skill, allowing agents to drive the entire process autonomously. Agents can use commands like `generate`, `validate`, `report`, and `explain` to manage snapshots, check for drift, audit secrets, and understand file inclusions/exclusions. The tool also supports programmatic API access for integration into larger systems. Its comprehensive documentation covers installation, CLI reference, configuration, snapshot output schema, and guides for using it effectively with LLMs like ChatGPT, Claude, and Cursor.

  • CategoryAI Coding Assistants
  • Pricing ModelFree
  • DeploymentCLI, Programmatic API
  • PlatformsNode.js 18+

  • Deterministic snapshot generation

  • Hard byte budget for parts

  • Comprehensive manifest.json index

  • Drift validation with `validate` command

  • Automatic detection for 25 project presets

  • Support for multiple programming languages and frameworks

  • Secret redaction and sensitive file exclusion

  • Machine-readable contract for AI agents

  • Installable agent skill

  • Programmatic API access

  • Detailed reporting and auditing

  • Guided first-run setup

  • Configurable output artifacts

  • Memory-bounded processing for large files

  • Snapshot comparison with `diff` command

  1. Install: Use npm, yarn, pnpm, or bun to install `codebase-snapshot` globally or as a project dependency.

  2. Quick Start: Run `snapshot` in your project directory for a guided first run or automatic generation.

  3. Configure: Use the `init` command for an interactive setup that writes a self-documenting `snapshot.config.ts` file.

  4. Generate Snapshot: Execute `snapshot generate` to create the LLM-ready snapshot directory.

  5. Validate Snapshot: Run `snapshot validate` to compare the snapshot against the current repository and check for drift.

  6. Explain Paths: Use `snapshot explain <path>` to understand why a specific file was included, skipped, or where it landed.

  7. Audit Reports: Generate `snapshot report` for health metrics, layer details, and secret audits.

  • LLM Context Generation
  • AI Agent Code Analysis
  • Code Review Automation
  • Developer Onboarding
  • Context Window Management
  • Codebase Auditing
  • Ensuring Context Freshness
  • Cross-Repository Comparison

codebase-snapshot Reviews

Loading...

Popular AI Tools Like codebase-snapshot

AICode

AI Apps

AICode is a spec-driven AI coding assistant designed to enhance software delivery speed and quality. It integrates with VS Code, allowing developers to manage specifications…

AI Coding Assistants

Ranked #160 for Explaining code

View Tool

AI Apps

Spec-driven AI coding assistant designed to enhance software delivery speed and quality. It integrates with VS Code, allowing developers to manage specifications…AICode is a spec-driven AI coding assistant designed to enhance software delivery speed and quality. It integrates with VS Code, allowing developers to manage specifications…

AI Coding Assistants
Ranked #160 for Explaining code

Swimm

AI Apps

Swimm is a platform that automatically documents your codebase, ensuring accurate and complete modernization. It combines deterministic analysis, AI, and expert validation to…

AI Coding Assistants

Ranked #39 for Writing technical documentation

View Tool

AI Apps

Platform that automatically documents your codebase, ensuring accurate and complete modernization. It combines deterministic analysis, AI, and expert validation to…Swimm is a platform that automatically documents your codebase, ensuring accurate and complete modernization. It combines deterministic analysis, AI, and expert validation to…

AI Coding Assistants
Ranked #39 for Writing technical documentation

Context7

AI Apps

Context7 provides up-to-date, version-specific documentation and code examples for libraries directly into AI coding tools like Cursor, Claude Code, and Codex. It ensures…

AI Coding Assistants

Ranked #14 for Prompt Engineers

View Tool

AI Apps

Provides up-to-date, version-specific documentation and code examples for libraries directly into AI coding tools like Cursor, Claude Code, and Codex. It ensures…Context7 provides up-to-date, version-specific documentation and code examples for libraries directly into AI coding tools like Cursor, Claude Code, and Codex. It ensures…

AI Coding Assistants
Ranked #14 for Prompt Engineers

Durabl

AI Apps

Durabl is a developer-focused foundation that addresses AI drift, ensuring code consistency and maintainability. It integrates with any LLM, providing a self-correcting codebase…

AI Coding Assistants

Ranked #183 in AI Code Review & Testing

View Tool

AI Apps

Developer-focused foundation that addresses AI drift, ensuring code consistency and maintainability. It integrates with any LLM, providing a self-correcting codebase…Durabl is a developer-focused foundation that addresses AI drift, ensuring code consistency and maintainability. It integrates with any LLM, providing a self-correcting codebase…

AI Coding Assistants
Ranked #183 in AI Code Review & Testing

CodeConvert AI is an AI-powered tool that translates source code across 60+ programming languages. It offers free tools to generate, explain, check, and refine code, making it…

AI Coding Assistants

Ranked #86 for Explaining code

View Tool

AI-powered tool that translates source code across 60+ programming languages. It offers free tools to generate, explain, check, and refine code, making it…CodeConvert AI is an AI-powered tool that translates source code across 60+ programming languages. It offers free tools to generate, explain, check, and refine code, making it…

AI Coding Assistants
Ranked #86 for Explaining code

Tabby is an open-source AI coding assistant designed to help developers code faster and smarter. It offers a self-hosted alternative to GitHub Copilot, providing flexibility and…

AI Coding Assistants

Ranked #37 for Explaining code

View Tool

Open-source AI coding assistant designed to help developers code faster and smarter. It offers a self-hosted alternative to GitHub Copilot, providing flexibility and…Tabby is an open-source AI coding assistant designed to help developers code faster and smarter. It offers a self-hosted alternative to GitHub Copilot, providing flexibility and…

AI Coding Assistants
Ranked #37 for Explaining code

JIT.codes is an AI code playground for developers to play, experiment, and build with AI. It offers a collaborative environment with features like real-time editing, code sharing,…

AI Coding Assistants
View Tool

AI code playground for developers to play, experiment, and build with AI. It offers a collaborative environment with features like real-time editing, code sharing,…JIT.codes is an AI code playground for developers to play, experiment, and build with AI. It offers a collaborative environment with features like real-time editing, code sharing,…

AI Coding Assistants
See the Top 250 AI Apps

Qarinah

AI Apps

Qarinah is a project memory tool that retains coding decisions, code relationships, and tool outcomes. It allows coding agents to resume sessions with full context, ensuring…

AI Coding Assistants

Ranked #242 for Explaining code

View Tool

AI Apps

Project memory tool that retains coding decisions, code relationships, and tool outcomes. It allows coding agents to resume sessions with full context, ensuring…Qarinah is a project memory tool that retains coding decisions, code relationships, and tool outcomes. It allows coding agents to resume sessions with full context, ensuring…

AI Coding Assistants
Ranked #242 for Explaining code
1 of 8