@ornncompute/cli 0.2.23 → 1.0.25
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 +304 -420
- package/package.json +12 -6
- package/src/admin-capacity-reservations.mjs +280 -0
- package/src/admin-command-handlers.mjs +57 -0
- package/src/admin-enrollment.mjs +680 -0
- package/src/admin-mutations.mjs +187 -0
- package/src/admin-node-diagnostics.mjs +412 -0
- package/src/admin-node-lifecycle.mjs +908 -0
- package/src/admin-shell.mjs +322 -0
- package/src/api-client.mjs +81 -28
- package/src/atomic-output.mjs +112 -0
- package/src/auth-store.mjs +182 -11
- package/src/capability-catalog.mjs +7 -0
- package/src/catalog-shell.mjs +1350 -0
- package/src/cli.mjs +123 -10266
- package/src/connect-mode-handlers.mjs +170 -0
- package/src/device-auth.mjs +178 -61
- package/src/evidence-commands.mjs +1340 -0
- package/src/external-bucket-commands.mjs +1374 -0
- package/src/interaction-runtime.mjs +310 -0
- package/src/kubernetes-commands.mjs +2229 -0
- package/src/launch-mode-handlers.mjs +119 -0
- package/src/machine-reference.mjs +277 -0
- package/src/mount-commands.mjs +1146 -0
- package/src/session-commands.mjs +565 -0
- package/src/slurm-commands.mjs +263 -0
- package/src/startup.mjs +34 -11
- package/src/storage-commands.mjs +1144 -0
- package/src/update.mjs +172 -24
- package/src/vm-commands.mjs +4273 -0
- package/src/vpn-secret-output.mjs +150 -0
- package/src/wait-runtime.mjs +231 -0
- package/vendor/capabilities/capabilities/admin-capacity-reservations.js +126 -0
- package/vendor/capabilities/capabilities/admin-enrollment.js +321 -0
- package/vendor/capabilities/capabilities/admin-node-diagnostics.js +88 -0
- package/vendor/capabilities/capabilities/admin-nodes-lifecycle.js +235 -0
- package/vendor/capabilities/capabilities/admin.js +89 -0
- package/vendor/capabilities/capabilities/capacity-offers.js +368 -0
- package/vendor/capabilities/capabilities/cli.js +156 -0
- package/vendor/capabilities/capabilities/clusters.js +150 -1
- package/vendor/capabilities/capabilities/compute.js +522 -0
- package/vendor/capabilities/capabilities/evidence.js +145 -0
- package/vendor/capabilities/capabilities/external-buckets.js +191 -0
- package/vendor/capabilities/capabilities/fleet.js +21 -5
- package/vendor/capabilities/capabilities/identity.js +114 -3
- package/vendor/capabilities/capabilities/listings.js +14 -8
- package/vendor/capabilities/capabilities/mounts.js +176 -0
- package/vendor/capabilities/capabilities/networks.js +1257 -0
- package/vendor/capabilities/capabilities/observability.js +38 -8
- package/vendor/capabilities/capabilities/tokens.js +20 -8
- package/vendor/capabilities/capabilities/volumes.js +178 -0
- package/vendor/capabilities/capability.js +19 -13
- package/vendor/capabilities/cli-catalog.js +65 -0
- package/vendor/capabilities/cli-migrations.js +288 -0
- package/vendor/capabilities/cli.js +7 -0
- package/vendor/capabilities/software-catalog.js +36 -0
- package/vendor/capabilities/spec-catalog.js +2 -2
- package/src/catalog-dispatch.mjs +0 -605
- package/src/color.mjs +0 -71
- package/vendor/capabilities/capabilities/clusters.d.ts +0 -2
- package/vendor/capabilities/capabilities/fleet.d.ts +0 -8
- package/vendor/capabilities/capabilities/identity.d.ts +0 -3
- package/vendor/capabilities/capabilities/listings.d.ts +0 -51
- package/vendor/capabilities/capabilities/observability.d.ts +0 -5
- package/vendor/capabilities/capabilities/staff-access.d.ts +0 -29
- package/vendor/capabilities/capabilities/staff-access.js +0 -278
- package/vendor/capabilities/capabilities/staff-commerce.d.ts +0 -160
- package/vendor/capabilities/capabilities/staff-commerce.js +0 -689
- package/vendor/capabilities/capabilities/staff-fleet.d.ts +0 -140
- package/vendor/capabilities/capabilities/staff-fleet.js +0 -538
- package/vendor/capabilities/capabilities/staff-gtm.d.ts +0 -142
- package/vendor/capabilities/capabilities/staff-gtm.js +0 -521
- package/vendor/capabilities/capabilities/staff-shared.d.ts +0 -47
- package/vendor/capabilities/capabilities/staff-shared.js +0 -98
- package/vendor/capabilities/capabilities/tokens.d.ts +0 -10
- package/vendor/capabilities/capabilities/users.d.ts +0 -2
- package/vendor/capabilities/capability.d.ts +0 -93
- package/vendor/capabilities/catalog.d.ts +0 -3
- package/vendor/capabilities/catalog.js +0 -26
- package/vendor/capabilities/index.d.ts +0 -16
- package/vendor/capabilities/index.js +0 -16
- package/vendor/capabilities/names.d.ts +0 -6
- package/vendor/capabilities/role.d.ts +0 -6
- package/vendor/capabilities/role.js +0 -17
- package/vendor/capabilities/spec-catalog.d.ts +0 -78
package/README.md
CHANGED
|
@@ -1,441 +1,325 @@
|
|
|
1
1
|
# Ornn CLI
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
volumes, attach SSH keys, SSH into launched machines, watch machine health
|
|
7
|
-
metrics, and view billing readouts.
|
|
3
|
+
`@ornncompute/cli` installs the `ornn` command. The CLI is a catalog-backed
|
|
4
|
+
client for customer compute journeys and the explicit staff namespace. It
|
|
5
|
+
sends browser and CLI traffic only through the API gateway.
|
|
8
6
|
|
|
9
|
-
For the
|
|
10
|
-
|
|
7
|
+
For the customer install and usage guide, see [`docs/cli.md`](../../docs/cli.md).
|
|
8
|
+
The shared capability catalog in `packages/capabilities` is the authority for
|
|
9
|
+
command identity, role visibility, input schemas, help, and resource discovery.
|
|
10
|
+
The CLI imports `@ornn/capabilities/cli`; packaging includes only that entrypoint's
|
|
11
|
+
dependencies, excluding staff bidding and CRM handlers.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
For GCS imports, start with the [source-bucket permissions and version-specific CLI guide](https://docs.ornn.com/cli#gcs-imports-and-storage-transfer-service).
|
|
14
|
+
It documents Ornn's Storage Transfer service agent, the required `gcloud` IAM
|
|
15
|
+
grants, and the current CLI 1.x GCS verification limitation. Scoped
|
|
16
|
+
`ornn help external-buckets connect`, `verify`, and `import` help links to the
|
|
17
|
+
same guide.
|
|
18
|
+
|
|
19
|
+
## Install and sign in
|
|
20
|
+
|
|
21
|
+
Node.js 20 or newer is required.
|
|
13
22
|
|
|
14
23
|
```bash
|
|
15
|
-
|
|
24
|
+
npm install -g @ornncompute/cli
|
|
25
|
+
ornn login
|
|
26
|
+
ornn context
|
|
16
27
|
```
|
|
17
28
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`~/.config/ornn/config.json`. The
|
|
23
|
-
installer prints a short Ornn Compute welcome banner and next steps; set
|
|
24
|
-
`ORNN_INSTALL_BANNER=0` to skip it or `ORNN_INSTALL_ANIMATION=0` to keep it
|
|
25
|
-
static.
|
|
26
|
-
|
|
27
|
-
`ornn whoami`, `ornn logout`, and `ornn status` call the API gateway's
|
|
28
|
-
`/v1/cli/session` and `/v1/cli/status` contracts. The gateway resolves the CLI
|
|
29
|
-
bearer itself; it never trusts caller-supplied identity or authorization-admin
|
|
30
|
-
headers. Logout asks the gateway to revoke the remote credential, then always
|
|
31
|
-
clears the local bearer. If revocation cannot be confirmed, the CLI reports
|
|
32
|
-
that the remote credential may remain active. Updated legacy installs that
|
|
33
|
-
saved only a deployed web/auth
|
|
34
|
-
origin map that known Ornn origin to its API gateway automatically; custom and
|
|
35
|
-
localhost combined endpoints are left unchanged.
|
|
36
|
-
|
|
37
|
-
## First machine
|
|
29
|
+
`ornn login` uses the browser device flow. Login links must use HTTP(S) on the configured authentication origin. Use `--no-browser` when the CLI must
|
|
30
|
+
print the URL instead of opening it. Session and endpoint configuration remains
|
|
31
|
+
in `~/.config/ornn`; the gateway re-derives organization and role scope from the
|
|
32
|
+
bearer on every request.
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
## Command map
|
|
35
|
+
|
|
36
|
+
The three primary customer journeys are:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
ornn launch # launch VM, Bare Metal, Kubernetes, or Slurm
|
|
40
|
+
ornn connect # derive SSH, kubeconfig, or Slurm-native access
|
|
41
|
+
ornn check # lifecycle, health, reachability, metrics, and logs
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Session and platform commands are:
|
|
45
|
+
|
|
46
|
+
```text
|
|
40
47
|
ornn login
|
|
41
|
-
ornn
|
|
42
|
-
ornn
|
|
43
|
-
|
|
44
|
-
ornn
|
|
45
|
-
ornn
|
|
46
|
-
ornn
|
|
47
|
-
ornn
|
|
48
|
+
ornn context
|
|
49
|
+
ornn logout
|
|
50
|
+
ornn status
|
|
51
|
+
ornn version
|
|
52
|
+
ornn update [--major]
|
|
53
|
+
ornn completion <bash|fish|zsh> --format human
|
|
54
|
+
ornn resources
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Advanced customer resources are registered under one noun and one verb:
|
|
58
|
+
|
|
59
|
+
```text
|
|
60
|
+
capacity-offers list | forecast | show
|
|
61
|
+
machines list | show | wait | switch | reboot | reset | metrics | logs
|
|
62
|
+
clusters list | show | wait | eligible-machines | add-node | remove-node | teardown | metrics | logs
|
|
63
|
+
ssh-keys list | add | delete
|
|
64
|
+
ssh-keys assignments list | assign | sync | status
|
|
65
|
+
private-networks list | show | create | update | delete
|
|
66
|
+
vpn-connections list | configure | disconnect
|
|
67
|
+
volumes list | show | create | refresh | clear | delete
|
|
68
|
+
volumes files list | upload | download | delete
|
|
69
|
+
volumes folders delete
|
|
70
|
+
volume-mounts candidates | show | attach | wait | detach
|
|
71
|
+
external-buckets list | show | connect | update-credentials | verify | import | disconnect
|
|
72
|
+
filesystems deploy | show | wait | delete
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Listing discovery is read-only: list, inspect, and forecast capacity, including
|
|
76
|
+
advertised prices. Purchases, bids, payments, resale, billing, and commercial
|
|
77
|
+
reservation management use the web app. Launch consumes already allocated
|
|
78
|
+
capacity; internal reservation lookups remain necessary for access and ownership.
|
|
79
|
+
|
|
80
|
+
Only admins can create listings or reservations through
|
|
81
|
+
`ornn admin capacity-offers create` and `ornn admin reservations create`.
|
|
82
|
+
The CLI and gateway both enforce the admin role before mutation. Both commands
|
|
83
|
+
retain explicit commercial-term validation and default-no human confirmation.
|
|
84
|
+
|
|
85
|
+
All staff discovery and execution starts at `ornn admin`. A fresh staff preflight
|
|
86
|
+
runs before the catalog is shown. The seven roots are:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
ornn admin users
|
|
90
|
+
ornn admin operators
|
|
91
|
+
ornn admin facilities
|
|
92
|
+
ornn admin nodes
|
|
93
|
+
ornn admin enrollment-tokens
|
|
94
|
+
ornn admin capacity-offers
|
|
95
|
+
ornn admin reservations
|
|
48
96
|
```
|
|
49
97
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
98
|
+
Every `ornn admin` command, read or mutation, requires an admin session.
|
|
99
|
+
`ornn admin nodes enroll` takes optional `--filter COMPARTMENT_IDS`
|
|
100
|
+
(omit to run every compartment step); the retired `--mode` flag is gone. The
|
|
101
|
+
gateway, not CLI metadata, authoritatively enforces the admin role.
|
|
102
|
+
|
|
103
|
+
Token revocation looks up the token by ID, including tokens outside the newest
|
|
104
|
+
500-row list. Creation-time checks and safe retries still apply.
|
|
53
105
|
|
|
54
|
-
##
|
|
106
|
+
## Catalog-generated discovery
|
|
55
107
|
|
|
56
108
|
```bash
|
|
57
|
-
ornn
|
|
58
|
-
ornn
|
|
59
|
-
ornn
|
|
60
|
-
ornn
|
|
61
|
-
ornn
|
|
62
|
-
ornn
|
|
63
|
-
ornn
|
|
64
|
-
ornn
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
ornn
|
|
81
|
-
ornn
|
|
82
|
-
ornn
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
ornn
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
ornn storage volumes clear <drive-id> [--yes] [--json]
|
|
145
|
-
ornn storage volumes delete <drive-id> [--yes] [--json]
|
|
146
|
-
ornn storage files ls <drive-id> [--prefix <path>] [--json]
|
|
147
|
-
ornn storage files upload <drive-id> <local-file> [--destination <path>] [--content-type <type>] [--json]
|
|
148
|
-
ornn storage files download <drive-id> <remote-path> [--output <path>] [--json]
|
|
149
|
-
ornn storage targets [--json]
|
|
150
|
-
ornn storage deploy <drive-id> --reservation <reservation-id> [--all-nodes] [--read-only|--read-write] [--json]
|
|
151
|
-
ornn storage status --reservation <reservation-id> [--watch] [--interval <seconds>] [--timeout <seconds>] [--json]
|
|
152
|
-
ornn storage detach --reservation <reservation-id> [--json]
|
|
153
|
-
ornn storage buckets list [--json]
|
|
154
|
-
ornn storage buckets show <drive-id> [--json]
|
|
155
|
-
ornn storage buckets connect gcs|s3|r2 --bucket <bucket>|--url <url> [--name <name>] [--prefix <prefix>] [--region <region>] [--account-id <id>|--endpoint-url <url>] [--access-key-id <id> --secret-access-key-file <path>] [--read-only|--read-write] [--verify] [--json]
|
|
156
|
-
ornn storage buckets update-credentials <drive-id> --access-key-id <id> --secret-access-key-file <path> [--json]
|
|
157
|
-
ornn storage buckets verify <drive-id> [--json]
|
|
158
|
-
ornn storage buckets disconnect <drive-id> [--json]
|
|
159
|
-
ornn storage filesystem deploy --reservation <reservation-id> [--performance-tier <tier>] [--capacity-gib <gib>] [--json]
|
|
160
|
-
ornn storage filesystem status --reservation <reservation-id> [--json]
|
|
161
|
-
ornn storage filesystem delete --reservation <reservation-id> [--yes] [--json]
|
|
162
|
-
ornn telemetry latest <node-id> [--span 15m] [--start <iso>] [--end <iso>] [--max-points <n>] [--json]
|
|
163
|
-
ornn telemetry tail <node-id> [--duration <seconds>] [--json]
|
|
164
|
-
ornn logs latest <node-id> [--stream kernel] [--count <n>] [--before <iso>] [--cursor <token>] [--json]
|
|
165
|
-
ornn logs tail <node-id> [--stream kernel] [--duration <seconds>] [--json]
|
|
166
|
-
ornn users query [--name <name>] [--email <email>] [--organization <name>] [--max <n>]
|
|
167
|
-
ornn keys list [--json]
|
|
168
|
-
ornn keys add [<public-key-file>] --label <label> [--public-key <key>] [--json]
|
|
169
|
-
ornn keys delete <key-id> [--json]
|
|
170
|
-
ornn access show <reservation-id> [--json]
|
|
171
|
-
ornn access activate <reservation-id> --key <path|id|label> [--mode bare-metal|vm] [--username <name>] [--network public|private] [--storage-load-drive-id <id>] [--storage-save-drive-id <id>] [--wait] [--no-open] [--json]
|
|
172
|
-
ornn access switch <reservation-id> --network public|private --key <path|id|label> [--mode bare-metal|vm] [--username <name>] [--wait] [--json]
|
|
173
|
-
ornn access push-keys <reservation-id> --ssh-key-id <id> [--json]
|
|
174
|
-
ornn access keys list <reservation-id> [--json]
|
|
175
|
-
ornn access keys add <reservation-id> --public-key <key> --label <label> [--json]
|
|
176
|
-
ornn access keys add <reservation-id> --public-key-file <path> --label <label> [--json]
|
|
177
|
-
ornn access keys push <reservation-id> --ssh-key-id <id> [--json]
|
|
178
|
-
ornn access keys status <reservation-id> [--json]
|
|
179
|
-
ornn ssh-keys list [--json]
|
|
180
|
-
ornn ssh-keys add --public-key <key> --label <label> [--json]
|
|
181
|
-
ornn ssh-keys add --public-key-file <path> --label <label> [--json]
|
|
182
|
-
ornn ssh-keys delete <key-id> [--json]
|
|
183
|
-
ornn billing summary [--json]
|
|
184
|
-
ornn billing invoices [--limit <1-500>] [--cursor <opaque>] [--json]
|
|
185
|
-
ornn billing showback --start <yyyy-mm-dd> --end <yyyy-mm-dd> [--json]
|
|
186
|
-
ornn billing open [--no-open] [--json]
|
|
187
|
-
ornn api <get|post|patch|put|delete> <allowlisted-path> [--data <json>] [--raw]
|
|
188
|
-
ornn logout
|
|
109
|
+
ornn
|
|
110
|
+
ornn help
|
|
111
|
+
ornn help machines
|
|
112
|
+
ornn machines --help
|
|
113
|
+
ornn help machines reset
|
|
114
|
+
ornn resources --format json
|
|
115
|
+
ornn completion bash --format human > ~/.local/share/bash-completion/completions/ornn
|
|
116
|
+
ornn admin
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Root help, scoped help, suggestions, and the advanced-resource index are
|
|
120
|
+
rendered from the same catalog bindings used for dispatch. Customer discovery
|
|
121
|
+
never contains admin children. There is no second parser or command registry.
|
|
122
|
+
|
|
123
|
+
## Interaction contract
|
|
124
|
+
|
|
125
|
+
An eligible human context requires TTY stdin and TTY stdout and no JSON/NDJSON
|
|
126
|
+
format. Human commands may guide selection, render a normalized review, and ask
|
|
127
|
+
default-no `[y/N]` consent. Empty input, EOF, and refusal submit nothing.
|
|
128
|
+
|
|
129
|
+
Automation supplies complete semantic inputs and an explicit format:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
ornn status --format json
|
|
133
|
+
ornn machines list --limit 100 --format ndjson
|
|
134
|
+
ornn launch RESERVATION_ID --mode vm --yes \
|
|
135
|
+
--idempotency-key caller-stable-key --format json
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Redirected commands require `--format human`, `--format json`, or
|
|
139
|
+
`--format ndjson`. The retired `--json` alias is rejected. Machine mode never
|
|
140
|
+
prompts or launches a browser. Inputs missing for a safe decision fail before
|
|
141
|
+
network, browser, or process I/O.
|
|
142
|
+
|
|
143
|
+
Global interaction modifiers are `--format`, `--guided`, `--yes`, `--wait`,
|
|
144
|
+
`--no-wait`, `--timeout`, `--no-browser`, `--overwrite`, and
|
|
145
|
+
`--idempotency-key`. Mutations that create or increase spend, erase data, tear
|
|
146
|
+
down resources, or reduce access require consent. Machine retries require a
|
|
147
|
+
caller-stable idempotency key and reconcile against durable owner state.
|
|
148
|
+
|
|
149
|
+
Permanent deletion and teardown requests never fire without consent. Private
|
|
150
|
+
networks, detached volumes, filesystem deployments, and Kubernetes or Slurm
|
|
151
|
+
clusters accept `--yes` for automation or ask an eligible human for default-no
|
|
152
|
+
confirmation. Clearing a volume or deleting nested content is live-terminal
|
|
153
|
+
only and always asks, even when `--yes` is present.
|
|
154
|
+
|
|
155
|
+
List commands use bounded `--limit` values and opaque `--cursor` values. Waits
|
|
156
|
+
poll only retryable transitional states, honor the caller deadline and
|
|
157
|
+
cancellation, and return the last observed state on timeout. Durable Bare Metal
|
|
158
|
+
workspace flows persist local recovery pointers for `launch --resume`.
|
|
159
|
+
Browser handoff is limited to login and organization authorization. Secret
|
|
160
|
+
bytes are written only by an explicit export command.
|
|
161
|
+
|
|
162
|
+
Human waits report throttled progress on stderr; NDJSON waits emit versioned
|
|
163
|
+
progress records, and JSON stays a single terminal envelope.
|
|
164
|
+
|
|
165
|
+
Eligible human output uses color when the output stream supports it.
|
|
166
|
+
`NO_COLOR` (including an empty value), `FORCE_COLOR`, and the global
|
|
167
|
+
`--no-color` flag are respected. JSON and NDJSON never contain ANSI escapes.
|
|
168
|
+
|
|
169
|
+
Exact unique machine hostnames are accepted anywhere a machine reference is
|
|
170
|
+
advertised, including JSON and NDJSON. The CLI resolves them through the
|
|
171
|
+
bounded owned-machine list and sends only the canonical machine ID to the
|
|
172
|
+
machine owner route. Bare `connect` discovers VM, Bare Metal,
|
|
173
|
+
Kubernetes, and Slurm targets before making one safe-fact choice across the
|
|
174
|
+
combined set. `connect --print` renders a native direct-access command; raw
|
|
175
|
+
secret `--print` rejects every explicit `--format`. Direct human `connect`
|
|
176
|
+
announces the native command and explains that Ctrl-C ends only local SSH while
|
|
177
|
+
the remote machine keeps running before it starts the session. Human metrics
|
|
178
|
+
and logs output includes returned sample rows, not only source availability.
|
|
179
|
+
|
|
180
|
+
## Machine output and exit status
|
|
181
|
+
|
|
182
|
+
JSON and NDJSON use schema `ornn.cli/v1`. A terminal record contains:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"schema": "ornn.cli/v1",
|
|
187
|
+
"type": "result",
|
|
188
|
+
"command": "machines show",
|
|
189
|
+
"outcome": { "class": "ready", "phase": "ready" },
|
|
190
|
+
"data": {},
|
|
191
|
+
"action": null,
|
|
192
|
+
"page": null,
|
|
193
|
+
"errors": [],
|
|
194
|
+
"resume": null
|
|
195
|
+
}
|
|
189
196
|
```
|
|
190
197
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
`ornn
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
`ornn
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
`
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
re-pushes the tenant's keys on reconnect. The tenant keeps ownership of the
|
|
288
|
-
instance.
|
|
289
|
-
- `ornn node off-grid <node-id> [--reason <text>] [--yes]` takes a node off-grid
|
|
290
|
-
(remove Ornn agent management, leave the host powered on). Asks y/N unless `--yes`.
|
|
291
|
-
- `ornn node on-grid <node-id> [--yes]` re-enrolls an off-grid host: orchestrator
|
|
292
|
-
SSHs with the stored admin key and re-runs the installer. Asks y/N unless `--yes`.
|
|
293
|
-
- `ornn node exec <node-id> --command <shell> --timeout-seconds <n>` runs
|
|
294
|
-
one unrestricted command over orchestrator SSH with the stored admin key. Not
|
|
295
|
-
an interactive shell (`ornn ssh`). Runs immediately; no y/N.
|
|
296
|
-
- `ornn node terminate <node-id> [--reason <text>] [--force] [--yes]` best-effort
|
|
297
|
-
cleans the host, removes the Ornn agent, and hard-deletes the node record.
|
|
298
|
-
It does not return the host to a tenant. Asks y/N unless `--yes`. There is no
|
|
299
|
-
`deenroll` verb; use terminate.
|
|
300
|
-
- `ornn node admin-key <node-id> [--generate]` prints the Ornn admin SSH keypair
|
|
301
|
-
for the node (including the private key) so an operator can SSH into the host.
|
|
302
|
-
`--generate` always mints a new pair, stores it, and installs the public key
|
|
303
|
-
on the live host. Treat the output as a secret.
|
|
304
|
-
|
|
305
|
-
The operator resource commands share the same reviewer auth:
|
|
306
|
-
|
|
307
|
-
- `ornn operator list [--json]` lists operators from the capabilities
|
|
308
|
-
catalog (staff). Distinct from `ornn operators list`.
|
|
309
|
-
- `ornn operators list` lists enrolled provisioning operators
|
|
310
|
-
(`GET /provisioning/operators`).
|
|
311
|
-
- `ornn facilities list [--operator <id-or-slug>]` lists facilities, optionally
|
|
312
|
-
filtered to one operator.
|
|
313
|
-
- `ornn tokens list` lists enrollment tokens.
|
|
314
|
-
- `ornn tokens create --operator <id> [--facility <id>]
|
|
315
|
-
[--expires-in <seconds>] [--ip <addr>] [--host <ip>]
|
|
316
|
-
[--identity-file <path>] [--yes]` mints an enrollment token and prints a
|
|
317
|
-
`curl … | sudo bash` install command. With `--host` and `--identity-file`,
|
|
318
|
-
orchestrator SSHs and runs that curl (same as Bulk Enroll). Asks y/N unless `--yes`.
|
|
319
|
-
- `ornn tokens revoke <token-id>` revokes an enrollment token.
|
|
320
|
-
|
|
321
|
-
Staff Commerce reservations are listing-backed, not fleet-backed:
|
|
322
|
-
|
|
323
|
-
- `reservations commerce create --tenant <email> --listing <listing-id>
|
|
324
|
-
[--node-count <n>] [--node <node-id>]` creates and activates the tenant's
|
|
325
|
-
Commerce reservation. Node count defaults to the listing capacity; start,
|
|
326
|
-
end, and hourly rate default from the listing. Optional `--node` values pin
|
|
327
|
-
specific catalog ids. Start and end overrides must remain inside the
|
|
328
|
-
listing's allowed window; the hourly rate can also be overridden explicitly.
|
|
329
|
-
- `reservations commerce list --tenant <email-or-id> [--listing <listing-id>]`
|
|
330
|
-
lists active reservations in their live window, optionally filtered to one
|
|
331
|
-
listing.
|
|
332
|
-
|
|
333
|
-
Reservation lifecycle verbs also run under the operator surface:
|
|
334
|
-
|
|
335
|
-
- `ornn reservations commerce create|list` creates or discovers a validated
|
|
336
|
-
Commerce reservation from a listing. These actions require a staff
|
|
337
|
-
`ornn login` session; the gateway `/v1/cli/operator/*` allowlist enforces
|
|
338
|
-
staff authorization — there is no review-secret break-glass that bypasses
|
|
339
|
-
that gate.
|
|
340
|
-
- `ornn reservations transfer <reservation-id> --target-tenant <id>
|
|
341
|
-
[--target-user <id>] [--node <id>] [--strategy reject|park] [--confirm]`
|
|
342
|
-
transfers a reservation to another tenant.
|
|
343
|
-
- `ornn reservations deploy <node-id> --target-tenant <id>
|
|
344
|
-
--commerce-reservation <id> [--target-user <id>] [--network public|private]`
|
|
345
|
-
deploys one node only after the gateway operator contract verifies that the
|
|
346
|
-
live tenant-owned Commerce reservation and listing match that node.
|
|
347
|
-
|
|
348
|
-
The tenant `ornn reservations list|show|checkout` verbs use the tenant CLI
|
|
349
|
-
login and `/v1/cli/compute` gateway contract. Staff Commerce actions use the
|
|
350
|
-
gateway operator contract; `transfer|deploy` retain the operator path above.
|
|
351
|
-
|
|
352
|
-
Staff happy path:
|
|
353
|
-
|
|
354
|
-
- `ORNN_AUTH_BASE_URL` — web/browser handoff origin
|
|
355
|
-
- `ORNN_API_BASE_URL` — API gateway origin
|
|
356
|
-
- `ornn login` as a user allowed by `INTERNAL_ALLOWED_*` on that environment
|
|
357
|
-
|
|
358
|
-
Optional installer gateway base for `ornn tokens create` install one-liners:
|
|
359
|
-
|
|
360
|
-
- `ORNN_INSTALLER_URL` - base serving `enrollment/install` (for deployed
|
|
361
|
-
gateways, `https://<gateway>/v1/orchestrator`), falling back to
|
|
362
|
-
`NEXT_PUBLIC_INSTALLER_URL`. Unset prints the token without an install command.
|
|
363
|
-
|
|
364
|
-
Without a staff login session, operator commands fail with a clear error before
|
|
365
|
-
making a network request.
|
|
366
|
-
|
|
367
|
-
Commands print concise human-readable output by default. Customer list
|
|
368
|
-
commands use aligned tables when stdout is a TTY and retain their existing
|
|
369
|
-
line-oriented shape when piped or redirected. Use `--json` on
|
|
370
|
-
read/show/list commands and transaction handoffs for the supported structured
|
|
371
|
-
stdout contract. JSON never contains tables, progress, next-step hints, color,
|
|
372
|
-
or ANSI sequences. Errors and login/browser progress go to stderr. Under
|
|
373
|
-
`--json` an error is written to stderr as one object, `{"error": "<message>",
|
|
374
|
-
"status": <http-status>}` (`status` only when the API supplied one); stdout
|
|
375
|
-
stays empty and the exit code is unchanged.
|
|
376
|
-
|
|
377
|
-
`ornn login` opens a browser to the Ornn auth origin, lets the user sign in
|
|
378
|
-
with the normal web account flow, and then completes automatically in the
|
|
379
|
-
terminal once the browser session approves the CLI device request. If the CLI
|
|
380
|
-
cannot open a browser, copy the printed URL into any browser and sign in there;
|
|
381
|
-
the terminal keeps polling until the login is approved or expires.
|
|
382
|
-
|
|
383
|
-
Run `ornn --help` for the full command list and `ornn api` for the
|
|
384
|
-
allowlisted gateway API escape hatch.
|
|
385
|
-
|
|
386
|
-
WireGuard client configs use the current tenant-scoped `/nodes` routes:
|
|
198
|
+
NDJSON emits zero or more progress records and exactly one terminal result or
|
|
199
|
+
error record. Progress is additive and contains no secret or supplier identity.
|
|
200
|
+
|
|
201
|
+
| Exit | Meaning |
|
|
202
|
+
| ---: | ------------------------------------------------- |
|
|
203
|
+
| 0 | Requested terminal goal reached |
|
|
204
|
+
| 1 | Failed, declined, or terminal negative outcome |
|
|
205
|
+
| 2 | Usage or validation error |
|
|
206
|
+
| 3 | Durable external action is required |
|
|
207
|
+
| 4 | Useful partial result with explicit source errors |
|
|
208
|
+
| 5 | Authentication or authorization failure |
|
|
209
|
+
| 6 | Service unavailable or retryable owner failure |
|
|
210
|
+
| 124 | Deadline expired; last observed state returned |
|
|
211
|
+
| 130 | Interrupted |
|
|
212
|
+
|
|
213
|
+
## Migrating to vNext
|
|
214
|
+
|
|
215
|
+
vNext is a clean cutover. Retired forms are never aliases: each fails before I/O
|
|
216
|
+
with one replacement and <https://docs.ornn.com/cli#migrating-to-vnext>.
|
|
217
|
+
|
|
218
|
+
| Retired form | Replacement |
|
|
219
|
+
| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
220
|
+
| `ornn account`, `ornn whoami` | `ornn context` |
|
|
221
|
+
| `ornn catalog search`, `gpu-types`, `availability *`, `listing *`, `listings` read leaves | matching `ornn capacity-offers` leaf |
|
|
222
|
+
| `ornn listings create` | `ornn admin capacity-offers create` |
|
|
223
|
+
| `ornn buy` | Use the Ornn web app. |
|
|
224
|
+
| `ornn bid create`, `exchange create` | Use the Ornn web app. |
|
|
225
|
+
| `ornn bid` or `exchange` list, show, update, withdraw | Use the Ornn web app. |
|
|
226
|
+
| `ornn gpu` or `gpus` list, show | Use the Ornn web app. |
|
|
227
|
+
| `ornn gpu` or `gpus` checkout, `reservations checkout` | Use the Ornn web app. |
|
|
228
|
+
| `ornn nodes launch` | `ornn launch` |
|
|
229
|
+
| `ornn nodes` list, show, wait, switch, reboot, hard-reset | matching `ornn machines` leaf; reset needs erase flag |
|
|
230
|
+
| `ornn ssh`, `nodes ssh-command` | `ornn connect` |
|
|
231
|
+
| `ornn metrics`, `telemetry`, `logs` | `ornn check`, `machines metrics`, or `machines logs` |
|
|
232
|
+
| `ornn clusters create`, `kubernetes launch`, `slurm launch` | `ornn launch --mode kubernetes` or `ornn launch --mode slurm` |
|
|
233
|
+
| Kubernetes or Slurm status, credentials, SSH, teardown | `ornn clusters show`, `connect`, or `clusters teardown` |
|
|
234
|
+
| `ornn network *`, `networks *` | `ornn private-networks <verb>` |
|
|
235
|
+
| `ornn access *`, `keys` | exact `ornn machines` or `ornn ssh-keys` leaf printed |
|
|
236
|
+
| `ornn storage volumes *` | `ornn volumes <verb>` |
|
|
237
|
+
| `ornn storage files *` | `ornn volumes files <verb>` |
|
|
238
|
+
| `ornn storage buckets *` | `ornn external-buckets <verb>` |
|
|
239
|
+
| Storage targets, deploy, status, detach, filesystem | exact `ornn volume-mounts` or `ornn filesystems` leaf printed |
|
|
240
|
+
| `ornn billing` | Use the Ornn web app. |
|
|
241
|
+
| customer-root `operator(s)`, `facilities`, `tokens`, `users`, `node`, or staff `reservations *` | exact `ornn admin ...` command printed by the error |
|
|
242
|
+
| `ornn api`, `commerce`, `orchestrator`, `cache purge` | `ornn resources`; no generic replacement exists |
|
|
243
|
+
| `--json` | `--format json` |
|
|
244
|
+
| `--interactive` | `--guided` |
|
|
245
|
+
|
|
246
|
+
Changed behavior is intentional: waits are deadline-bound, consent is semantic
|
|
247
|
+
and default-no, pagination is bounded and cursor-based, machine output is always
|
|
248
|
+
enveloped, and exit statuses are semantic. Old help, completion entries,
|
|
249
|
+
fixtures, staff roots, and owner-route spellings are not shipped.
|
|
250
|
+
|
|
251
|
+
`0.2.10` is the configured final legacy release (`legacyVersion`, dated
|
|
252
|
+
`2026-09-04T00:00:00Z`). The configured vNext artifact is `@ornncompute/cli`
|
|
253
|
+
at the version in `packages/config/cli-release.json` `vnextVersion`, on the
|
|
254
|
+
same binary and Node 20 minimum; `minimumVersion` for legacy tombstones
|
|
255
|
+
remains `1.0.0`. Publication is allowed as soon as release validation and
|
|
256
|
+
approvals pass; npm `latest` selects the approved production release. The
|
|
257
|
+
legacy support schedule remains anchored to `2026-10-05T00:00:00Z`, after
|
|
258
|
+
the required 30-day migration-notice interval. That date does not block npm
|
|
259
|
+
publication.
|
|
260
|
+
|
|
261
|
+
`ornn update` stays within the installed major. Crossing into vNext requires
|
|
262
|
+
`ornn update --major`. Through day 90 (ending immediately before
|
|
263
|
+
`2027-01-04T00:00:00Z`), rollback is available by reinstalling the pinned final
|
|
264
|
+
legacy package:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
npm install -g @ornncompute/cli@0.2.10
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
Both directions reuse valid `auth.json`, `config.json`, and
|
|
271
|
+
`update-check.json`. `selectedOrganizationId` is an untrusted hint; the gateway
|
|
272
|
+
revalidates membership. Neither direction rewrites credentials or configured
|
|
273
|
+
endpoints. Rollback is unsupported from day 91. From day 91 through day 180,
|
|
274
|
+
legacy compatibility calls return a non-forwarding `426 Upgrade Required`
|
|
275
|
+
tombstone with `cli_version_unsupported`, minimum version `1.0.0`, and the
|
|
276
|
+
migration URL. The legacy route surface is absent from day 181
|
|
277
|
+
(`2027-04-04T00:00:00Z`).
|
|
278
|
+
|
|
279
|
+
`ornn --version` and `ornn -v` print the semantic package version. `ornn
|
|
280
|
+
version` also reports machine schema and update channel.
|
|
281
|
+
|
|
282
|
+
## Development
|
|
283
|
+
|
|
284
|
+
The exported `run(argv, io)` seam accepts injected streams, fetch, browser,
|
|
285
|
+
process, clock, sleep, and cancellation dependencies. The packaged binary uses
|
|
286
|
+
the same seam. Capability code preserves existing MCP and Slack identities;
|
|
287
|
+
only canonical `cli.vnext` bindings are dispatchable by the CLI.
|
|
288
|
+
|
|
289
|
+
### Packaged journey and release evidence
|
|
290
|
+
|
|
291
|
+
The permanent package gate vendors the capability catalog, creates one npm
|
|
292
|
+
archive, installs that exact archive under a clean temporary prefix, and tests
|
|
293
|
+
only its installed `ornn` entrypoint against a deterministic loopback gateway:
|
|
387
294
|
|
|
388
295
|
```bash
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
296
|
+
rm -rf /tmp/ornn-vnext-artifacts
|
|
297
|
+
mkdir -p /tmp/ornn-vnext-artifacts
|
|
298
|
+
npm run acceptance:packaged --workspace @ornncompute/cli -- \
|
|
299
|
+
--artifact-dir /tmp/ornn-vnext-artifacts \
|
|
300
|
+
--evidence /tmp/ornn-vnext-packaged-gate.json
|
|
393
301
|
```
|
|
394
302
|
|
|
395
|
-
The
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
removing a replacement lock during recovery or release. Directory locks from
|
|
419
|
-
processes that exit before installation are reclaimed on the next update
|
|
420
|
-
attempt; live or inaccessible PIDs and malformed metadata remain locked. Legacy regular-file locks require
|
|
421
|
-
manual cleanup after confirming that no updater is running: deleting them
|
|
422
|
-
automatically could remove a live lock created by an older CLI. PID reuse can
|
|
423
|
-
also require manual cleanup. An installation marker keeps the lock held if the
|
|
424
|
-
CLI is killed during installation, because its package installer may still be
|
|
425
|
-
running. Confirm that installer has stopped before removing the lock. Repeated
|
|
426
|
-
Ctrl+C or SIGTERM releases the lock after installer teardown. An interrupted
|
|
427
|
-
package installation may still require reinstalling the CLI if the package
|
|
428
|
-
manager has already removed the previous version.
|
|
429
|
-
|
|
430
|
-
On POSIX, SIGHUP and SIGQUIT are forwarded to the package installer so it can
|
|
431
|
-
exit before the update lock is released.
|
|
432
|
-
|
|
433
|
-
## Deployment
|
|
434
|
-
|
|
435
|
-
`deploy-cli-pipeline.yml` publishes `@ornncompute/cli` from `main`. Staging
|
|
436
|
-
publishes the package.json version to the npm `next` dist-tag; production then
|
|
437
|
-
promotes that same version to `latest`. Manual rolls use
|
|
438
|
-
`deploy-cli-service.yml`. Runtime changes under `apps/cli` or
|
|
439
|
-
`packages/capabilities` must bump `apps/cli/package.json` so npm receives a
|
|
440
|
-
new release. Re-running the pipeline is idempotent when that version is
|
|
441
|
-
already published.
|
|
303
|
+
The real gateway smoke and unassisted participant pass are separate release
|
|
304
|
+
evidence; the deterministic fixture must never be presented as either one.
|
|
305
|
+
The participant recorder installs the retained archive itself and owns the
|
|
306
|
+
interactive shell used for the journey, with that installation first in
|
|
307
|
+
`PATH`; it does not attest a session run in another terminal.
|
|
308
|
+
Production and shared staging are refused by the smoke runner. See
|
|
309
|
+
[`docs/packaged-vnext-release-gate.md`](docs/packaged-vnext-release-gate.md) for
|
|
310
|
+
the non-production inputs, redacted evidence schemas, participant checklist,
|
|
311
|
+
pass criteria, and exact commands.
|
|
312
|
+
|
|
313
|
+
Private networks and VPN peers belong to the selected organization. There is no
|
|
314
|
+
per-reservation network attachment step. Durable Bare Metal workspaces use
|
|
315
|
+
`--network shared --volume <volume-id> --mount-access read-only|read-write`;
|
|
316
|
+
private Kubernetes and Slurm launches continue to use `--network private`.
|
|
317
|
+
|
|
318
|
+
### Storage list pages
|
|
319
|
+
|
|
320
|
+
Ornn CLI 1.0.22 and later request storage lists one page at a time.
|
|
321
|
+
`ornn volumes list` and `ornn external-buckets list` accept `--limit 1` through
|
|
322
|
+
`--limit 100` (default 25), ordered by last updated. Pass the returned
|
|
323
|
+
`page.next_cursor` to `--cursor` for the next page; null means the end.
|
|
324
|
+
Refresh from the first page after changes. Older CLI versions receive an
|
|
325
|
+
upgrade error for storage lists. File-list pagination is unchanged.
|