@kevinxyz/code-snapshot 2.0.2 → 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.
Files changed (3) hide show
  1. package/README.md +5 -1
  2. package/index.js +4 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -18,6 +18,7 @@ npm update -g @kevinxyz/code-snapshot
18
18
 
19
19
  ```bash
20
20
  snap
21
+ # → generates snapshot.txt in the current directory
21
22
  ```
22
23
 
23
24
  Then pipe directly to any AI (replace `.` with your folder):
@@ -124,7 +125,10 @@ Then you tell AI: *"Above is my full codebase. Please add a feature to export ea
124
125
  ## Quick Examples
125
126
 
126
127
  ```bash
127
- # Everything you need for your AI prompt
128
+ # Default: writes snapshot.txt to current directory
129
+ snap .
130
+
131
+ # Custom output file
128
132
  snap . -o context.txt
129
133
 
130
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
- console.log(output);
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.2",
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": {