code-context-extractor 0.2.0 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +31 -65
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -12,19 +12,25 @@ CodeContextExtractor is a local-only CLI that captures a deterministic snapshot
12
12
  - Anyone who shares code with AI systems and wants safe defaults
13
13
 
14
14
  ## Quick start
15
+ 1. Open a terminal at your project root (the folder you want to scan).
16
+ Example on Windows:
17
+ ```bash
18
+ cd C:\projects\MyNewProject
19
+ ```
20
+ 2. Run the command (npx will install on first use if needed):
15
21
  ```bash
16
22
  npx code-context-extractor extract . --verbose
17
23
  ```
18
-
19
- The output is written to `code-context/` with a timestamped filename like:
24
+ 3. Open the `code-context/` folder in your project (for example: `C:\projects\MyNewProject\code-context`).
25
+ 4. Locate the newest file, named like:
20
26
  ```
21
27
  code-context/<root>_context_YYYY-MM-DD_HHMMSS.txt
22
28
  ```
23
-
24
- ## Install from npm
25
- ```bash
26
- npx code-context-extractor extract C:\projects\MyNewProject --verbose
29
+ Example:
30
+ ```
31
+ code-context/MyNewProject_context_2026-01-20_145743.txt
27
32
  ```
33
+ 5. Paste that file into your AI tool when you want it to understand the codebase.
28
34
 
29
35
  ## Important: .gitignore your outputs
30
36
  > **Warning ⚠️**
@@ -35,15 +41,7 @@ Add this line to your project's `.gitignore`:
35
41
  code-context/
36
42
  ```
37
43
 
38
- ## npm and npx (for beginners)
39
- - `npm` is the package manager that installs tools and libraries.
40
- - `npx` runs a tool. If it is not installed locally, it will try to download it.
41
- - `npx` is great for one-off CLI runs without a global install.
42
-
43
- ## User journey (example)
44
- You want to generate a context file for a project at `C:\projects\MyNewProject`.
45
-
46
- ### Step 1: Install CodeContextExtractor (one time)
44
+ ## Install from GitHub (optional)
47
45
  ```bash
48
46
  git clone https://github.com/Rwstrobe/CodeContextExtractor.git
49
47
  cd CodeContextExtractor
@@ -52,59 +50,12 @@ npm run build
52
50
  npm link
53
51
  ```
54
52
 
55
- ### Step 2: Go to your project folder
56
- ```bash
57
- cd C:\projects\MyNewProject
58
- ```
59
-
60
- ### Step 3: Generate the context file
61
- ```bash
62
- code-context-extractor extract . --verbose
63
- ```
64
-
65
- The output will be saved to:
66
- ```
67
- .\code-context\MyNewProject_context_YYYY-MM-DD_HHMMSS.txt
68
- ```
69
-
70
- ### macOS/Linux variant
71
- You can follow the same steps with a Unix-style path:
72
- ```bash
73
- cd ~/projects/MyNewProject
74
- code-context-extractor extract . --verbose
75
- ```
76
- The output will be saved to:
77
- ```
78
- ./code-context/MyNewProject_context_YYYY-MM-DD_HHMMSS.txt
79
- ```
80
-
81
- ## Install from GitHub (beginner-friendly)
82
- 1. Clone the repository:
83
- ```bash
84
- git clone https://github.com/Rwstrobe/CodeContextExtractor.git
85
- ```
86
- 2. Enter the project folder:
87
- ```bash
88
- cd CodeContextExtractor
89
- ```
90
- 3. Install dependencies:
91
- ```bash
92
- npm install
93
- ```
94
- 4. Build the CLI:
95
- ```bash
96
- npm run build
97
- ```
98
- 5. Link the CLI so it is available on your PATH:
99
- ```bash
100
- npm link
101
- ```
102
- 6. Run the extractor:
53
+ Run the linked CLI:
103
54
  ```bash
104
55
  code-context-extractor extract . --verbose
105
56
  ```
106
57
 
107
- If you prefer, you can run the built CLI directly:
58
+ Or run the built CLI directly:
108
59
  ```bash
109
60
  node dist/cli.js extract . --verbose
110
61
  ```
@@ -152,7 +103,7 @@ Each output file contains:
152
103
  - Metadata header (root path, timestamp, tool version, command, config summary)
153
104
  - Folder tree (depth-limited)
154
105
  - Included files summary (count and total size)
155
- - Skipped files with reasons (excluded, too large, binary, unreadable)
106
+ - Skipped files summary (total, by reason, top roots)
156
107
  - For each included file: path, size, last modified, and contents in fenced blocks
157
108
 
158
109
  ## Redaction
@@ -233,6 +184,21 @@ npm run build
233
184
  npm test
234
185
  ```
235
186
 
187
+ ## FAQ
188
+ **Does this upload my repo or call any APIs?**
189
+ No. It is local-only, with no network calls or telemetry.
190
+
191
+ **Why use npx?**
192
+ `npx` runs the CLI without a global install. It will download the package if needed.
193
+
194
+ **Why are `.git` and `node_modules` excluded?**
195
+ They add a lot of noise and size without improving architectural context.
196
+
197
+ **The output is huge. How do I reduce it?**
198
+ Use `--depth`, `--max-bytes`, and more `--exclude` globs, or add a config file.
199
+
236
200
  ## License
237
201
  MIT
238
202
 
203
+
204
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-context-extractor",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Local-only CLI tool to extract codebase context into a single text or Markdown file.",
5
5
  "license": "MIT",
6
6
  "author": "Open Source Contributors",