runhuman 1.12.0 → 2.1.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 +200 -5
- package/dist/index.js +105 -103
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,6 +61,68 @@ If a prefix matches multiple resources, you'll be prompted to provide more chara
|
|
|
61
61
|
|
|
62
62
|
**Destructive operations** (`projects delete`, `keys delete`, `projects transfer --to-org`) require the full ID to prevent accidental mismatches.
|
|
63
63
|
|
|
64
|
+
## Global Flags
|
|
65
|
+
|
|
66
|
+
Every command accepts the same four global flags:
|
|
67
|
+
|
|
68
|
+
- `-j, --json` — emit machine-readable JSON to stdout (otherwise pretty-printed output)
|
|
69
|
+
- `-q, --quiet` — suppress success and info messages (stderr deprecation/error output is preserved)
|
|
70
|
+
- `-y, --yes` — skip confirmation prompts on destructive operations
|
|
71
|
+
- `--no-color` — disable ANSI color codes (also honored from `RUNHUMAN_NO_COLOR=1`)
|
|
72
|
+
|
|
73
|
+
**`-f, --force` is reserved for override-a-guard semantics**, not confirmation-skip. Today it only appears on `templates create`, where it means "overwrite an existing template with the same name."
|
|
74
|
+
|
|
75
|
+
### Output modes
|
|
76
|
+
|
|
77
|
+
`-j, --json` is the single output-mode flag. The CLI does not offer a `-o, --output` / `--format` choice à la kubectl — pretty output for humans and JSON for scripts are the two supported shapes. Any future structured-text formats (YAML, CSV, etc.) would be added as their own flags rather than via a format matrix.
|
|
78
|
+
|
|
79
|
+
This also means `-o` remains bound to `--organization` on every command that has one, matching the noun-first mental model the rest of the CLI uses.
|
|
80
|
+
|
|
81
|
+
### JSON envelope
|
|
82
|
+
|
|
83
|
+
Every command that emits JSON uses the same envelope:
|
|
84
|
+
|
|
85
|
+
```jsonc
|
|
86
|
+
// Success
|
|
87
|
+
{
|
|
88
|
+
"success": true,
|
|
89
|
+
"data": <payload>, // see below
|
|
90
|
+
"pagination": { // only on list commands
|
|
91
|
+
"total": 42,
|
|
92
|
+
"limit": 20,
|
|
93
|
+
"offset": 0,
|
|
94
|
+
"hasMore": true
|
|
95
|
+
},
|
|
96
|
+
"warnings": ["..."], // optional, non-fatal server-side warnings
|
|
97
|
+
"timestamp": "2026-04-24T12:34:56.789Z"
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Failure
|
|
101
|
+
{
|
|
102
|
+
"success": false,
|
|
103
|
+
"error": {
|
|
104
|
+
"message": "...",
|
|
105
|
+
"code": "OPTIONAL_ERROR_CODE",
|
|
106
|
+
"details": { /* shape varies */ }
|
|
107
|
+
},
|
|
108
|
+
"timestamp": "2026-04-24T12:34:56.789Z"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Payload conventions:
|
|
113
|
+
|
|
114
|
+
- **List commands** (`projects list`, `jobs list`, `orgs list`, etc.) put their items under `data.items` and their pagination on the envelope. Never `data.jobs` or `data.projects` — always `data.items`.
|
|
115
|
+
- **Show / create / update commands** put the entity directly as `data` (e.g. `data: { id, name, ... }`).
|
|
116
|
+
- **Delete / archive / cancel commands** return a structured action payload such as `data: { id, deleted: true }`, `data: { id, archived: true }`, `data: { id, cancelled: true }`. The envelope already carries `success: true`; `data` never echoes it.
|
|
117
|
+
|
|
118
|
+
A generic script can parse any CLI command's output without inspecting which command was run:
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
runhuman projects list --json | jq '.data.items[].id'
|
|
122
|
+
runhuman projects show <id> --json | jq '.data.id'
|
|
123
|
+
runhuman projects delete <id> --json | jq '.data.deleted'
|
|
124
|
+
```
|
|
125
|
+
|
|
64
126
|
## Commands
|
|
65
127
|
|
|
66
128
|
### Jobs
|
|
@@ -169,14 +231,63 @@ runhuman list --limit 20 --offset 40
|
|
|
169
231
|
|
|
170
232
|
**Options:**
|
|
171
233
|
- `-p, --project <id>` - Filter by project
|
|
234
|
+
- `--org <id>` - Scope to all projects in an organization (mutually exclusive with `--project`)
|
|
172
235
|
- `-n, --limit <number>` - Maximum number of jobs (default: 20)
|
|
173
236
|
- `--offset <number>` - Pagination offset (default: 0)
|
|
174
|
-
-
|
|
237
|
+
- `-j, --json` - Output as JSON
|
|
238
|
+
|
|
239
|
+
#### `artifact <jobId> <type>`
|
|
240
|
+
|
|
241
|
+
Download a raw session artifact. Useful for piping transcripts, console logs, or network data into your own tools.
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# Print the transcript
|
|
245
|
+
runhuman job artifact job_abc123 transcript
|
|
246
|
+
|
|
247
|
+
# Pipe raw console logs into jq
|
|
248
|
+
runhuman job artifact job_abc123 console-logs --json | jq '.data.consoleMessages[]'
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Arguments:**
|
|
252
|
+
- `<jobId>` - Job ID
|
|
253
|
+
- `<type>` - One of: `structured-output`, `transcript`, `console-logs`, `network-requests`, `conversation`, `events`, `key-moments`
|
|
254
|
+
|
|
255
|
+
**Options:**
|
|
256
|
+
- `-j, --json` - Output as JSON (raw artifact shape wrapped in the standard envelope)
|
|
257
|
+
|
|
258
|
+
Rich artifacts are paid-tier gated server-side; ungated requests return a clean "subscription required" error.
|
|
259
|
+
|
|
260
|
+
#### `share <jobId>` / `unshare <jobId>`
|
|
261
|
+
|
|
262
|
+
Toggle public sharing for a job. `share` enables and prints the public URL; `unshare` disables.
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
runhuman job share job_abc123
|
|
266
|
+
runhuman job unshare job_abc123
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
#### `create-issue <jobId> --index <n>`
|
|
270
|
+
|
|
271
|
+
File one extracted finding from a completed job as a GitHub issue. Mirrors the web UI's per-finding "Create Issue" button. Simple form only — the CLI submits the finding unedited; use the web UI or `gh issue edit` if you want to change title/body.
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# File the first extracted finding to the job's default GitHub repo
|
|
275
|
+
runhuman job create-issue job_abc123 --index 0
|
|
276
|
+
|
|
277
|
+
# Override the target repo
|
|
278
|
+
runhuman job create-issue job_abc123 --index 0 --repo owner/repo
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
**Required options:**
|
|
282
|
+
- `--index <n>` - Zero-based index into `job.extractedIssues`
|
|
283
|
+
|
|
284
|
+
**Options:**
|
|
285
|
+
- `--repo <owner/repo>` - Override the job's default GitHub repo
|
|
175
286
|
- `-j, --json` - Output as JSON
|
|
176
287
|
|
|
177
288
|
#### `delete <jobId>`
|
|
178
289
|
|
|
179
|
-
Delete a job
|
|
290
|
+
Delete a job.
|
|
180
291
|
|
|
181
292
|
```bash
|
|
182
293
|
runhuman delete job_abc123 --force
|
|
@@ -231,6 +342,44 @@ runhuman orgs switch org_abc123
|
|
|
231
342
|
runhuman orgs switch org_abc123 --global # all directories (default)
|
|
232
343
|
```
|
|
233
344
|
|
|
345
|
+
#### `orgs usage [organizationId]`
|
|
346
|
+
|
|
347
|
+
Show usage analytics: total jobs, cost, per-project breakdown, over-time series.
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
# Default: last 30 days
|
|
351
|
+
runhuman orgs usage
|
|
352
|
+
|
|
353
|
+
# Preset period
|
|
354
|
+
runhuman orgs usage --period 7d
|
|
355
|
+
runhuman orgs usage --period all
|
|
356
|
+
|
|
357
|
+
# Specific month
|
|
358
|
+
runhuman orgs usage --year 2026 --month 4
|
|
359
|
+
|
|
360
|
+
# Pipe the full response into your own tool
|
|
361
|
+
runhuman orgs usage --json | jq '.data.byHour'
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
Default rendering shows the summary plus the top 5 projects by job count. `--json` returns the full response including `overTime`, `byHour`, and `bySource` arrays for scripting.
|
|
365
|
+
|
|
366
|
+
**Options:**
|
|
367
|
+
- `--period <window>` - `7d` | `30d` | `90d` | `all` (mutually exclusive with `--year/--month`)
|
|
368
|
+
- `--year <y>` / `--month <m>` - Specific time window (month requires year)
|
|
369
|
+
- `-j, --json` - Full response JSON
|
|
370
|
+
|
|
371
|
+
#### `orgs invitations list|revoke`
|
|
372
|
+
|
|
373
|
+
Manage pending invitations sent via `orgs invite`.
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
# List pending invitations
|
|
377
|
+
runhuman orgs invitations list --organization org_abc123
|
|
378
|
+
|
|
379
|
+
# Revoke one
|
|
380
|
+
runhuman orgs invitations revoke inv_xyz789 --organization org_abc123 --yes
|
|
381
|
+
```
|
|
382
|
+
|
|
234
383
|
### Projects
|
|
235
384
|
|
|
236
385
|
#### `projects list`
|
|
@@ -307,7 +456,7 @@ runhuman projects transfer proj_abc123 --to-org org_target123
|
|
|
307
456
|
|
|
308
457
|
#### `projects delete <projectId>`
|
|
309
458
|
|
|
310
|
-
Delete a project
|
|
459
|
+
Delete a project. Requires the full project ID.
|
|
311
460
|
|
|
312
461
|
```bash
|
|
313
462
|
runhuman projects delete proj_abc123 --force
|
|
@@ -379,7 +528,6 @@ runhuman keys new "CI/CD Key" --organization org_abc123 # alias
|
|
|
379
528
|
|
|
380
529
|
**Options:**
|
|
381
530
|
- `-o, --organization <id>` - Organization ID (required)
|
|
382
|
-
- `--copy` - Copy key to clipboard
|
|
383
531
|
|
|
384
532
|
#### `keys show <keyId>`
|
|
385
533
|
|
|
@@ -395,7 +543,7 @@ runhuman keys show key_abc123 --show-key
|
|
|
395
543
|
|
|
396
544
|
#### `keys delete <keyId>`
|
|
397
545
|
|
|
398
|
-
Delete an API key
|
|
546
|
+
Delete an API key. Requires the full key ID.
|
|
399
547
|
|
|
400
548
|
```bash
|
|
401
549
|
runhuman keys delete key_abc123 --force
|
|
@@ -547,6 +695,53 @@ runhuman github bulk-test -r owner/repo -u https://google.com \
|
|
|
547
695
|
- `-t, --template <id>` - Template ID to use
|
|
548
696
|
- `-n, --limit <number>` - Maximum number of jobs to create (default: 10)
|
|
549
697
|
|
|
698
|
+
#### `github installation refresh`
|
|
699
|
+
|
|
700
|
+
Force-refresh a GitHub App installation's repo/permissions list. Use this after granting the app access to new repos if they aren't visible yet.
|
|
701
|
+
|
|
702
|
+
```bash
|
|
703
|
+
runhuman github installation refresh --installation 987654321 --organization org_abc123
|
|
704
|
+
```
|
|
705
|
+
|
|
706
|
+
**Required options:**
|
|
707
|
+
- `--installation <id>` - GitHub installation ID
|
|
708
|
+
|
|
709
|
+
**Options:**
|
|
710
|
+
- `-o, --organization <id>` - Organization ID (defaults to current org context)
|
|
711
|
+
|
|
712
|
+
### Billing
|
|
713
|
+
|
|
714
|
+
User-scoped reads. Purchase flows and plan changes stay in the web UI — use `billing portal` to get there.
|
|
715
|
+
|
|
716
|
+
#### `billing balance`
|
|
717
|
+
|
|
718
|
+
Show credit balance for the authenticated user's primary organization (or override with `-o`).
|
|
719
|
+
|
|
720
|
+
```bash
|
|
721
|
+
runhuman billing balance
|
|
722
|
+
runhuman billing balance --organization org_abc123
|
|
723
|
+
```
|
|
724
|
+
|
|
725
|
+
#### `billing subscription`
|
|
726
|
+
|
|
727
|
+
Show the active subscription (tier, billing cycle, renewal date) plus any active add-ons.
|
|
728
|
+
|
|
729
|
+
```bash
|
|
730
|
+
runhuman billing subscription
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
#### `billing portal [--open]`
|
|
734
|
+
|
|
735
|
+
Return a one-time URL to the Polar customer portal (payment method, invoices, cancellation).
|
|
736
|
+
|
|
737
|
+
```bash
|
|
738
|
+
# Print the URL
|
|
739
|
+
runhuman billing portal
|
|
740
|
+
|
|
741
|
+
# Open it in the browser
|
|
742
|
+
runhuman billing portal --open
|
|
743
|
+
```
|
|
744
|
+
|
|
550
745
|
### Authentication
|
|
551
746
|
|
|
552
747
|
#### `login`
|