@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.
- package/README.md +5 -1
- package/index.js +4 -1
- 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
|
-
#
|
|
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
|
-
|
|
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
|
|