rskim 0.2.3 → 0.3.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 CHANGED
@@ -13,32 +13,44 @@ Think of it like `cat`, but smart about what code to show.
13
13
 
14
14
  ## Installation
15
15
 
16
- ### Via Cargo
16
+ ### Try it (no install required)
17
17
 
18
18
  ```bash
19
- cargo install rskim
19
+ npx skim file.ts
20
20
  ```
21
21
 
22
- ### Via npm (coming soon)
22
+ ### Install globally (recommended for regular use)
23
23
 
24
24
  ```bash
25
+ # Via npm
25
26
  npm install -g rskim
27
+
28
+ # Via Cargo
29
+ cargo install rskim
26
30
  ```
27
31
 
32
+ > **Note**: Use `npx` for trying it out. For regular use, install globally to avoid npx overhead (~100-500ms per invocation).
33
+
28
34
  ## Quick Start
29
35
 
30
36
  ```bash
37
+ # Try it with npx (no install)
38
+ npx skim file.ts
39
+
40
+ # Or install globally for better performance
41
+ npm install -g rskim
42
+
31
43
  # Read TypeScript with structure mode
32
- rskim file.ts
44
+ skim file.ts
33
45
 
34
46
  # Extract Python function signatures
35
- rskim file.py --mode signatures
47
+ skim file.py --mode signatures
36
48
 
37
49
  # Pipe to syntax highlighter
38
- rskim file.rs | bat -l rust
50
+ skim file.rs | bat -l rust
39
51
 
40
52
  # Read from stdin
41
- cat code.ts | rskim - --language=type-script
53
+ cat code.ts | skim - --language=typescript
42
54
  ```
43
55
 
44
56
  ## Features
@@ -54,7 +66,7 @@ cat code.ts | rskim - --language=type-script
54
66
  ### Basic Usage
55
67
 
56
68
  ```bash
57
- rskim <FILE>
69
+ skim <FILE>
58
70
  ```
59
71
 
60
72
  ### Options
@@ -76,7 +88,7 @@ Options:
76
88
  Removes function bodies while preserving signatures (70-80% reduction).
77
89
 
78
90
  ```bash
79
- rskim file.ts
91
+ skim file.ts
80
92
  ```
81
93
 
82
94
  **Input:**
@@ -98,7 +110,7 @@ function add(a: number, b: number): number { /* ... */ }
98
110
  Extracts only function and method signatures (85-92% reduction).
99
111
 
100
112
  ```bash
101
- rskim file.py --mode signatures
113
+ skim file.py --mode signatures
102
114
  ```
103
115
 
104
116
  **Input:**
@@ -119,7 +131,7 @@ def calculate_total(items: list[Item], tax_rate: float) -> Decimal:
119
131
  Extracts only type definitions (90-95% reduction).
120
132
 
121
133
  ```bash
122
- rskim file.ts --mode types
134
+ skim file.ts --mode types
123
135
  ```
124
136
 
125
137
  **Input:**
@@ -147,7 +159,7 @@ interface User {
147
159
  Returns original code unchanged (0% reduction).
148
160
 
149
161
  ```bash
150
- rskim file.rs --mode full
162
+ skim file.rs --mode full
151
163
  ```
152
164
 
153
165
  ## Examples
@@ -156,37 +168,37 @@ rskim file.rs --mode full
156
168
 
157
169
  ```bash
158
170
  # Get overview of all TypeScript files
159
- find src -name '*.ts' -exec rskim {} \;
171
+ find src -name '*.ts' -exec skim {} \;
160
172
 
161
173
  # Extract all Python function signatures
162
- rskim app.py --mode signatures > api.txt
174
+ skim app.py --mode signatures > api.txt
163
175
 
164
176
  # Review Rust types
165
- rskim lib.rs --mode types | less
177
+ skim lib.rs --mode types | less
166
178
  ```
167
179
 
168
180
  ### Prepare code for LLMs
169
181
 
170
182
  ```bash
171
183
  # Reduce token count before sending to GPT
172
- rskim large_file.ts | wc -w
184
+ skim large_file.ts | wc -w
173
185
  # Output: 150 (was 600)
174
186
 
175
187
  # Get just the API surface
176
- rskim server.py --mode signatures | pbcopy
188
+ skim server.py --mode signatures | pbcopy
177
189
  ```
178
190
 
179
191
  ### Pipe workflows
180
192
 
181
193
  ```bash
182
194
  # Skim and highlight
183
- rskim file.rs | bat -l rust
195
+ skim file.rs | bat -l rust
184
196
 
185
197
  # Skim and search
186
- rskim file.ts | grep "interface"
198
+ skim file.ts | grep "interface"
187
199
 
188
200
  # Skim multiple files
189
- cat *.py | rskim - --language=python
201
+ cat *.py | skim - --language=python
190
202
  ```
191
203
 
192
204
  ## Supported Languages
@@ -222,7 +234,7 @@ For programmatic usage, see the [`rskim-core`](https://crates.io/crates/rskim-co
222
234
 
223
235
  - [Repository](https://github.com/dean0x/skim)
224
236
  - [Library Documentation](https://docs.rs/rskim-core)
225
- - [npm Package](https://www.npmjs.com/package/rskim) (coming soon)
237
+ - [npm Package](https://www.npmjs.com/package/rskim)
226
238
 
227
239
  ## License
228
240
 
Binary file
Binary file
Binary file
@@ -7,9 +7,9 @@ function getBinaryPath() {
7
7
  const platform = process.platform;
8
8
  const arch = process.arch;
9
9
 
10
- let binaryName = 'rskim';
10
+ let binaryName = 'skim';
11
11
  if (platform === 'win32') {
12
- binaryName = 'rskim.exe';
12
+ binaryName = 'skim.exe';
13
13
  }
14
14
 
15
15
  // Try to find the binary in the package
@@ -24,7 +24,7 @@ function getBinaryPath() {
24
24
  }
25
25
  }
26
26
 
27
- console.error('ERROR: rskim binary not found for your platform');
27
+ console.error('ERROR: skim binary not found for your platform');
28
28
  console.error(`Platform: ${platform}, Architecture: ${arch}`);
29
29
  console.error('Please report this issue at: https://github.com/dean0x/skim/issues');
30
30
  process.exit(1);
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "rskim",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "Smart code reader - streaming code transformation for AI agents",
5
5
  "bin": {
6
- "rskim": "./bin/rskim.js"
6
+ "skim": "./bin/skim.js"
7
7
  },
8
8
  "repository": {
9
9
  "type": "git",