@onkernel/cli 0.13.2 → 0.13.4
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 +53 -3
- package/package.json +19 -19
package/README.md
CHANGED
|
@@ -104,6 +104,32 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
104
104
|
- `--no-color` - Disable color output
|
|
105
105
|
- `--log-level <level>` - Set log level (trace, debug, info, warn, error, fatal, print)
|
|
106
106
|
|
|
107
|
+
## JSON Output
|
|
108
|
+
|
|
109
|
+
Many commands support JSON output for scripting and automation. Use `--output json` or `-o json` to get machine-readable output:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Get browser session details as JSON
|
|
113
|
+
kernel browsers create -o json
|
|
114
|
+
|
|
115
|
+
# List apps as JSON
|
|
116
|
+
kernel app list -o json
|
|
117
|
+
|
|
118
|
+
# Deploy with JSONL streaming output (one JSON object per line)
|
|
119
|
+
kernel deploy index.ts -o json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Commands with JSON output support:
|
|
123
|
+
- **Browsers**: `create`, `list`, `get`, `view`
|
|
124
|
+
- **Browser Pools**: `create`, `list`, `get`, `update`, `acquire`
|
|
125
|
+
- **Profiles**: `create`, `list`, `get`
|
|
126
|
+
- **Extensions**: `upload`, `list`
|
|
127
|
+
- **Proxies**: `create`, `list`, `get`
|
|
128
|
+
- **Apps**: `list`, `history`
|
|
129
|
+
- **Deploy**: `deploy` (JSONL streaming), `history`
|
|
130
|
+
- **Invoke**: `invoke` (JSONL streaming), `history`
|
|
131
|
+
- **Browser Sub-commands**: `replays list/start`, `process exec/spawn`, `fs file-info/list-files`
|
|
132
|
+
|
|
107
133
|
### Authentication
|
|
108
134
|
|
|
109
135
|
- `kernel login [--force]` - Login via OAuth 2.0
|
|
@@ -134,6 +160,7 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
134
160
|
- `--force` - Allow overwriting existing version
|
|
135
161
|
- `--env <KEY=VALUE>`, `-e` - Set environment variables (can be used multiple times)
|
|
136
162
|
- `--env-file <file>` - Load environment variables from file (can be used multiple times)
|
|
163
|
+
- `--output json`, `-o json` - Output JSONL (one JSON object per line for each event)
|
|
137
164
|
|
|
138
165
|
- `kernel deploy logs <deployment_id>` - Stream logs for a deployment
|
|
139
166
|
|
|
@@ -143,6 +170,7 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
143
170
|
|
|
144
171
|
- `kernel deploy history [app_name]` - Show deployment history
|
|
145
172
|
- `--limit <n>` - Max deployments to return (default: 100; 0 = all)
|
|
173
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
146
174
|
|
|
147
175
|
### App Management
|
|
148
176
|
|
|
@@ -152,14 +180,17 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
152
180
|
- `--payload <json>`, `-p` - JSON payload for the action
|
|
153
181
|
- `--payload-file <path>`, `-f` - Read JSON payload from a file (use `-` for stdin)
|
|
154
182
|
- `--sync`, `-s` - Invoke synchronously (timeout after 60s)
|
|
183
|
+
- `--output json`, `-o json` - Output JSONL (one JSON object per line for each event)
|
|
155
184
|
|
|
156
185
|
- `kernel app list` - List deployed apps
|
|
157
186
|
|
|
158
187
|
- `--name <app_name>` - Filter by app name
|
|
159
188
|
- `--version <version>` - Filter by version
|
|
189
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
160
190
|
|
|
161
191
|
- `kernel app history <app_name>` - Show deployment history for an app
|
|
162
192
|
- `--limit <n>` - Max deployments to return (default: 100; 0 = all)
|
|
193
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
163
194
|
|
|
164
195
|
### Logs
|
|
165
196
|
|
|
@@ -172,21 +203,26 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
172
203
|
### Browser Management
|
|
173
204
|
|
|
174
205
|
- `kernel browsers list` - List running browsers
|
|
206
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
175
207
|
- `kernel browsers create` - Create a new browser session
|
|
176
208
|
- `-s, --stealth` - Launch browser in stealth mode to avoid detection
|
|
177
209
|
- `-H, --headless` - Launch browser without GUI access
|
|
178
210
|
- `--kiosk` - Launch browser in kiosk mode
|
|
179
211
|
- `--pool-id <id>` - Acquire a browser from the specified pool (mutually exclusive with --pool-name; ignores other session flags)
|
|
180
212
|
- `--pool-name <name>` - Acquire a browser from the pool name (mutually exclusive with --pool-id; ignores other session flags)
|
|
213
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
181
214
|
- _Note: When a pool is specified, omit other session configuration flags—pool settings determine profile, proxy, viewport, etc._
|
|
182
215
|
- `kernel browsers delete <id>` - Delete a browser
|
|
183
216
|
- `-y, --yes` - Skip confirmation prompt
|
|
184
217
|
- `kernel browsers view <id>` - Get live view URL for a browser
|
|
218
|
+
- `--output json`, `-o json` - Output JSON with liveViewUrl
|
|
219
|
+
- `kernel browsers get <id>` - Get detailed browser session info
|
|
220
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
185
221
|
|
|
186
222
|
### Browser Pools
|
|
187
223
|
|
|
188
224
|
- `kernel browser-pools list` - List browser pools
|
|
189
|
-
- `-o
|
|
225
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
190
226
|
- `kernel browser-pools create` - Create a browser pool
|
|
191
227
|
- `--name <name>` - Optional unique name for the pool
|
|
192
228
|
- `--size <n>` - Number of browsers in the pool (required)
|
|
@@ -194,14 +230,17 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
194
230
|
- `--timeout <seconds>` - Idle timeout for browsers acquired from the pool
|
|
195
231
|
- `--stealth`, `--headless`, `--kiosk` - Default pool configuration
|
|
196
232
|
- `--profile-id`, `--profile-name`, `--save-changes`, `--proxy-id`, `--extension`, `--viewport` - Same semantics as `kernel browsers create`
|
|
233
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
197
234
|
- `kernel browser-pools get <id-or-name>` - Get pool details
|
|
198
|
-
- `-o
|
|
235
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
199
236
|
- `kernel browser-pools update <id-or-name>` - Update pool configuration
|
|
200
237
|
- Same flags as create plus `--discard-all-idle` to discard all idle browsers in the pool and refill at the specified fill rate
|
|
238
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
201
239
|
- `kernel browser-pools delete <id-or-name>` - Delete a pool
|
|
202
240
|
- `--force` - Force delete even if browsers are leased
|
|
203
241
|
- `kernel browser-pools acquire <id-or-name>` - Acquire a browser from the pool
|
|
204
242
|
- `--timeout <seconds>` - Acquire timeout before returning 204
|
|
243
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
205
244
|
- `kernel browser-pools release <id-or-name>` - Release a browser back to the pool
|
|
206
245
|
- `--session-id <id>` - Browser session ID to release (required)
|
|
207
246
|
- `--reuse` - Reuse the browser instance (default: true)
|
|
@@ -218,12 +257,14 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
218
257
|
### Browser Replays
|
|
219
258
|
|
|
220
259
|
- `kernel browsers replays list <id>` - List replays for a browser
|
|
260
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
221
261
|
- `kernel browsers replays start <id>` - Start a replay recording
|
|
222
262
|
- `--framerate <fps>` - Recording framerate (fps)
|
|
223
263
|
- `--max-duration <seconds>` - Maximum duration in seconds
|
|
264
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
224
265
|
- `kernel browsers replays stop <id> <replay-id>` - Stop a replay recording
|
|
225
266
|
- `kernel browsers replays download <id> <replay-id>` - Download a replay video
|
|
226
|
-
- `-
|
|
267
|
+
- `-f, --output-file <path>` - Output file path for the replay video
|
|
227
268
|
|
|
228
269
|
### Browser Process Control
|
|
229
270
|
|
|
@@ -234,6 +275,7 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
234
275
|
- `--timeout <seconds>` - Timeout in seconds
|
|
235
276
|
- `--as-user <user>` - Run as user
|
|
236
277
|
- `--as-root` - Run as root
|
|
278
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
237
279
|
- `kernel browsers process spawn <id> [--] [command...]` - Execute a command asynchronously
|
|
238
280
|
- `--command <cmd>` - Command to execute (optional; if omitted, trailing args are executed via /bin/bash -c)
|
|
239
281
|
- `--args <args>` - Command arguments
|
|
@@ -241,6 +283,7 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
241
283
|
- `--timeout <seconds>` - Timeout in seconds
|
|
242
284
|
- `--as-user <user>` - Run as user
|
|
243
285
|
- `--as-root` - Run as root
|
|
286
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
244
287
|
- `kernel browsers process kill <id> <process-id>` - Send a signal to a process
|
|
245
288
|
- `--signal <signal>` - Signal to send: TERM, KILL, INT, HUP (default: TERM)
|
|
246
289
|
- `kernel browsers process status <id> <process-id>` - Get process status
|
|
@@ -262,8 +305,10 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
262
305
|
- `-o, --output <path>` - Output zip file path
|
|
263
306
|
- `kernel browsers fs file-info <id>` - Get file or directory info
|
|
264
307
|
- `--path <path>` - Absolute file or directory path (required)
|
|
308
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
265
309
|
- `kernel browsers fs list-files <id>` - List files in a directory
|
|
266
310
|
- `--path <path>` - Absolute directory path (required)
|
|
311
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
267
312
|
- `kernel browsers fs move <id>` - Move or rename a file or directory
|
|
268
313
|
- `--src <path>` - Absolute source path (required)
|
|
269
314
|
- `--dest <path>` - Absolute destination path (required)
|
|
@@ -344,8 +389,10 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
344
389
|
### Extension Management
|
|
345
390
|
|
|
346
391
|
- `kernel extensions list` - List all uploaded extensions
|
|
392
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
347
393
|
- `kernel extensions upload <directory>` - Upload an unpacked browser extension directory
|
|
348
394
|
- `--name <name>` - Optional unique extension name
|
|
395
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
349
396
|
- `kernel extensions download <id-or-name>` - Download an extension archive
|
|
350
397
|
- `--to <directory>` - Output directory (required)
|
|
351
398
|
- `kernel extensions download-web-store <url>` - Download an extension from the Chrome Web Store
|
|
@@ -357,8 +404,11 @@ Create an API key from the [Kernel dashboard](https://dashboard.onkernel.com).
|
|
|
357
404
|
### Proxy Management
|
|
358
405
|
|
|
359
406
|
- `kernel proxies list` - List proxy configurations
|
|
407
|
+
- `--output json`, `-o json` - Output raw JSON array
|
|
360
408
|
- `kernel proxies get <id>` - Get a proxy configuration by ID
|
|
409
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
361
410
|
- `kernel proxies create` - Create a new proxy configuration
|
|
411
|
+
- `--output json`, `-o json` - Output raw JSON object
|
|
362
412
|
|
|
363
413
|
- `--name <name>` - Proxy configuration name
|
|
364
414
|
- `--type <type>` - Proxy type: datacenter, isp, residential, mobile, custom (required)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onkernel/cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"description": "Kernel CLI",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"postinstall": "node install.js",
|
|
@@ -34,75 +34,75 @@
|
|
|
34
34
|
},
|
|
35
35
|
"archives": {
|
|
36
36
|
"darwin-arm64": {
|
|
37
|
-
"name": "kernel_0.13.
|
|
38
|
-
"url": "https://github.com/kernel/cli/releases/download/v0.13.
|
|
37
|
+
"name": "kernel_0.13.4_darwin_arm64.tar.gz",
|
|
38
|
+
"url": "https://github.com/kernel/cli/releases/download/v0.13.4/kernel_0.13.4_darwin_arm64.tar.gz",
|
|
39
39
|
"bins": [
|
|
40
40
|
"kernel"
|
|
41
41
|
],
|
|
42
42
|
"format": "tar.gz",
|
|
43
43
|
"checksum": {
|
|
44
44
|
"algorithm": "sha256",
|
|
45
|
-
"digest": "
|
|
45
|
+
"digest": "105599278b2f1bcfc35deafb215ed8cc95bf469491f4f0c24d69427fbdd5c282"
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"darwin-x64": {
|
|
49
|
-
"name": "kernel_0.13.
|
|
50
|
-
"url": "https://github.com/kernel/cli/releases/download/v0.13.
|
|
49
|
+
"name": "kernel_0.13.4_darwin_amd64.tar.gz",
|
|
50
|
+
"url": "https://github.com/kernel/cli/releases/download/v0.13.4/kernel_0.13.4_darwin_amd64.tar.gz",
|
|
51
51
|
"bins": [
|
|
52
52
|
"kernel"
|
|
53
53
|
],
|
|
54
54
|
"format": "tar.gz",
|
|
55
55
|
"checksum": {
|
|
56
56
|
"algorithm": "sha256",
|
|
57
|
-
"digest": "
|
|
57
|
+
"digest": "4c7013d78f98b5ea77d5d37b8a5e328380f0444cbb3f7b326b8b14e6c6192846"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"linux-arm64": {
|
|
61
|
-
"name": "kernel_0.13.
|
|
62
|
-
"url": "https://github.com/kernel/cli/releases/download/v0.13.
|
|
61
|
+
"name": "kernel_0.13.4_linux_arm64.tar.gz",
|
|
62
|
+
"url": "https://github.com/kernel/cli/releases/download/v0.13.4/kernel_0.13.4_linux_arm64.tar.gz",
|
|
63
63
|
"bins": [
|
|
64
64
|
"kernel"
|
|
65
65
|
],
|
|
66
66
|
"format": "tar.gz",
|
|
67
67
|
"checksum": {
|
|
68
68
|
"algorithm": "sha256",
|
|
69
|
-
"digest": "
|
|
69
|
+
"digest": "775cf5afb055c700dfa843215b3a6f2de992f81213fa1f205184ea7434e6cd98"
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"linux-x64": {
|
|
73
|
-
"name": "kernel_0.13.
|
|
74
|
-
"url": "https://github.com/kernel/cli/releases/download/v0.13.
|
|
73
|
+
"name": "kernel_0.13.4_linux_amd64.tar.gz",
|
|
74
|
+
"url": "https://github.com/kernel/cli/releases/download/v0.13.4/kernel_0.13.4_linux_amd64.tar.gz",
|
|
75
75
|
"bins": [
|
|
76
76
|
"kernel"
|
|
77
77
|
],
|
|
78
78
|
"format": "tar.gz",
|
|
79
79
|
"checksum": {
|
|
80
80
|
"algorithm": "sha256",
|
|
81
|
-
"digest": "
|
|
81
|
+
"digest": "88fb89d7e973aa39d7ea0e2c55d47a41593e87b4465698258dad0332221741d5"
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
84
|
"win32-arm64": {
|
|
85
|
-
"name": "kernel_0.13.
|
|
86
|
-
"url": "https://github.com/kernel/cli/releases/download/v0.13.
|
|
85
|
+
"name": "kernel_0.13.4_windows_arm64.tar.gz",
|
|
86
|
+
"url": "https://github.com/kernel/cli/releases/download/v0.13.4/kernel_0.13.4_windows_arm64.tar.gz",
|
|
87
87
|
"bins": [
|
|
88
88
|
"kernel.exe"
|
|
89
89
|
],
|
|
90
90
|
"format": "tar.gz",
|
|
91
91
|
"checksum": {
|
|
92
92
|
"algorithm": "sha256",
|
|
93
|
-
"digest": "
|
|
93
|
+
"digest": "e25e4f60246cd43861aba5f7072fec3f3d08bff5eb17916d639d298fd59f6674"
|
|
94
94
|
}
|
|
95
95
|
},
|
|
96
96
|
"win32-x64": {
|
|
97
|
-
"name": "kernel_0.13.
|
|
98
|
-
"url": "https://github.com/kernel/cli/releases/download/v0.13.
|
|
97
|
+
"name": "kernel_0.13.4_windows_amd64.tar.gz",
|
|
98
|
+
"url": "https://github.com/kernel/cli/releases/download/v0.13.4/kernel_0.13.4_windows_amd64.tar.gz",
|
|
99
99
|
"bins": [
|
|
100
100
|
"kernel.exe"
|
|
101
101
|
],
|
|
102
102
|
"format": "tar.gz",
|
|
103
103
|
"checksum": {
|
|
104
104
|
"algorithm": "sha256",
|
|
105
|
-
"digest": "
|
|
105
|
+
"digest": "8e6621ed5b61aa637a825d9ebab21815b1bb2790191618554a07561348608f9d"
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|