@kevinxyz/code-snapshot 2.0.0 → 2.0.3
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 +12 -2
- package/index.js +4 -1
- package/package.json +21 -6
package/README.md
CHANGED
|
@@ -8,10 +8,17 @@ Stop manually copy-pasting files into ChatGPT, Claude Code, Codex, or Cursor. On
|
|
|
8
8
|
npm install -g @kevinxyz/code-snapshot
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
Already installed? Update to the latest:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm update -g @kevinxyz/code-snapshot
|
|
15
|
+
```
|
|
16
|
+
|
|
11
17
|
**Just run it in your project root (no arguments = current dir):**
|
|
12
18
|
|
|
13
19
|
```bash
|
|
14
20
|
snap
|
|
21
|
+
# → generates snapshot.txt in the current directory
|
|
15
22
|
```
|
|
16
23
|
|
|
17
24
|
Then pipe directly to any AI (replace `.` with your folder):
|
|
@@ -23,7 +30,7 @@ snap . --git-only -o ctx.txt # Just changed files
|
|
|
23
30
|
snap . --copy # Copy to clipboard
|
|
24
31
|
```
|
|
25
32
|
|
|
26
|
-
> 💡 **Tip:** `snap` with no
|
|
33
|
+
> 💡 **Tip:** `snap` with no arguments uses the current directory. If you see `ENOENT`, the folder doesn't exist — run `snap .` in your project root instead.
|
|
27
34
|
|
|
28
35
|
## Why code-snapshot?
|
|
29
36
|
|
|
@@ -118,7 +125,10 @@ Then you tell AI: *"Above is my full codebase. Please add a feature to export ea
|
|
|
118
125
|
## Quick Examples
|
|
119
126
|
|
|
120
127
|
```bash
|
|
121
|
-
#
|
|
128
|
+
# Default: writes snapshot.txt to current directory
|
|
129
|
+
snap .
|
|
130
|
+
|
|
131
|
+
# Custom output file
|
|
122
132
|
snap . -o context.txt
|
|
123
133
|
|
|
124
134
|
# Just what changed today (git diff)
|
package/index.js
CHANGED
|
@@ -519,7 +519,10 @@ async function main() {
|
|
|
519
519
|
console.log(output);
|
|
520
520
|
}
|
|
521
521
|
} else {
|
|
522
|
-
|
|
522
|
+
// Default: write snapshot.txt in current directory
|
|
523
|
+
const defaultOut = 'snapshot.txt';
|
|
524
|
+
fs.writeFileSync(process.cwd() + '/' + defaultOut, output, 'utf-8');
|
|
525
|
+
console.log(`✅ Written to ${defaultOut} (${output.length} chars, ~${estimateTokens(output)} tokens)`);
|
|
523
526
|
}
|
|
524
527
|
}
|
|
525
528
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kevinxyz/code-snapshot",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Merge your codebase into one text block for AI agents. Stop copying files manually.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -14,17 +14,32 @@
|
|
|
14
14
|
"start": "node index.js ."
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
|
-
"code-snapshot",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
17
|
+
"code-snapshot",
|
|
18
|
+
"ai",
|
|
19
|
+
"claude",
|
|
20
|
+
"chatgpt",
|
|
21
|
+
"context",
|
|
22
|
+
"codebase",
|
|
23
|
+
"agent",
|
|
24
|
+
"claude-code",
|
|
25
|
+
"cursor",
|
|
26
|
+
"copilot",
|
|
27
|
+
"codex",
|
|
28
|
+
"prompt",
|
|
29
|
+
"llm",
|
|
30
|
+
"developer-tool"
|
|
20
31
|
],
|
|
21
32
|
"author": "Kevin-X00",
|
|
22
33
|
"license": "MIT",
|
|
23
|
-
"publishConfig": {
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
24
37
|
"repository": {
|
|
25
38
|
"type": "git",
|
|
26
39
|
"url": "git+ssh://git@github.com:Kevin-X00/code-snapshot.git"
|
|
27
40
|
},
|
|
28
41
|
"homepage": "https://kevin-x00.github.io/code-snapshot",
|
|
29
|
-
"engines": {
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=18"
|
|
44
|
+
}
|
|
30
45
|
}
|