@ankurhalder/codebase-snapshot 2.0.0 → 2.1.1

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/README.md CHANGED
@@ -11,8 +11,40 @@ AST structures, and partitions your repository into **hard byte-bounded**, LLM-r
11
11
 
12
12
  ---
13
13
 
14
+ ## ⚡ Set up a repository
15
+
16
+ ```bash
17
+ npm create codebase-snapshot
18
+ ```
19
+
20
+ Detects the project type, asks a handful of questions with real defaults, and
21
+ writes a `snapshot.config.mjs` that lists **every setting at its default** — so
22
+ the config doubles as the documentation. Works for 25 project shapes including
23
+ Next.js, Nuxt, SvelteKit, Astro, Vue, React, NestJS, Django, FastAPI, Go, Rust,
24
+ Java, .NET, PHP, Ruby, monorepos and infra repos.
25
+
26
+ Non-interactive, with every answer as a flag:
27
+
28
+ ```bash
29
+ npx @ankurhalder/codebase-snapshot init --preset react-vite --max-part-bytes 120k --yes
30
+ ```
31
+
32
+ ---
33
+
14
34
  ## ✨ Features
15
35
 
36
+ - **25 project presets** — detection reads the repository once and picks the most
37
+ specific match: Next.js, Nuxt, SvelteKit, Remix, Astro, Angular, Solid, Vue,
38
+ React, NestJS, Express/ Fastify, Python (Django / FastAPI / library), Go, Rust,
39
+ Java/Spring, .NET, Laravel, Rails, monorepos, infra and docs.
40
+ - **Structural summaries beyond TypeScript** — imports, declarations and exports
41
+ for Python, Go, Rust, Java/Kotlin/Scala, C#, PHP, Ruby and C/C++, plus the
42
+ script block of Vue/Svelte/Astro components through the real TypeScript
43
+ compiler. Every summary is labelled `ast`, `structural` or `heuristic`.
44
+ - **Interactive setup** — `npm create codebase-snapshot` walks every tunable
45
+ parameter and writes a self-documenting config.
46
+ - **Per-ecosystem ignores** — `__pycache__`, `.venv`, `target`, `.gradle`,
47
+ `bin`/`obj`, `vendor`, `.svelte-kit` and friends are recognised per preset.
16
48
  - **Hard byte budgeting** — every `part-XXX.md` is guaranteed to stay under `maxPartBytes`. A single
17
49
  oversized file is byte-truncated and marked rather than emitted whole.
18
50
  - **Bounded redaction** — masks only the matched span (not the whole line), and masks multi-line PEM
@@ -37,8 +69,14 @@ AST structures, and partitions your repository into **hard byte-bounded**, LLM-r
37
69
  npx @ankurhalder/codebase-snapshot generate
38
70
  ```
39
71
 
72
+ Or install it in your project. Any npm-compatible client works — they all resolve the
73
+ same published package:
74
+
40
75
  ```bash
41
76
  npm install -D @ankurhalder/codebase-snapshot
77
+ yarn add -D @ankurhalder/codebase-snapshot
78
+ pnpm add -D @ankurhalder/codebase-snapshot
79
+ bun add -d @ankurhalder/codebase-snapshot
42
80
  ```
43
81
 
44
82
  ```json
@@ -50,6 +88,10 @@ npm install -D @ankurhalder/codebase-snapshot
50
88
  }
51
89
  ```
52
90
 
91
+ Requires **Node.js 18+**. Every client above is verified in CI, including yarn Berry with
92
+ strict PnP. See [docs/install.md](docs/install.md) for global installs, version pinning,
93
+ and troubleshooting.
94
+
53
95
  ---
54
96
 
55
97
  ## 🛠️ CLI