---
title: "Commands: previews and approvals | Hostemi"
description: "apply, command and approvals. Step-by-step help from the Hostemi docs for vacation rental hosts, cli command reference section."
canonical: https://hostemi.com/docs/cli/reference/changes
source: https://hostemi.com/docs/cli/reference/changes.md
---

# Commands: previews and approvals

apply, command and approvals.

#### On this page

1. [Overview](#overview)
2. [apply](#apply)
3. [command](#command)
4. [approvals](#approvals)

## Overview

| Command | Mode | What it does |
| --- | --- | --- |
| [`command get`](#command-get) | reads | A pricing command: status, summary and diff |
| [`command discard`](#command-discard) | changes | Drop a preview that was not applied |
| [`apply`](#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`](#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`](#approvals-list) | reads | Changes waiting for you (approve them in the app) |
| [`approvals`](#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](https://hostemi.com/docs/cli/approvals).

## 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.

```bash
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](https://hostemi.com/docs/cli/usage).

Examples

```bash
hostemi apply chg_8f2k1 --wait
```

## command

### hostemi command get

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

```bash
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](https://hostemi.com/docs/cli/usage).

### hostemi command discard

Drop a preview that was not applied. Changes data at once: asks first, or --yes. --dry-run prints the request instead.

```bash
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](https://hostemi.com/docs/cli/usage).

## 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.

```bash
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](https://hostemi.com/docs/cli/usage).

### hostemi approvals list

Changes waiting for you (approve them in the app). Reads only. Never asks.

```bash
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](https://hostemi.com/docs/cli/usage).

### hostemi approvals

Changes waiting for the host’s approval. Approving happens in the app, never here. Reads only. Never asks.

```bash
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](https://hostemi.com/docs/cli/usage).

Example

```bash
hostemi approvals
```

Output (recorded in a test workspace, exit 0)

```text
Nothing is waiting for approval.
```

Documentation pages

Something missing from this page? Write to [hello@hostemi.com](mailto:hello@hostemi.com), or use the form on the [Help](https://hostemi.com/help) page.
