codebase-snapshot 0.22.3 → 0.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -30,6 +30,17 @@ deprecated with an explanatory message instead. `latest` has pointed at 0.9.0 si
30
30
 
31
31
  ---
32
32
 
33
+ ## 0.22.4
34
+
35
+ **SEO discovery patch: comparison hub and a concrete distribution checklist.**
36
+
37
+ - New [best codebase context tools](codebase-context-tools.md) comparison: Repomix, Gitingest, code2prompt, CodeNib, SigMap, riprewire, readfirst, ContextPacker and codebase-snapshot compared by job, not by feature checklist.
38
+ - Linked the hub from the repo-to-LLM, codebase-to-Markdown and codebase-prompt guides, the docs index and site navigation.
39
+ - Added `.github/SEO-CHECKLIST.md` with Search Console/Bing steps, target URLs, directory updates, backlink targets, weekly measurement and explicit don'ts.
40
+ - No runtime behavior changed.
41
+
42
+ ---
43
+
33
44
  ## 0.22.3
34
45
 
35
46
  **SEO and discovery patch: query-owned guides, clearer titles and package metadata.**
package/README.md CHANGED
@@ -237,7 +237,7 @@ Everything an agent needs is available as data, and the tool can install its own
237
237
  ```bash
238
238
  npx codebase-snapshot describe --format json # contract: workflow, options, exit codes
239
239
  npx codebase-snapshot skill --install # into .agents, .claude and .cursor
240
- npx -y codebase-snapshot@0.22.3 mcp # or serve it over MCP
240
+ npx -y codebase-snapshot@0.22.4 mcp # or serve it over MCP
241
241
  ```
242
242
 
243
243
  An agent told only "use `npx codebase-snapshot`" can read the contract, follow its ordered
