> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formae.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# formae command

> Check a single command or browse command history. Reference for formae command and its subcommands.

Look at the work you have asked the agent to do: one command in detail, or the
history of everything that has run.

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae command <status|list> [flags]
```

### Examples

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae command status
formae command status 3Hrx15wROBJnYK2T5oEXKErKMVf
formae command list
formae command list --query 'status:InProgress' --max-results 10
```

<Note>
  These commands replace `formae status command`, which still works but prints a
  deprecation notice. `formae status agent` is now
  [`formae agent status`](/documentation/reference/cli/agent).
</Note>

## formae command status

Show a single command. With no argument it picks your most recent one; give it a
command id to look at a specific one. While the command is still running, the
output refreshes in place until it finishes.

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae command status [id] [flags]
```

### Examples

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae command status
formae command status 3Hrx15wROBJnYK2T5oEXKErKMVf
```

### Flags

| Flag                                 | Default | Description                               |
| ------------------------------------ | ------- | ----------------------------------------- |
| `--output-consumer <human\|machine>` | `human` | Consumer of the command result.           |
| `--output-schema <json\|yaml>`       | `json`  | The schema to use for the machine output. |
| `--config <path>`                    |         | Path to a config file.                    |
| `--profile <name>`                   |         | Named profile to use.                     |

## formae command list

Browse command history: the most recent commands first, across every client, not
only your own. Narrow it with `--query`.

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae command list [flags]
```

### Examples

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae command list
formae command list --query 'status:InProgress' --max-results 10
formae command list --query 'client:me command:apply'
formae command list --query 'stack:prod status:Success'
formae command list --query 'user:me'
```

### Flags

| Flag                                 | Default | Description                                                                  |
| ------------------------------------ | ------- | ---------------------------------------------------------------------------- |
| `--query <query>`                    |         | Find past and current commands by their attributes. `*` works as a wildcard. |
| `--max-results <int>`                | `50`    | Maximum number of command results to return.                                 |
| `--output-consumer <human\|machine>` | `human` | Consumer of the command result.                                              |
| `--output-schema <json\|yaml>`       | `json`  | The schema to use for the machine output.                                    |
| `--config <path>`                    |         | Path to a config file.                                                       |
| `--profile <name>`                   |         | Named profile to use.                                                        |

### Query keys

| Key        | Matches                                                                                                                      |
| ---------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `status:`  | The command's state, for example `InProgress`, `Success`, `Failed`.                                                          |
| `command:` | The kind of command, for example `apply`, `destroy`.                                                                         |
| `stack:`   | The stack the command acted on.                                                                                              |
| `client:`  | The client that submitted it. `client:me` means this machine.                                                                |
| `user:`    | Who submitted it. `user:me` means the identity you are signed in as; any other value matches a subject id or a display name. |
