codebase-snapshot 0.20.8 → 0.20.12
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 +67 -6
- package/README.md +15 -16
- package/SECURITY.md +0 -1
- package/dist/bin.js +8200 -6854
- package/dist/{chunk-RVWDPCJ6.js → chunk-TUKY6KLH.js} +8707 -6963
- package/dist/chunk-WMEZFLUT.js +1 -0
- package/dist/cli.cjs +10993 -9653
- package/dist/cli.d.cts +2 -2
- package/dist/cli.d.ts +2 -2
- package/dist/cli.js +68 -19
- package/dist/{generate-worker-CkWFKtf0.d.ts → generate-worker-CRMESc0b.d.ts} +24 -11
- package/dist/{generate-worker-Wne8FzN5.d.cts → generate-worker-DMzNbsAW.d.cts} +24 -11
- package/dist/index.cjs +8334 -6753
- package/dist/index.d.cts +66 -40
- package/dist/index.d.ts +66 -40
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +5026 -10058
- package/dist/mcp.d.cts +17 -5
- package/dist/mcp.d.ts +17 -5
- package/dist/mcp.js +2 -2
- package/dist/{types-CykWdR6V.d.cts → types-C5ytHMYz.d.cts} +10 -0
- package/dist/{types-CykWdR6V.d.ts → types-C5ytHMYz.d.ts} +10 -0
- package/docs/benchmarks.md +9 -6
- package/docs/budget.md +3 -2
- package/docs/cli.md +22 -21
- package/docs/configuration.md +17 -16
- package/docs/deploy.md +2 -2
- package/docs/health.md +1 -1
- package/docs/how-to-feed-a-repo-to-claude.md +8 -11
- package/docs/mcp.md +22 -16
- package/docs/migration.md +42 -43
- package/docs/output.md +2 -1
- package/docs/security-review.md +35 -8
- package/docs/tools.md +4 -3
- package/docs/vs-gitingest.md +2 -2
- package/docs/vs-repomix.md +7 -6
- package/docs/workspace.md +4 -2
- package/package.json +1 -1
- package/dist/chunk-STWEFBES.js +0 -459
package/docs/migration.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
# Migrating
|
|
1
|
+
# Migrating to 0.20.12
|
|
2
2
|
|
|
3
3
|
Nothing was removed. Every command, flag, config key and MCP tool that existed in 0.12.14 still
|
|
4
|
-
works
|
|
5
|
-
|
|
4
|
+
works. This page maps what was added and the behaviour changes that matter when upgrading an old
|
|
5
|
+
checkout, config or snapshot.
|
|
6
6
|
|
|
7
7
|
## New commands
|
|
8
8
|
|
|
9
9
|
| Command | Since | What it does |
|
|
10
10
|
| :--- | :--- | :--- |
|
|
11
|
-
| `snapshot health` | 0.12.15 | Audits the written snapshot: hashes, artifacts, secrets, host paths, tokens, freshness, signature. `--strict`, `--format json`. |
|
|
11
|
+
| `snapshot health` | 0.12.15 | Audits the written snapshot: hashes, artifacts, secrets, host paths, tokens, freshness, signature. `--strict`, `--format json`, `--deep`, `--all-members`. |
|
|
12
12
|
| `snapshot serve` | 0.12.19 | A browser page to generate, preview and download a snapshot; MCP on the same port. |
|
|
13
13
|
| `snapshot mcp --http` | 0.12.18 | MCP over Streamable HTTP instead of stdio; `GET /sse` for legacy clients since 0.12.29. |
|
|
14
|
+
| `snapshot update` | 0.18.0 | Bypasses the update cache, prints the registry answer, exits 0 current / 1 newer / 2 unreachable. |
|
|
14
15
|
|
|
15
16
|
## New `generate` flags
|
|
16
17
|
|
|
@@ -18,7 +19,7 @@ added, so a reader can find the feature they need without reading a hundred chan
|
|
|
18
19
|
| :--- | :--- | :--- |
|
|
19
20
|
| `--remote <url>` | 0.12.20 | Shallow, SSRF-safe clone of a public repository; provenance in the manifest. |
|
|
20
21
|
| `--ref <branch>` | 0.12.20 | Branch or tag for `--remote`. |
|
|
21
|
-
| `--allow-private` | 0.12.20 |
|
|
22
|
+
| `--allow-private` | 0.12.20 | Explicit override for private addresses and `file:` URLs. |
|
|
22
23
|
| `--keep-clone` | 0.12.20 | Keep the temporary clone. |
|
|
23
24
|
| `--include-diffs` | 0.12.24 | `reports/diff.md` from the uncommitted diff. |
|
|
24
25
|
| `--include-logs <n>` | 0.12.24 | `reports/log.md` with the last n commits. |
|
|
@@ -26,7 +27,7 @@ added, so a reader can find the feature they need without reading a hundred chan
|
|
|
26
27
|
| `--delta <path>` | 0.12.25 | Only what changed since a base snapshot, plus its importers. |
|
|
27
28
|
| `--slice "<question>"` | 0.12.26 | Only what the retrieval planner picks for a question. |
|
|
28
29
|
| `--slice-tokens <n>` | 0.12.26 | The slice budget (default 30000). |
|
|
29
|
-
| `--pack single
|
|
30
|
+
| `--pack single|xml|json` | 0.12.31 | One full-repository file in the chosen shape. |
|
|
30
31
|
| `--sign` | 0.12.32 | Ed25519 signature over the manifest. |
|
|
31
32
|
| `--budget-tokens <n>` | 0.12.33 | Fit the repository into a token budget by selecting whole files. |
|
|
32
33
|
|
|
@@ -35,53 +36,51 @@ added, so a reader can find the feature they need without reading a hundred chan
|
|
|
35
36
|
| Key | Since | Notes |
|
|
36
37
|
| :--- | :--- | :--- |
|
|
37
38
|
| `artifacts.diff`, `artifacts.log`, `artifacts.tokenTree` | 0.12.24 | Default `false`. `--skip-artifacts` still wins. |
|
|
38
|
-
| `logCount` | 0.12.24 | 1
|
|
39
|
+
| `logCount` | 0.12.24 | 1-500, default 20. |
|
|
39
40
|
| `pack` | 0.12.31 | `single`, `xml` or `json`; unset keeps the monolith pair. |
|
|
41
|
+
| `discovery` | 0.13.x | `auto`, `git` or `walk`; recorded in the config digest. |
|
|
42
|
+
| `maxParts` | 0.16.x | Grow the part budget until the snapshot has at most this many parts. |
|
|
40
43
|
|
|
41
44
|
## MCP
|
|
42
45
|
|
|
43
|
-
Tools went from eight to
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
`
|
|
47
|
-
|
|
46
|
+
Tools went from eight to **26**: health, budget, history, tests, workspace, entrypoints,
|
|
47
|
+
neighbors, routes, cycles, search, stats, review, diff_context, symbol, context, query,
|
|
48
|
+
plan_for, answer, plan, generate, validate, locate, dependents, read, explain and status.
|
|
49
|
+
Prompts went from two (`orient`, `keep-current`) to seven (`audit`, `review`, `explain`,
|
|
50
|
+
`onboard`, `security-review` were added). Resources gained `snapshot://prompt` and the three
|
|
51
|
+
opt-in reports.
|
|
48
52
|
|
|
49
|
-
|
|
50
|
-
|
|
53
|
+
stdio is still the default. `--http` adds Streamable HTTP with a bearer token and a loopback
|
|
54
|
+
bind; `--no-auth` is refused on a non-loopback bind. The page and the MCP endpoint can share
|
|
51
55
|
one port with `serve`.
|
|
52
56
|
|
|
53
|
-
##
|
|
57
|
+
## 0.18.0 to 0.20.12: what changed
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
flags change the artifact selection the manifest records, so passing them is required to compare
|
|
57
|
-
like with like. Before, a snapshot generated with one of them reported a selection mismatch.
|
|
58
|
-
2. **npm publishes only at `x.y.0`** (0.12.16 onward). Every patch is committed, tagged and pushed;
|
|
59
|
-
the registry carries `0.13.0`, `0.14.0`, … so `latest` stays a milestone rather than a patch. If
|
|
60
|
-
you pin an exact patch version, install from the git tag or build from source until the next
|
|
61
|
-
minor.
|
|
62
|
-
|
|
63
|
-
## What changed after 0.12.x
|
|
64
|
-
|
|
65
|
-
The line from `0.13.0` to `0.17.0` added checks and two tools; it removed nothing. What a reader
|
|
66
|
-
upgrading across those milestones should know:
|
|
67
|
-
|
|
68
|
-
| Change | Since | Why it matters to you |
|
|
59
|
+
| Change | Since | Why it matters |
|
|
69
60
|
| :--- | :--- | :--- |
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
61
|
+
| `snapshot update` and a corrected update cache | 0.18.0, 0.20.0 | The command bypasses the cache; a failed check is remembered for five minutes, not an hour. |
|
|
62
|
+
| `health` recognises its own redaction marker and scans parts per section | 0.18.2, 0.19.0 | A clean snapshot no longer scores 70 for leaks that do not exist. The remaining host-path warning is documentation examples, not a credential. |
|
|
63
|
+
| The audit verifies snapshot claims, not only hashes | 0.20.1, 0.20.2 | Artifact counts, bodies, packs and workspace indexes are recomputed; a hand-edited snapshot fails. |
|
|
64
|
+
| `health` skips a secret check in linear time | 0.20.3 | A large skipped-secret set no longer re-reads the snapshot per token. |
|
|
65
|
+
| Security hardening across CLI, scanner, redaction, MCP, serve and remote | 0.20.4-0.20.12 | CodeQL, audit and live-verdict findings: path confinement, redaction continuations, rate limiting, 413 flushing, part-size caps, IPv6 remote parsing, git/walk parity and clone cleanup. |
|
|
66
|
+
|
|
67
|
+
## Behaviour changes to know
|
|
68
|
+
|
|
69
|
+
1. **`validate` accepts `--include-diffs`, `--include-logs` and `--token-tree`** (0.12.28).
|
|
70
|
+
Those flags change the artifact selection the manifest records, so pass the same flags to
|
|
71
|
+
compare like with like.
|
|
72
|
+
2. **The 0.20 line is published in place.** Every 0.20.x patch is committed, tagged and may be
|
|
73
|
+
published; earlier lines published only at `x.y.0`. Pin an exact version when the same build
|
|
74
|
+
must run everywhere.
|
|
75
|
+
3. **The 0.20.12 HTTP/MCP limits are stricter.** Empty JSON-RPC batches are invalid, oversized
|
|
76
|
+
bodies return 413 before the socket closes, and content tools refuse a part above 16 MiB.
|
|
77
|
+
|
|
78
|
+
`validate` on a snapshot written by an older version still works: newer manifest keys are
|
|
80
79
|
optional, and an artifact the manifest does not record is not required to exist.
|
|
81
80
|
|
|
82
81
|
## If you are on an older 0.12.x
|
|
83
82
|
|
|
84
|
-
Upgrade to the latest 0.12.x first; every change since 0.12.14 is a patch on the same line, and
|
|
85
|
-
configuration file format has not changed. Run `snapshot health` after the first generate on
|
|
86
|
-
version
|
|
87
|
-
would refuse.
|
|
83
|
+
Upgrade to the latest 0.12.x first; every change since 0.12.14 is a patch on the same line, and
|
|
84
|
+
the configuration file format has not changed. Run `snapshot health` after the first generate on
|
|
85
|
+
the new version - it is the fastest way to see whether an old snapshot carries anything the
|
|
86
|
+
newer checks would refuse.
|
package/docs/output.md
CHANGED
|
@@ -335,7 +335,8 @@ Reasons, and what each one means:
|
|
|
335
335
|
| `reason` | The file was dropped because |
|
|
336
336
|
| :--- | :--- |
|
|
337
337
|
| `excluded` | It matched your own `excludePatterns`, or fell outside a non-empty `include` allow-list. |
|
|
338
|
-
| `default-ignore` | A built-in rule caught it, the preset's ecosystem ignores did (`node_modules`, `__pycache__`, `target`, …)
|
|
338
|
+
| `default-ignore` | A built-in rule caught it, or the preset's ecosystem ignores did (`node_modules`, `__pycache__`, `target`, …). |
|
|
339
|
+
| `tool-output` | The path sits under a directory carrying a complete .codebase-snapshot marker. It is a prior snapshot, recorded rather than silently dropped; the configured outDir/tmpDir for this run is silent bookkeeping and never appears here. |
|
|
339
340
|
| `sensitive-file` | Its name is credential-bearing (`.env`, `*.pem`, `.npmrc`, …). |
|
|
340
341
|
| `sensitive-path` | The path itself matched a secret rule. The file is skipped and the path is masked in every artifact. |
|
|
341
342
|
| `binary` | It is not text: it holds a NUL byte outside a UTF-16 stream, or more than 1% control characters (a 4 KB blob of `0x07` is valid UTF-8 but is not text). `detail` carries the size and, when there is one to give, the reason: the control-byte count (`Size: 13 B; 5 control byte(s)`), or the offset of a NUL found past the 8 MB head scan (`Size: 9000010 B; NUL byte at offset 9000000`). A NUL inside the head scan is caught by the cheap extension-and-prefix check, so its `detail` is the size alone. |
|
package/docs/security-review.md
CHANGED
|
@@ -33,10 +33,11 @@ untrusted input can arrive.
|
|
|
33
33
|
- **A symlink is only a second name for included content.** The target must survive the same
|
|
34
34
|
include/exclude/ignore filters as the link alias; `.git/config` cannot be reached through a
|
|
35
35
|
tracked `notes.txt`.
|
|
36
|
-
- **Every snapshot file read is confined.** PROMPT.md, reports, the manifest
|
|
37
|
-
are opened through one reader that refuses a symlink and requires the canonical
|
|
38
|
-
the snapshot directory. The MCP resources, `snapshot_history`,
|
|
39
|
-
`serve` use it;
|
|
36
|
+
- **Every snapshot file read is confined.** PROMPT.md, reports, the manifest, WORKSPACE.json and
|
|
37
|
+
signature.json are opened through one reader that refuses a symlink and requires the canonical
|
|
38
|
+
target inside the snapshot directory. The MCP resources, `snapshot_history`,
|
|
39
|
+
`snapshot_workspace`, signing verification and `serve` use it; a part lookup also requires its
|
|
40
|
+
`parts/` directory and the resolved part to stay inside the snapshot.
|
|
40
41
|
- **The diff report fails closed.** Git is forced to emit unquoted ASCII prefixes, a section that
|
|
41
42
|
cannot be attributed to a path is omitted rather than trusted, redaction runs before truncation
|
|
42
43
|
with the diffed file's extension, and `--only` applies to the diff too.
|
|
@@ -60,8 +61,9 @@ executable config in it is refused, because a fetched repository is not a truste
|
|
|
60
61
|
and at most four MCP tool calls in flight across all HTTP sessions. The session and rate maps are
|
|
61
62
|
capped and evicted, so a client cannot grow either without bound.
|
|
62
63
|
- **Untrusted regexes are bounded.** `snapshot_search`, `snapshot_routes` and `snapshot_query`
|
|
63
|
-
reject nested quantifiers, more than one unbounded repetition
|
|
64
|
-
before compiling;
|
|
64
|
+
reject nested quantifiers, more than one unbounded repetition, optional-chain blowups and
|
|
65
|
+
backreferences before compiling; glob and gitignore patterns are bounded by wildcard, brace and
|
|
66
|
+
alternative counts. JavaScript has no regex timeout, so the alternative is a main-thread stall.
|
|
65
67
|
- **Errors are JSON-RPC error objects**, never stack traces.
|
|
66
68
|
|
|
67
69
|
### The browser page
|
|
@@ -69,7 +71,8 @@ executable config in it is refused, because a fetched repository is not a truste
|
|
|
69
71
|
- The page is HTML and is served without a token; **every API call requires one**. The token is not
|
|
70
72
|
baked into the HTML, so serving `/` cannot leak it.
|
|
71
73
|
- A request with a cross-origin `Origin` is refused before any auth check.
|
|
72
|
-
- `api/snapshot.zip` only
|
|
74
|
+
- `api/snapshot.zip` zips only the parts, artifacts and signature the manifest declares; a
|
|
75
|
+
directory with a PWA `manifest.json` and an arbitrary file is refused.
|
|
73
76
|
- Every path is resolved with `realpath` before the allowed-root check, so a symlink inside the
|
|
74
77
|
served directory cannot read or zip a target outside it. `POST /api/generate` applies the same
|
|
75
78
|
check to its local source and to the `outDir` it is about to write; a remote clone's
|
|
@@ -111,7 +114,7 @@ to treat file content as data. This is a real, documented limitation, not a solv
|
|
|
111
114
|
|
|
112
115
|
## What changed since this review was written
|
|
113
116
|
|
|
114
|
-
The review was written at 0.12.34. Between then and 0.
|
|
117
|
+
The review was written at 0.12.34. Between then and 0.20.12 the surfaces it covers grew; each
|
|
115
118
|
addition was reviewed with the same question — what new input arrives, and what does it reach?
|
|
116
119
|
|
|
117
120
|
- **`GET /metrics`** (0.13.3) publishes counters with a fixed label set. Repo paths, tokens and
|
|
@@ -132,6 +135,29 @@ addition was reviewed with the same question — what new input arrives, and wha
|
|
|
132
135
|
catastrophic MCP regexes are refused before compilation, HTTP tool concurrency is bounded,
|
|
133
136
|
failed clones are removed, workspace dry runs write nothing, staged validation reads the index,
|
|
134
137
|
and hook installation refuses a symlink or hard link.
|
|
138
|
+
- **The 0.20.10 third audit** closed the remaining gaps: parts-directory and configured
|
|
139
|
+
`outDir`/`tmpDir` escapes are refused; WORKSPACE/signature reads are confined; PEM quote
|
|
140
|
+
tracking, template literals, YAML block scalars, Dockerfile variants and diff prefixes are
|
|
141
|
+
redacted; optional-quantifier and backreference ReDoS and exponential globs are refused;
|
|
142
|
+
MCP era probes, CORS session exposure, whole-response caps, explicit false overrides and an
|
|
143
|
+
empty-first-line read are fixed; validation distinguishes replaced files and skipped paths from
|
|
144
|
+
drift; MCP runs health/validate/review/explain in a worker, and `serve` zips only manifest
|
|
145
|
+
inventory and runs its health audit and remote clone without blocking request handling.
|
|
146
|
+
- **The 0.20.11 fourth audit** closed cross-path twins: a nested ownership marker is recorded
|
|
147
|
+
as `tool-output` instead of vanishing; Dockerfile redaction is re-scan idempotent; quoted
|
|
148
|
+
credentials and unterminated PEM bodies have no length/prefix blind spot; alternation and glob
|
|
149
|
+
branch budgets bound the event loop; workspace members inherit every generation flag;
|
|
150
|
+
`validate` agrees with `--skip-artifacts parts`; HTTP batches are charged per message and
|
|
151
|
+
batched `initialize` mints a session; `snapshot_symbol` is bounded; explicit false overrides
|
|
152
|
+
reach validation; `..notes.ts` is accepted at the segment boundary; `health --all-members`
|
|
153
|
+
confines the index and members; `serve` rejects non-HTTP loopback origins and records nested
|
|
154
|
+
repository roots; and report fences grow with their content.
|
|
155
|
+
- **The 0.20.12 live verdict** executed the fourth audit's hypotheses against the built CLI: HTTP
|
|
156
|
+
envelopes are charged before parsing and empty batches are invalid; Dockerfile continuations
|
|
157
|
+
are masked before per-line rules; content tools refuse parts above 16 MiB; `serve` answers 404
|
|
158
|
+
for a missing local source and cleans an in-flight clone on close; IPv6 remote literals parse;
|
|
159
|
+
`**` counts as one wildcard and brace products are bounded; and the describe contract, tool
|
|
160
|
+
annotations and documentation statements were corrected where the source disagreed.
|
|
135
161
|
|
|
136
162
|
The residual risks below are unchanged, including the two that are deliberate rather than solved.
|
|
137
163
|
|
|
@@ -148,6 +174,7 @@ The residual risks below are unchanged, including the two that are deliberate ra
|
|
|
148
174
|
| Serve: page without token, API with token, zip restricted | `tests/web-serve.test.js` |
|
|
149
175
|
| Signature: tamper detected | `tests/signing.test.js` |
|
|
150
176
|
| Second 0.20 audit: symlink targets, auth case, diff quoting, brief headings, ReDoS, HTTP cap, workspace dry run, staged validation, hook links | `tests/audit-0-20-5-ultimate.test.js` |
|
|
177
|
+
| Fourth 0.20 audit: marker visibility, Dockerfile re-scan, long quoted secrets, unterminated PEM, alternation/glob budgets, workspace flags, skip-parts validation, HTTP batching, symbol cap, false overrides, `..notes.ts`, CLI workspace confinement, serve origin/fences | `tests/audit-0-20-11-followup.test.js` |
|
|
151
178
|
|
|
152
179
|
## Residual risks, stated
|
|
153
180
|
|
package/docs/tools.md
CHANGED
|
@@ -15,8 +15,9 @@ Every tool is read-only unless it says **writes**. Cost is the class `tools/list
|
|
|
15
15
|
```json
|
|
16
16
|
{ "name": "snapshot_status", "arguments": {} }
|
|
17
17
|
```
|
|
18
|
-
- **`snapshot_explain`** —
|
|
19
|
-
|
|
18
|
+
- **`snapshot_explain`** — expensive, read-only. Why is a path in or out of the snapshot? It
|
|
19
|
+
resolves the same scan the generator would use, so a `--slice` drop is reported as
|
|
20
|
+
`not-selected` with the run's detail.
|
|
20
21
|
```json
|
|
21
22
|
{ "name": "snapshot_explain", "arguments": { "path": "src/index.ts" } }
|
|
22
23
|
```
|
|
@@ -164,7 +165,7 @@ Every tool is read-only unless it says **writes**. Cost is the class `tools/list
|
|
|
164
165
|
```json
|
|
165
166
|
{ "name": "snapshot_generate", "arguments": { "slice": "how is auth done", "sliceTokens": 20000 } }
|
|
166
167
|
```
|
|
167
|
-
- **`snapshot_validate`** —
|
|
168
|
+
- **`snapshot_validate`** — expensive, read-only. Drift check: files changed or deleted since the
|
|
168
169
|
snapshot, part damage, bookkeeping, **and the settings the manifest recorded** — a snapshot
|
|
169
170
|
generated with `tokenTree`, `includeDiffs`, `removeEmptyLines` or `skeleton` validates clean
|
|
170
171
|
without re-passing the flags, while a changed config file is still drift.
|
package/docs/vs-gitingest.md
CHANGED
|
@@ -31,11 +31,11 @@ If you want to paste a repo into a chat right now: **use gitingest.**
|
|
|
31
31
|
| Excluded-file accounting | Every skipped path recorded with a reason | Ignore rules applied |
|
|
32
32
|
| Secret redaction | 32 default rules, value-span masking, audit table | Relies on ignore rules |
|
|
33
33
|
| Runtime | Node.js | Python |
|
|
34
|
-
| Repo URL input |
|
|
34
|
+
| Repo URL input | **Yes** — `generate --remote` (Node + git; `file://` needs `--allow-private`) | **Yes** — zero install |
|
|
35
35
|
|
|
36
36
|
## Where gitingest is the better choice
|
|
37
37
|
|
|
38
|
-
- **You have not installed anything and do not want to.**
|
|
38
|
+
- **You have not installed anything and do not want to.** This tool needs Node and git, so a hosted URL box is still the shortest path.
|
|
39
39
|
- **You want one digest, not parts.** If the destination is a chat window, one blob is the right
|
|
40
40
|
shape.
|
|
41
41
|
- **You are in Python.** `pip install gitingest` fits an existing pipeline without adding a Node
|
package/docs/vs-repomix.md
CHANGED
|
@@ -28,7 +28,7 @@ If you want the most popular, most integrated tool: **use repomix.**
|
|
|
28
28
|
| Size control | **Yes** — `maxPartBytes` is a per-part byte ceiling; a file that cannot fit one part becomes a head/tail preview listed in `incomplete[]` | `--split-output <size>` splits by output size, and `--token-budget <n>` exits non-zero above a token count |
|
|
29
29
|
| Reproducible output | Parts are byte-identical across runs; a fingerprint covers them | Content is stable; no published determinism guarantee |
|
|
30
30
|
| Staleness check | `validate` re-hashes the repository and exits non-zero on drift | Not a feature |
|
|
31
|
-
| Remote repositories |
|
|
31
|
+
| Remote repositories | **Yes** — `--remote` clones an HTTPS URL (or `file://` with `--allow-private`); git is required | **Yes** — packs a GitHub URL directly |
|
|
32
32
|
| MCP server | **Yes** — 26 tools over stdio, and it serves the validated snapshot rather than the working tree | **Yes** — packs a repository, including by URL |
|
|
33
33
|
| Secret handling | 32 default rules, value-span masking, per-line audit table | Secretlint integration |
|
|
34
34
|
| Language awareness | 25 presets, AST or structural summaries labelled by confidence | Tree-sitter parsing with a compression mode |
|
|
@@ -39,11 +39,12 @@ If you want the most popular, most integrated tool: **use repomix.**
|
|
|
39
39
|
|
|
40
40
|
- **You want one file.** Pasting a single artifact into a chat is simpler than assembling parts, and
|
|
41
41
|
repomix is built around that workflow.
|
|
42
|
-
- **You
|
|
43
|
-
|
|
44
|
-
- **You want MCP
|
|
45
|
-
serves
|
|
46
|
-
|
|
42
|
+
- **You want a zero-install URL box.** repomix can pack a GitHub URL without a local checkout;
|
|
43
|
+
this project needs Node and git for `--remote`, and its browser page still runs locally.
|
|
44
|
+
- **You want MCP to fetch a URL on demand.** repomix's server can pack a repository by URL. This
|
|
45
|
+
project's MCP server serves local roots and refuses to read outside them; remote fetching is a
|
|
46
|
+
CLI/page action (`--remote`), not a read tool. Both ship a server; ours is narrower on purpose,
|
|
47
|
+
and it can tell the agent whether the snapshot it is reading is still current.
|
|
47
48
|
- **You want the ecosystem.** More stars, more tutorials, more people who have already hit your
|
|
48
49
|
problem.
|
|
49
50
|
- **Your limit is a token count, not a byte count.** `--token-budget <n>` fails the run when the
|
package/docs/workspace.md
CHANGED
|
@@ -70,8 +70,10 @@ directory configured if the member should be served on its own.
|
|
|
70
70
|
## Rules
|
|
71
71
|
|
|
72
72
|
- **Defaults, not member configs.** A member may contain a `snapshot.config.ts`, and a config can run
|
|
73
|
-
code. A workspace is a set of repositories the caller named, not one they configured, so
|
|
74
|
-
|
|
73
|
+
code. A workspace is a set of repositories the caller named, not one they configured, so member
|
|
74
|
+
config files are ignored. The flags the caller passed to the workspace run (budget, compression,
|
|
75
|
+
scope, artifact selection, discovery) are still applied to every member. Run the member directly
|
|
76
|
+
if its own config should apply.
|
|
75
77
|
- **A failure is reported, not skipped.** A missing member prints its name and the run exits `1`
|
|
76
78
|
after writing the members that succeeded, so a partial workspace is never mistaken for a complete
|
|
77
79
|
one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codebase-snapshot",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.12",
|
|
4
4
|
"description": "Turn a repository into LLM-ready Markdown under a hard byte budget: a manifest of every included and skipped file, secret redaction, drift validation, and an MCP server for Claude, ChatGPT and Cursor.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"codebase-snapshot",
|