rskim 0.3.3 → 0.4.0
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 +31 -6
- package/bin/darwin/arm64/skim +0 -0
- package/bin/darwin/x64/skim +0 -0
- package/bin/linux/x64/skim +0 -0
- package/bin/win32/x64/skim.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,21 +43,36 @@ npm install -g rskim
|
|
|
43
43
|
# Read TypeScript with structure mode
|
|
44
44
|
skim file.ts
|
|
45
45
|
|
|
46
|
+
# Process multiple files with glob patterns
|
|
47
|
+
skim 'src/**/*.ts'
|
|
48
|
+
|
|
49
|
+
# Show token reduction statistics
|
|
50
|
+
skim file.ts --show-stats
|
|
51
|
+
|
|
46
52
|
# Extract Python function signatures
|
|
47
53
|
skim file.py --mode signatures
|
|
48
54
|
|
|
55
|
+
# Parallel processing with custom job count
|
|
56
|
+
skim '*.{js,ts}' --jobs 4
|
|
57
|
+
|
|
49
58
|
# Pipe to syntax highlighter
|
|
50
59
|
skim file.rs | bat -l rust
|
|
51
60
|
|
|
52
61
|
# Read from stdin
|
|
53
62
|
cat code.ts | skim - --language=typescript
|
|
63
|
+
|
|
64
|
+
# Clear cache
|
|
65
|
+
skim --clear-cache
|
|
54
66
|
```
|
|
55
67
|
|
|
56
68
|
## Features
|
|
57
69
|
|
|
58
70
|
- **6 Languages**: TypeScript, JavaScript, Python, Rust, Go, Java
|
|
59
71
|
- **4 Transformation Modes**: Structure, Signatures, Types, Full
|
|
60
|
-
- **Fast**:
|
|
72
|
+
- **Fast**: 14.6ms for 3000-line files (3x faster than target)
|
|
73
|
+
- **Cached**: 40-50x speedup on repeated processing (enabled by default)
|
|
74
|
+
- **Multi-file**: Glob patterns with parallel processing (`skim 'src/**/*.ts'`)
|
|
75
|
+
- **Token Stats**: Show reduction statistics with `--show-stats`
|
|
61
76
|
- **Streaming**: Outputs to stdout for pipe workflows
|
|
62
77
|
- **Safe**: Built-in DoS protections
|
|
63
78
|
|
|
@@ -77,6 +92,11 @@ Options:
|
|
|
77
92
|
[possible values: structure, signatures, types, full]
|
|
78
93
|
-l, --language <LANGUAGE> Override language detection
|
|
79
94
|
[possible values: typescript, javascript, python, rust, go, java]
|
|
95
|
+
-j, --jobs <JOBS> Number of parallel jobs [default: number of CPUs]
|
|
96
|
+
--no-header Don't print file path headers for multi-file output
|
|
97
|
+
--no-cache Disable caching (caching is enabled by default)
|
|
98
|
+
--clear-cache Clear all cached files and exit
|
|
99
|
+
--show-stats Show token reduction statistics
|
|
80
100
|
-h, --help Print help
|
|
81
101
|
-V, --version Print version
|
|
82
102
|
```
|
|
@@ -167,14 +187,17 @@ skim file.rs --mode full
|
|
|
167
187
|
### Explore a codebase
|
|
168
188
|
|
|
169
189
|
```bash
|
|
170
|
-
# Get overview of all TypeScript files
|
|
171
|
-
|
|
190
|
+
# Get overview of all TypeScript files (NEW: glob support)
|
|
191
|
+
skim 'src/**/*.ts' --no-header
|
|
172
192
|
|
|
173
|
-
# Extract all Python function signatures
|
|
174
|
-
skim
|
|
193
|
+
# Extract all Python function signatures with stats
|
|
194
|
+
skim 'lib/**/*.py' --mode signatures --show-stats > api.txt
|
|
175
195
|
|
|
176
196
|
# Review Rust types
|
|
177
197
|
skim lib.rs --mode types | less
|
|
198
|
+
|
|
199
|
+
# Parallel processing for faster multi-file operations
|
|
200
|
+
skim 'src/**/*.ts' --jobs 8
|
|
178
201
|
```
|
|
179
202
|
|
|
180
203
|
### Prepare code for LLMs
|
|
@@ -214,9 +237,11 @@ cat *.py | skim - --language=python
|
|
|
214
237
|
|
|
215
238
|
## Performance
|
|
216
239
|
|
|
217
|
-
- **Parse + Transform**:
|
|
240
|
+
- **Parse + Transform**: 14.6ms for 3000-line files (verified)
|
|
241
|
+
- **Cached**: 5ms on repeated processing (40-50x speedup)
|
|
218
242
|
- **Token Reduction**: 60-95% depending on mode
|
|
219
243
|
- **Streaming**: Zero intermediate files
|
|
244
|
+
- **Parallel**: Scales with CPU cores for multi-file processing
|
|
220
245
|
|
|
221
246
|
## Security
|
|
222
247
|
|
package/bin/darwin/arm64/skim
CHANGED
|
Binary file
|
package/bin/darwin/x64/skim
CHANGED
|
Binary file
|
package/bin/linux/x64/skim
CHANGED
|
Binary file
|
package/bin/win32/x64/skim.exe
CHANGED
|
Binary file
|