You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-6Lines changed: 18 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,13 +50,25 @@ Dry run (only output to console)
50
50
npx codefetch --d
51
51
```
52
52
53
+
Count tokens only (without generating markdown file)
54
+
```bash
55
+
# Count tokens with default encoder
56
+
npx codefetch -c
57
+
58
+
# Count tokens with specific encoder
59
+
npx codefetch -c --token-encoder cl100k
60
+
61
+
# Count tokens for specific file types
62
+
npx codefetch -c -e .ts,.js --token-encoder o200k
63
+
```
64
+
53
65
If no output file is specified (`-o` or `--output`), it will print to `codefetch/codebase.md`
54
66
55
67
## Options
56
68
57
69
| Option | Description |
58
70
|--------|-------------|
59
-
|`-o, --output <file>`| Specify output filename (defaults to codebase.md) |
71
+
|`-o, --output <file>`| Specify output filename (defaults to codebase.md). Note: If you include "codefetch/" in the path, it will be automatically stripped to avoid double-nesting|
60
72
|`--dir <path>`| Specify the directory to scan (defaults to current directory) |
0 commit comments