Commands: previews and approvals

apply, command and approvals.

Overview

CommandModeWhat it does
command getreadsA pricing command: status, summary and diff
command discardchangesDrop a preview that was not applied
applypreview, then applyMake a previewed change real. If the host has to approve it first: exit 4 and the link (add --wait)
approvals getreadsStatus of a change waiting for the host: PENDING, APPROVED, APPLIED, DECLINED, DISMISSED or EXPIRED. Approving happens in the app.
approvals listreadsChanges waiting for you (approve them in the app)
approvalsreadsChanges 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]
ArgumentRequiredDescription
<changeId>yeschg_… as printed by the preview (older previews: <commandId>@<revision>)
OptionTypeDescription
--waitswitchWait for the host’s decision
--timeoutintWith --wait: give up after this many seconds (default 1800)
--intervalintWith --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.

Examples
hostemi apply chg_8f2k1 --wait

command

hostemi command get

A pricing command: status, summary and diff. Reads only. Never asks.

hostemi command get <id>
ArgumentRequiredDescription
<id>yesCommand 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>
ArgumentRequiredDescription
<id>yesCommand id
OptionTypeDescription
--inputfileJSON body from a file, or - for stdin; flags win over it
--datajsonJSON 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>
ArgumentRequiredDescription
<id>yesThe 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
OptionTypeDescription
--statusstringPENDING (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]
ArgumentRequiredDescription
<id>noOne change or approval id (default: everything that is waiting)
OptionTypeDescription
--waitswitchWait until it is decided (one id), or until nothing is waiting
--allswitchInclude the decided ones
--timeoutintWith --wait: give up after this many seconds (default 1800)
--intervalintWith --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.

Example
hostemi approvals
Output (recorded in a test workspace, exit 0)
Nothing is waiting for approval.
Something missing from this page? Write to [email protected], or use the form on the Help page.