code-context-extractor 0.1.0 → 0.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.
Files changed (2) hide show
  1. package/README.md +18 -16
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -13,9 +13,7 @@ CodeContextExtractor is a local-only CLI that captures a deterministic snapshot
13
13
 
14
14
  ## Quick start
15
15
  ```bash
16
- npm install
17
- npm run build
18
- npx --no-install code-context-extractor extract . --verbose
16
+ npx code-context-extractor extract . --verbose
19
17
  ```
20
18
 
21
19
  The output is written to `.code-context/` with a timestamped filename like:
@@ -23,6 +21,11 @@ The output is written to `.code-context/` with a timestamped filename like:
23
21
  .code-context/<root>_context_YYYY-MM-DD_HHMMSS.txt
24
22
  ```
25
23
 
24
+ ## Install from npm
25
+ ```bash
26
+ npx code-context-extractor extract C:\projects\MyNewProject --verbose
27
+ ```
28
+
26
29
  ## Important: .gitignore your outputs
27
30
  > **Warning ⚠️**
28
31
  > CodeContextExtractor writes files into a `.code-context/` folder inside your project root. If that folder is not ignored, you may accidentally commit and push your context exports.
@@ -35,9 +38,7 @@ Add this line to your project's `.gitignore`:
35
38
  ## npm and npx (for beginners)
36
39
  - `npm` is the package manager that installs tools and libraries.
37
40
  - `npx` runs a tool. If it is not installed locally, it will try to download it.
38
- - `--no-install` tells `npx` to only use what is already installed and skip downloads.
39
-
40
- In this repo, `code-context-extractor` is not published to npm yet, so `npx` needs `--no-install` or a direct `node dist/cli.js` call.
41
+ - `npx` is great for one-off CLI runs without a global install.
41
42
 
42
43
  ## User journey (example)
43
44
  You want to generate a context file for a project at `C:\projects\MyNewProject`.
@@ -48,6 +49,7 @@ git clone https://github.com/Rwstrobe/CodeContextExtractor.git
48
49
  cd CodeContextExtractor
49
50
  npm install
50
51
  npm run build
52
+ npm link
51
53
  ```
52
54
 
53
55
  ### Step 2: Go to your project folder
@@ -57,7 +59,7 @@ cd C:\projects\MyNewProject
57
59
 
58
60
  ### Step 3: Generate the context file
59
61
  ```bash
60
- npx --no-install code-context-extractor extract . --verbose
62
+ code-context-extractor extract . --verbose
61
63
  ```
62
64
 
63
65
  The output will be saved to:
@@ -69,7 +71,7 @@ The output will be saved to:
69
71
  You can follow the same steps with a Unix-style path:
70
72
  ```bash
71
73
  cd ~/projects/MyNewProject
72
- npx --no-install code-context-extractor extract . --verbose
74
+ code-context-extractor extract . --verbose
73
75
  ```
74
76
  The output will be saved to:
75
77
  ```
@@ -93,9 +95,13 @@ npm install
93
95
  ```bash
94
96
  npm run build
95
97
  ```
96
- 5. Run the extractor:
98
+ 5. Link the CLI so it is available on your PATH:
97
99
  ```bash
98
- npx --no-install code-context-extractor extract . --verbose
100
+ npm link
101
+ ```
102
+ 6. Run the extractor:
103
+ ```bash
104
+ code-context-extractor extract . --verbose
99
105
  ```
100
106
 
101
107
  If you prefer, you can run the built CLI directly:
@@ -117,15 +123,11 @@ node dist/cli.js extract . --verbose
117
123
  ## Commands
118
124
  ### Extract
119
125
  ```bash
120
- npx --no-install code-context-extractor extract [path]
126
+ code-context-extractor extract [path]
121
127
  ```
122
128
  Example:
123
129
  ```bash
124
- npx --no-install code-context-extractor extract ./project --format md --depth 3 --verbose
125
- ```
126
- If you installed the CLI globally (for example via `npm link` or a future npm publish), you can run:
127
- ```bash
128
- code-context-extractor extract [path]
130
+ code-context-extractor extract ./project --format md --depth 3 --verbose
129
131
  ```
130
132
 
131
133
  ## Options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-context-extractor",
3
- "version": "0.1.0",
3
+ "version": "0.1.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",