package/dist/bin.js CHANGED
@@ -2895,7 +2895,7 @@ function verifySnapshotSignature(snapshotDir) {
2895
2895
 
2896
2896
  // src/version.ts
2897
2897
  var GENERATOR_NAME = "codebase-snapshot";
2898
- var GENERATOR_VERSION = "0.22.3";
2898
+ var GENERATOR_VERSION = "0.22.4";
2899
2899
  var SCHEMA_VERSION = "3.0.0";
2900
2900
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
2901
2901
  function isOurGeneratorName(name) {
@@ -4684,7 +4684,7 @@ function verifySnapshotSignature(snapshotDir) {
4684
4684
 
4685
4685
  // src/version.ts
4686
4686
  var GENERATOR_NAME = "codebase-snapshot";
4687
- var GENERATOR_VERSION = "0.22.3";
4687
+ var GENERATOR_VERSION = "0.22.4";
4688
4688
  var SCHEMA_VERSION = "3.0.0";
4689
4689
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
4690
4690
  function isOurGeneratorName(name) {
package/dist/cli.cjs CHANGED
@@ -2913,7 +2913,7 @@ function verifySnapshotSignature(snapshotDir) {
2913
2913
 
2914
2914
  // src/version.ts
2915
2915
  var GENERATOR_NAME = "codebase-snapshot";
2916
- var GENERATOR_VERSION = "0.22.3";
2916
+ var GENERATOR_VERSION = "0.22.4";
2917
2917
  var SCHEMA_VERSION = "3.0.0";
2918
2918
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
2919
2919
  function isOurGeneratorName(name) {
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import './chunk-WMEZFLUT.js';
2
- import { shouldCheck, checkForUpdate, GENERATOR_VERSION, cacheFilePath, formatUpdateNotice, installKind, buildAgentContract, startWebServer, startHttpTransport, buildTools, runStdioServer, parseRemoteSource, assertPublicHost, cloneRepository, makeCloneDirectory, loadConfigFileDetailed, assertServerSafeConfig, resolveConfig, validateSnapshot, readConfinedText, auditSnapshot, describeManifestShapeProblem, loadManifest, buildLiveIndex, resolveImpactChanges, computeImpact, DEFAULT_MAX_PROGRAM_FILES, findMultipleSymbolReferences, planTestRun, renderImpactText, runTestPlan, briefFromPaths, resolveDiffBase, filterAndRedactDiff, matchesExclude, defaultIgnoreReason, isSensitivePath, findSection, parsePartSections, buildBrief, explainPath, compareManifests, renderDiffText, generateSnapshot, getGitInfo, loadSigningKey, SIGNATURE_FILE, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, COMMAND_OPTION_SCOPE, commandsForOption, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, installPreCommitHook, PromptCancelled, SKILL_NAME, renderSkill, resolveLatest, isNewer, updateCommand, findConfigFile, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, firstRunMessage, escapeControls, stripJsonComments, parseByteSize, gitignorePath, appendGitignoreEntries, runWithStdoutCapture, inlineCode, findSecretInPath, MIN_MAX_PART_TOKENS, MIN_MAX_PART_BYTES, renderContractText, renderExplainText } from './chunk-7QUBMV3X.js';
3
- export { buildAgentContract } from './chunk-7QUBMV3X.js';
2
+ import { shouldCheck, checkForUpdate, GENERATOR_VERSION, cacheFilePath, formatUpdateNotice, installKind, buildAgentContract, startWebServer, startHttpTransport, buildTools, runStdioServer, parseRemoteSource, assertPublicHost, cloneRepository, makeCloneDirectory, loadConfigFileDetailed, assertServerSafeConfig, resolveConfig, validateSnapshot, readConfinedText, auditSnapshot, describeManifestShapeProblem, loadManifest, buildLiveIndex, resolveImpactChanges, computeImpact, DEFAULT_MAX_PROGRAM_FILES, findMultipleSymbolReferences, planTestRun, renderImpactText, runTestPlan, briefFromPaths, resolveDiffBase, filterAndRedactDiff, matchesExclude, defaultIgnoreReason, isSensitivePath, findSection, parsePartSections, buildBrief, explainPath, compareManifests, renderDiffText, generateSnapshot, getGitInfo, loadSigningKey, SIGNATURE_FILE, formatNumber, isDiscoveryMode, ARTIFACT_NAMES, COMMAND_OPTION_SCOPE, commandsForOption, getPreset, unknownPresetMessage, GENERATOR_NAME, runInit, installPreCommitHook, PromptCancelled, SKILL_NAME, renderSkill, resolveLatest, isNewer, updateCommand, findConfigFile, planFirstRun, isEffectivelyEmpty, isInteractive, defaultIO, hasPriorSnapshot, DEFAULT_ANSWERS, firstRunMessage, escapeControls, stripJsonComments, parseByteSize, gitignorePath, appendGitignoreEntries, runWithStdoutCapture, inlineCode, findSecretInPath, MIN_MAX_PART_TOKENS, MIN_MAX_PART_BYTES, renderContractText, renderExplainText } from './chunk-DJQEU7RR.js';
3
+ export { buildAgentContract } from './chunk-DJQEU7RR.js';
4
4
  import { spawnSync } from 'child_process';
5
5
  import * as fs4 from 'fs';
6
6
  import * as path4 from 'path';
package/dist/index.cjs CHANGED
@@ -4702,7 +4702,7 @@ function verifySnapshotSignature(snapshotDir) {
4702
4702
 
4703
4703
  // src/version.ts
4704
4704
  var GENERATOR_NAME = "codebase-snapshot";
4705
- var GENERATOR_VERSION = "0.22.3";
4705
+ var GENERATOR_VERSION = "0.22.4";
4706
4706
  var SCHEMA_VERSION = "3.0.0";
4707
4707
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
4708
4708
  function isOurGeneratorName(name) {
package/dist/index.d.cts CHANGED
@@ -742,7 +742,7 @@ declare function validateSnapshot(configInput: ResolvedSnapshotConfig | Snapshot
742
742
  * `package.json` carries the same version; `npm run verify` compares the two.
743
743
  */
744
744
  declare const GENERATOR_NAME = "codebase-snapshot";
745
- declare const GENERATOR_VERSION = "0.22.3";
745
+ declare const GENERATOR_VERSION = "0.22.4";
746
746
  /**
747
747
  * The manifest and ownership-marker schema this build writes and understands.
748
748
  *
package/dist/index.d.ts CHANGED
@@ -742,7 +742,7 @@ declare function validateSnapshot(configInput: ResolvedSnapshotConfig | Snapshot
742
742
  * `package.json` carries the same version; `npm run verify` compares the two.
743
743
  */
744
744
  declare const GENERATOR_NAME = "codebase-snapshot";
745
- declare const GENERATOR_VERSION = "0.22.3";
745
+ declare const GENERATOR_VERSION = "0.22.4";
746
746
  /**
747
747
  * The manifest and ownership-marker schema this build writes and understands.
748
748
  *
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export { ARTIFACT_NAMES, CHECK_INTERVAL_MS, CONFIG_KEYS, DEFAULT_ANSWERS, DEFAULT_MAX_PROGRAM_FILES, DEFAULT_SECRET_PATTERNS, FAILURE_INTERVAL_MS, GENERATOR_NAME, GENERATOR_VERSION, HOOK_MARKER, LANGUAGE_PROFILES, MIN_MAX_PART_BYTES, MIN_MAX_PART_TOKENS, PACKAGE_LATEST_URL, PRESETS, PromptBack, PromptCancelled, REQUEST_TIMEOUT_MS, SCHEMA_VERSION, UP_TO_DATE_INTERVAL_MS, anchorForPath, appendGitignoreEntries, assertPublicHost, assertReplaceable, assertServerSafeConfig, assertUsableConfigInput, assertUsableRef, auditSnapshot, buildBrief, buildImportResolver, bytesForTokens, cacheDirectory, cacheFilePath, checkForUpdate, classifyKind, classifyLayer, cloneRepository, collectFiles, compareManifests, computeImpact, configDigest, countInvalidUtf8Bytes, countLines, crc32, createScopedProgram, decodeText, defineConfig, detectLanguage, detectPreset, displayPath, displayWidth, enforceBudget, estimateTokens, explainPath, fenceForContent, fenceForText, fetchLatestVersion, findMultipleSymbolReferences, findSecretInPath, findSymbolReferences, firstRunMessage, formatTokens, formatUpdateNotice, generateProjectTree, generateSarifReport, generateSnapshot, generateSnapshotAsync, getGitInfo, getPreset, gitignorePath, globToRegExp, hasPriorSnapshot, importsChangedFile, importsOfFile, importsOfText, installKind, installPreCommitHook, isBinaryBuffer, isBinaryExtension, isBinaryFile, isEffectivelyEmpty, isInteractive, isNewer, isPrivateHost, isResolvedConfig, isSensitivePath, isSkeletonizable, isTsxFileName, listPresetNames, loadConfigFile, loadConfigFileDetailed, loadManifest, lockPathFor, makeCloneDirectory, markResolvedConfig, matchRule, matchesExclude, normalizeResolvedConfig, parseByteSize, parseRemoteSource, partitionFiles, planFirstRun, planTestRun, profileForPath, releaseAbandonedRun, renderConfig, renderDiffText, renderExplainText, renderImpactText, renumberParts, resolveChangedScope, resolveConfig, resolveDiffBase, resolveDiffChangedLines, resolveImpactChanges, resolveLatest, resolvePreciseChangedCallers, resolveSafeOutputDirs, resolveSpecifier, resolveSpecifierDetailed, runInit, runTestPlan, scanAndRedactSecrets, shouldCheck, skeletonizeTypeScript, startWebServer, stripJsonComments, summarizeJson, summarizeMarkdown, summarizeTypeScriptSource, summarizeWithProfile, supportsTypeScriptImports, tokenAllowedForHost, treeTruncationWarnings, truncatePreview, truncateToBytes, tsconfigFromWorkspace, tsconfigPathsFor, updateCommand, validateSnapshot, walkFiles, workerEntry, workspaceResolutionFor, wrapLines, writeZip } from './chunk-7QUBMV3X.js';
1
+ export { ARTIFACT_NAMES, CHECK_INTERVAL_MS, CONFIG_KEYS, DEFAULT_ANSWERS, DEFAULT_MAX_PROGRAM_FILES, DEFAULT_SECRET_PATTERNS, FAILURE_INTERVAL_MS, GENERATOR_NAME, GENERATOR_VERSION, HOOK_MARKER, LANGUAGE_PROFILES, MIN_MAX_PART_BYTES, MIN_MAX_PART_TOKENS, PACKAGE_LATEST_URL, PRESETS, PromptBack, PromptCancelled, REQUEST_TIMEOUT_MS, SCHEMA_VERSION, UP_TO_DATE_INTERVAL_MS, anchorForPath, appendGitignoreEntries, assertPublicHost, assertReplaceable, assertServerSafeConfig, assertUsableConfigInput, assertUsableRef, auditSnapshot, buildBrief, buildImportResolver, bytesForTokens, cacheDirectory, cacheFilePath, checkForUpdate, classifyKind, classifyLayer, cloneRepository, collectFiles, compareManifests, computeImpact, configDigest, countInvalidUtf8Bytes, countLines, crc32, createScopedProgram, decodeText, defineConfig, detectLanguage, detectPreset, displayPath, displayWidth, enforceBudget, estimateTokens, explainPath, fenceForContent, fenceForText, fetchLatestVersion, findMultipleSymbolReferences, findSecretInPath, findSymbolReferences, firstRunMessage, formatTokens, formatUpdateNotice, generateProjectTree, generateSarifReport, generateSnapshot, generateSnapshotAsync, getGitInfo, getPreset, gitignorePath, globToRegExp, hasPriorSnapshot, importsChangedFile, importsOfFile, importsOfText, installKind, installPreCommitHook, isBinaryBuffer, isBinaryExtension, isBinaryFile, isEffectivelyEmpty, isInteractive, isNewer, isPrivateHost, isResolvedConfig, isSensitivePath, isSkeletonizable, isTsxFileName, listPresetNames, loadConfigFile, loadConfigFileDetailed, loadManifest, lockPathFor, makeCloneDirectory, markResolvedConfig, matchRule, matchesExclude, normalizeResolvedConfig, parseByteSize, parseRemoteSource, partitionFiles, planFirstRun, planTestRun, profileForPath, releaseAbandonedRun, renderConfig, renderDiffText, renderExplainText, renderImpactText, renumberParts, resolveChangedScope, resolveConfig, resolveDiffBase, resolveDiffChangedLines, resolveImpactChanges, resolveLatest, resolvePreciseChangedCallers, resolveSafeOutputDirs, resolveSpecifier, resolveSpecifierDetailed, runInit, runTestPlan, scanAndRedactSecrets, shouldCheck, skeletonizeTypeScript, startWebServer, stripJsonComments, summarizeJson, summarizeMarkdown, summarizeTypeScriptSource, summarizeWithProfile, supportsTypeScriptImports, tokenAllowedForHost, treeTruncationWarnings, truncatePreview, truncateToBytes, tsconfigFromWorkspace, tsconfigPathsFor, updateCommand, validateSnapshot, walkFiles, workerEntry, workspaceResolutionFor, wrapLines, writeZip } from './chunk-DJQEU7RR.js';
package/dist/mcp.cjs CHANGED
@@ -3157,7 +3157,7 @@ function verifySnapshotSignature(snapshotDir) {
3157
3157
 
3158
3158
  // src/version.ts
3159
3159
  var GENERATOR_NAME = "codebase-snapshot";
3160
- var GENERATOR_VERSION = "0.22.3";
3160
+ var GENERATOR_VERSION = "0.22.4";
3161
3161
  var SCHEMA_VERSION = "3.0.0";
3162
3162
  var LEGACY_GENERATOR_NAMES = ["@ankurhalder/codebase-snapshot"];
3163
3163
  function isOurGeneratorName(name) {
package/dist/mcp.js CHANGED
@@ -1,2 +1,2 @@
1
1
  import './chunk-WMEZFLUT.js';
2
- export { ERROR_CODES, LEGACY_PROTOCOL_VERSIONS, MAX_LINE_BYTES, METHOD, MODERN_PROTOCOL_VERSIONS, REPORT_RESOURCE_URIS, RESOURCE_TEMPLATE_URIS, SERVER_INSTRUCTIONS, STATIC_RESOURCE_URIS, SUPPORTED_PROTOCOL_VERSIONS, buildPrompts, buildResourceProvider, buildTools, classifyRequest, coerceNumericStrings, createLineReader, createMcpServer, createServer, createSession, createWriter, findSection, generateInWorker, generateToken, inspectModernMeta, isCommentStrippable, negotiateLegacyVersion, parsePartSections, runStdioServer, startHttpTransport, stripComments, validateArguments, windowText } from './chunk-7QUBMV3X.js';
2
+ export { ERROR_CODES, LEGACY_PROTOCOL_VERSIONS, MAX_LINE_BYTES, METHOD, MODERN_PROTOCOL_VERSIONS, REPORT_RESOURCE_URIS, RESOURCE_TEMPLATE_URIS, SERVER_INSTRUCTIONS, STATIC_RESOURCE_URIS, SUPPORTED_PROTOCOL_VERSIONS, buildPrompts, buildResourceProvider, buildTools, classifyRequest, coerceNumericStrings, createLineReader, createMcpServer, createServer, createSession, createWriter, findSection, generateInWorker, generateToken, inspectModernMeta, isCommentStrippable, negotiateLegacyVersion, parsePartSections, runStdioServer, startHttpTransport, stripComments, validateArguments, windowText } from './chunk-DJQEU7RR.js';
package/docs/cli.md CHANGED
@@ -104,7 +104,7 @@ Exit `0` when the snapshot passes its own integrity check, `1` when it does not.
104
104
 
105
105
  ```
106
106
  📸 Generating snapshot for: /path/to/repo
107
- Branch: main (fallback) | Part budget: 300 KB | Generator: 0.22.3 (project dependency ^0.22.3)
107
+ Branch: main (fallback) | Part budget: 300 KB | Generator: 0.22.4 (project dependency ^0.22.4)
108
108
 
109
109
  ✅ Snapshot generated in 0.14s:
110
110
  - Tracked files: 121 included of 128 paths found — 7 skipped (default-ignore 5, binary 1, sensitive-file 1); every one is listed in snapshot/reports/audit.md
@@ -302,7 +302,7 @@ The whole first run in one command, with defaults and no prompts. This is the sa
302
302
  🚀 Setup for: /path/to/repo
303
303
  ✅ Created snapshot.config.json (preset: nextjs)
304
304
  Added npm scripts: snapshot, snapshot:validate
305
- Added devDependency: codebase-snapshot ^0.22.3
305
+ Added devDependency: codebase-snapshot ^0.22.4
306
306
  Added to .gitignore: /snapshot/, /snapshot.tmp/
307
307
  ⏳ Installing dependencies…
308
308
  ✅ Installed dependencies (npm install, 2.1s)
@@ -354,7 +354,7 @@ It also has three side effects on files you own, and it says so when it does the
354
354
  ```
355
355
  ✅ Created snapshot.config.json (preset: node-lib)
356
356
  Added npm scripts: snapshot, snapshot:validate
357
- Added devDependency: codebase-snapshot ^0.22.3
357
+ Added devDependency: codebase-snapshot ^0.22.4
358
358
  Added to .gitignore: /snapshot/, /snapshot.tmp/
359
359
  ```
360
360
 
@@ -504,8 +504,8 @@ agent](agent.md).
504
504
  Ask the npm registry whether a newer release exists, and print the version it compared against:
505
505
 
506
506
  ```bash
507
- npx codebase-snapshot@0.22.3 update # is this build current? print the answer
508
- npx codebase-snapshot@0.22.3 update --format json
507
+ npx codebase-snapshot@0.22.4 update # is this build current? print the answer
508
+ npx codebase-snapshot@0.22.4 update --format json
509
509
  ```
510
510
 
511
511
  ```text
@@ -0,0 +1,84 @@
1
+ # Best codebase context tools for AI agents
2
+
3
+ There is no single “best” tool. There are **different jobs**, and the tools that win one job often lose another.
4
+
5
+ This page compares the main open-source options by the question they answer, not by a feature checklist. Every tool here is useful; the point is fit.
6
+
7
+ ## Pick by the job
8
+
9
+ | Job | Best fit | Why |
10
+ | :-- | :-- | :-- |
11
+ | Give a whole repository to a chat or a one-off review | **Repomix**, **Gitingest**, **code2prompt** | Simple, portable text output; low setup |
12
+ | Find the lines that answer a question, live | **CodeNib**, **SigMap**, **riprewire** | Indexed symbols/call graph, line-level retrieval |
13
+ | Map a repository and its call paths | **riprewire**, **SigMap** | Ranked map, callers, impact |
14
+ | Per-file rules, risks and checks | **readfirst** | A committed map of what the team knows |
15
+ | Portable, budgeted, indexed handoff with line follow-up | **codebase-snapshot** | Manifest, parts, line-numbered context and MCP |
16
+ | Query-to-files API with no index | **ContextPacker** | LLM file selection, hosted API |
17
+
18
+ ## The comparison
19
+
20
+ | Tool | Primary shape | Strongest at | Where it is weaker |
21
+ | :-- | :-- | :-- | :-- |
22
+ | [Repomix](https://github.com/yamadashy/repomix) | One repo pack | Simplicity, adoption, broad formats | Task selection; a dump is not a budgeted answer |
23
+ | [Gitingest](https://github.com/cyclotruc/gitingest) | URL-to-text digest | Zero-install sharing | Less control over budgets, manifests and agent reads |
24
+ | [code2prompt](https://github.com/mufeedvh/code2prompt) | Prompt-oriented pack | Templates and a small CLI | Not a persistent indexed artefact |
25
+ | [CodeNib](https://github.com/sysevol-ai/CodeNib) | Live code graph | Line recall, test-impact guard | Newer project; setup is Python/SCIP-oriented |
26
+ | [SigMap](https://sigmap.io) | Deterministic grounding | Language coverage, token reduction, MCP | A live index, not a portable snapshot |
27
+ | [riprewire](https://github.com/redhat-et/ripwire) | Repo map + call graph | Orientation, impact, edit checks | Map-first; the full code evidence still comes from reads |
28
+ | [readfirst](https://github.com/jeonghun917/readfirst) | Committed per-file map | Team rules, risks, checks, tests | Requires maintaining the map; not a general repo pack |
29
+ | [ContextPacker](https://contextpacker.com/) | Hosted query API | File selection without an index | Service/API shape; not an offline artefact |
30
+ | **codebase-snapshot** | Snapshot + manifest + MCP | Portable budgeted context, line windows, validated freshness | Retrieval is narrower than a full semantic index |
31
+
32
+ ## What “context” actually means
33
+
34
+ Three different artefacts are often compared as if they were the same:
35
+
36
+ 1. **A pack** — the repository as text. Easy to share; hard to keep within a token budget and hard to cite.
37
+ 2. **An index** — a live structure that answers “where is X?” or “what calls X?”. Fast; not portable.
38
+ 3. **A task context** — the smallest evidence that answers one question. Best for agents; needs a selection layer.
39
+
40
+ Most tools are strong in one category. The mistake is buying a pack and expecting retrieval, or buying an index and expecting a portable artefact.
41
+
42
+ ## Where codebase-snapshot fits
43
+
44
+ It is the **portable, budgeted artefact** with a live follow-up path:
45
+
46
+ - `generate` writes parts under a byte budget and a manifest that names every file, skip and truncation.
47
+ - `validate` fails when the tree has moved.
48
+ - `snapshot_context` returns line-numbered evidence and explicit ranges inside a token budget.
49
+ - `guard` reports consumers, tests, routes and documentation gaps an edit left untouched.
50
+ - The MCP server exposes the same index live, without requiring a generated snapshot.
51
+
52
+ That combination is useful when you need to **hand context to another model, attach it to a review, or re-read it later** — and still ask for exact lines in an agent session.
53
+
54
+ It is not the best choice for semantic search, 38-language breadth, or a pure call-graph map. Use CodeNib, SigMap or riprewire for those jobs.
55
+
56
+ ## How to evaluate, not just compare
57
+
58
+ Run the same three tasks through each candidate:
59
+
60
+ 1. **Whole-repo onboarding** — “explain the architecture.”
61
+ 2. **Targeted change** — “add rate limiting to login.”
62
+ 3. **Review** — “what did this diff leave untouched?”
63
+
64
+ Measure:
65
+
66
+ - tokens used, including the tool schema;
67
+ - target-file and target-line coverage;
68
+ - whether omissions are named;
69
+ - whether the answer cites lines;
70
+ - whether the context is stale;
71
+ - setup time.
72
+
73
+ A tool that wins the benchmark but loses the workflow is not the best tool for you.
74
+
75
+ ## Shortlist
76
+
77
+ - **Want the simplest whole-repo pack?** Repomix or Gitingest.
78
+ - **Want the best line-level retrieval?** CodeNib or SigMap.
79
+ - **Want a repo map and impact?** riprewire.
80
+ - **Want team rules and checks per file?** readfirst.
81
+ - **Want a portable, budgeted, line-aware snapshot?** codebase-snapshot.
82
+ - **Want a hosted query-to-files API?** ContextPacker.
83
+
84
+ → [Repo to LLM](repo-to-llm.md) · [Codebase to Markdown](codebase-to-markdown.md) · [Codebase prompt](codebase-prompt.md) · [vs repomix](vs-repomix.md) · [vs gitingest](vs-gitingest.md) · [vs code2prompt](vs-code2prompt.md)
@@ -94,4 +94,4 @@ That last point matters. A model that says “I did not see the route definition
94
94
  4. **No acceptance criteria.** “Done” is not defined.
95
95
  5. **No verification step.** The change is plausible, not checked.
96
96
 
97
- → [Repo to LLM](repo-to-llm.md) · [Codebase to Markdown](codebase-to-markdown.md) · [Briefs](brief.md) · [snapshot_context](answer.md) · [How to feed a repo to Claude](how-to-feed-a-repo-to-claude.md)
97
+ → [Best codebase context tools](codebase-context-tools.md) · [Repo to LLM](repo-to-llm.md) · [Codebase to Markdown](codebase-to-markdown.md) · [Briefs](brief.md) · [snapshot_context](answer.md) · [How to feed a repo to Claude](how-to-feed-a-repo-to-claude.md)
@@ -77,4 +77,4 @@ For a single question, prefer [a slice](slice.md) or the live [snapshot_context]
77
77
  - [ ] Read `incomplete[]` before trusting a file.
78
78
  - [ ] Validate before handing the snapshot to another model.
79
79
 
80
- → [Generate a snapshot](cli.md) · [Token budgets](budget.md) · [Slices](slice.md) · [Compare with repomix](vs-repomix.md) · [Repo to LLM](repo-to-llm.md)
80
+ → [Generate a snapshot](cli.md) · [Token budgets](budget.md) · [Slices](slice.md) · [Compare codebase context tools](codebase-context-tools.md) · [Repo to LLM](repo-to-llm.md)
package/docs/contents.md CHANGED
@@ -53,6 +53,8 @@ Every page on this site, grouped by the job you are doing. If you are new, start
53
53
 
54
54
  ## Comparisons
55
55
 
56
+ - [Best codebase context tools](codebase-context-tools.md) — Repomix, Gitingest, CodeNib, SigMap,
57
+ riprewire, readfirst, ContextPacker and codebase-snapshot compared by job.
56
58
  - [vs repomix](vs-repomix.md) — two ways to pack a repository, and when repomix is the better fit.
57
59
  - [vs gitingest](vs-gitingest.md) — a CLI artefact versus a URL-to-text trick.
58
60
  - [vs code2prompt](vs-code2prompt.md) — a prompt versus an indexed artefact.
package/docs/deploy.md CHANGED
@@ -67,8 +67,8 @@ After=network.target
67
67
  Type=oneshot
68
68
  User=deploy
69
69
  WorkingDirectory=/srv/app
70
- ExecStart=/usr/bin/npx -y codebase-snapshot@0.22.3 generate --cwd /srv/app
71
- ExecStartPost=/usr/bin/npx -y codebase-snapshot@0.22.3 validate --cwd /srv/app
70
+ ExecStart=/usr/bin/npx -y codebase-snapshot@0.22.4 generate --cwd /srv/app
71
+ ExecStartPost=/usr/bin/npx -y codebase-snapshot@0.22.4 validate --cwd /srv/app
72
72
  ```
73
73
 
74
74
  ```ini
package/docs/guard.md CHANGED
@@ -44,7 +44,7 @@ and use the hook block below.
44
44
  The hook runs a pinned CLI, so the machine needs Node.js 18+ and `npx`:
45
45
 
46
46
  ~~~bash
47
- npx -y codebase-snapshot@0.22.3 --version
47
+ npx -y codebase-snapshot@0.22.4 --version
48
48
  ~~~
49
49
 
50
50
  ## Run it
@@ -101,7 +101,7 @@ The plugin install above already wires this hook. Use this block only for a manu
101
101
  "hooks": [
102
102
  {
103
103
  "type": "command",
104
- "command": "npx -y codebase-snapshot@0.22.3 guard --hook claude",
104
+ "command": "npx -y codebase-snapshot@0.22.4 guard --hook claude",
105
105
  "timeout": 10
106
106
  }
107
107
  ]
@@ -120,7 +120,7 @@ The plugin install above already wires this hook. Use this block only for a manu
120
120
  "postToolUse": [
121
121
  {
122
122
  "type": "command",
123
- "command": "npx -y codebase-snapshot@0.22.3 guard --hook copilot",
123
+ "command": "npx -y codebase-snapshot@0.22.4 guard --hook copilot",
124
124
  "timeoutSec": 10
125
125
  }
126
126
  ]
@@ -139,7 +139,7 @@ The plugin install above already wires this hook. Use this block only for a manu
139
139
  "hooks": [
140
140
  {
141
141
  "type": "command",
142
- "command": "npx -y codebase-snapshot@0.22.3 guard --hook codex",
142
+ "command": "npx -y codebase-snapshot@0.22.4 guard --hook codex",
143
143
  "timeout": 10
144
144
  }
145
145
  ]
package/docs/mcp.md CHANGED
@@ -10,7 +10,7 @@ walk — that the client sees.
10
10
  ## Start it
11
11
 
12
12
  ```bash
13
- npx -y codebase-snapshot@0.22.3 mcp
13
+ npx -y codebase-snapshot@0.22.4 mcp
14
14
  ```
15
15
 
16
16
  The server serves the directory it was started in. `--cwd <path>` points it elsewhere, and that
@@ -25,7 +25,7 @@ Claude Desktop and Cursor:
25
25
  "mcpServers": {
26
26
  "codebase-snapshot": {
27
27
  "command": "npx",
28
- "args": ["-y", "codebase-snapshot@0.22.3", "mcp", "--cwd", "/absolute/path/to/repo"]
28
+ "args": ["-y", "codebase-snapshot@0.22.4", "mcp", "--cwd", "/absolute/path/to/repo"]
29
29
  }
30
30
  }
31
31
  }
@@ -34,7 +34,7 @@ Claude Desktop and Cursor:
34
34
  Claude Code registers the same thing from a shell:
35
35
 
36
36
  ```bash
37
- claude mcp add codebase-snapshot -- npx -y codebase-snapshot@0.22.3 mcp --cwd /absolute/path/to/repo
37
+ claude mcp add codebase-snapshot -- npx -y codebase-snapshot@0.22.4 mcp --cwd /absolute/path/to/repo
38
38
  ```
39
39
 
40
40
  On Windows, wrap the command as `cmd /c npx` with the same arguments — `npx` is a `.cmd` shim
@@ -43,7 +43,7 @@ there, and clients that spawn without a shell cannot execute it directly.
43
43
  ## Over HTTP, for clients that cannot spawn a process
44
44
 
45
45
  ```bash
46
- npx -y codebase-snapshot@0.22.3 mcp --http --port 4789
46
+ npx -y codebase-snapshot@0.22.4 mcp --http --port 4789
47
47
  ```
48
48
 
49
49
  This is the Streamable HTTP shape: POST one JSON-RPC message to `/mcp` and read the JSON-RPC
@@ -69,4 +69,4 @@ Inside an MCP client, `snapshot_context` returns line-numbered evidence and `sna
69
69
  5. Run the tests the impact report names.
70
70
  6. Validate or regenerate before the next task.
71
71
 
72
- → [Codebase to Markdown](codebase-to-markdown.md) · [Codebase prompt](codebase-prompt.md) · [LLM codebase context](llm-codebase-context.md) · [MCP server for a codebase](mcp-server-for-codebase.md) · [Briefs](brief.md)
72
+ → [Best codebase context tools](codebase-context-tools.md) · [Codebase to Markdown](codebase-to-markdown.md) · [Codebase prompt](codebase-prompt.md) · [LLM codebase context](llm-codebase-context.md) · [MCP server for a codebase](mcp-server-for-codebase.md) · [Briefs](brief.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebase-snapshot",
3
- "version": "0.22.3",
3
+ "version": "0.22.4",
4
4
  "mcpName": "io.github.ankurhalder/codebase-snapshot",
5
5
  "description": "Codebase snapshot for AI agents: turn a repo into token-budgeted Markdown, a manifest and line-numbered context; 7 MCP tools for Claude, ChatGPT, Cursor and CI.",
6
6
  "keywords": [