Commands: previews and approvals
apply, command and approvals.
Overview
| Command | Mode | What it does |
|---|---|---|
command get | reads | A pricing command: status, summary and diff |
command discard | changes | Drop a preview that was not applied |
apply | preview, then apply | Make a previewed change real. If the host has to approve it first: exit 4 and the link (add --wait) |
approvals get | reads | Status of a change waiting for the host: PENDING, APPROVED, APPLIED, DECLINED, DISMISSED or EXPIRED. Approving happens in the app. |
approvals list | reads | Changes waiting for you (approve them in the app) |
approvals | reads | Changes waiting for the host’s approval. Approving happens in the app, never here |
Generated from hostemi help --json of hostemi 0.4.0: the same tree the CLI prints its help, its completions and its option checks from. Modes: what each one does.
apply
hostemi apply
Make a previewed change real. If the host has to approve it first: exit 4 and the link (add --wait). Applies at once when the account allows it. Otherwise nothing changes until the host approves in the app. --dry-run only shows the change.
hostemi apply <changeId> [--wait]| Argument | Required | Description |
|---|---|---|
<changeId> | yes | chg_… as printed by the preview (older previews: <commandId>@<revision>) |
| Option | Type | Description |
|---|---|---|
--wait | switch | Wait for the host’s decision |
--timeout | int | With --wait: give up after this many seconds (default 1800) |
--interval | int | With --wait: seconds between checks (default 5) |
Mode: preview, then apply · API: POST /public/v1/changes/:id/apply, POST /public/v1/commands/:id/apply. Every command also takes the global options.
hostemi apply chg_8f2k1 --waitcommand
hostemi command get
A pricing command: status, summary and diff. Reads only. Never asks.
hostemi command get <id>| Argument | Required | Description |
|---|---|---|
<id> | yes | Command id |
Mode: reads · API: GET /public/v1/commands/:id. Every command also takes the global options.
hostemi command discard
Drop a preview that was not applied. Changes data at once: asks first, or --yes. --dry-run prints the request instead.
hostemi command discard <id>| Argument | Required | Description |
|---|---|---|
<id> | yes | Command id |
| Option | Type | Description |
|---|---|---|
--input | file | JSON body from a file, or - for stdin; flags win over it |
--data | json | JSON body inline |
Mode: changes · API: DELETE /public/v1/commands/:id. Every command also takes the global options.
approvals
hostemi approvals get
Status of a change waiting for the host: PENDING, APPROVED, APPLIED, DECLINED, DISMISSED or EXPIRED. Approving happens in the app.. Reads only. Never asks.
hostemi approvals get <id>| Argument | Required | Description |
|---|---|---|
<id> | yes | The approvalId a proposal returned |
Mode: reads · API: GET /public/v1/approvals/:id. Every command also takes the global options.
hostemi approvals list
Changes waiting for you (approve them in the app). Reads only. Never asks.
hostemi approvals list| Option | Type | Description |
|---|---|---|
--status | string | PENDING (default) or ALL: with the latest decided ones One of: PENDING, ALL. |
Mode: reads · API: GET /public/v1/approvals. Every command also takes the global options.
hostemi approvals
Changes waiting for the host’s approval. Approving happens in the app, never here. Reads only. Never asks.
hostemi approvals [<id>] [--wait]| Argument | Required | Description |
|---|---|---|
<id> | no | One change or approval id (default: everything that is waiting) |
| Option | Type | Description |
|---|---|---|
--wait | switch | Wait until it is decided (one id), or until nothing is waiting |
--all | switch | Include the decided ones |
--timeout | int | With --wait: give up after this many seconds (default 1800) |
--interval | int | With --wait: seconds between checks (default 5) |
Mode: reads · API: GET /public/v1/approvals, GET /public/v1/approvals/:id. Every command also takes the global options.
hostemi approvalsNothing is waiting for approval.