Skip to main content
The formae CLI is the client you use to drive the formae agent. It parses your command, sends a request to the agent over its REST API, and renders the result. Most commands are asynchronous: apply and destroy submit work and return. On an interactive terminal they show a live progress view by default; otherwise they return immediately and you follow progress with formae status.
The formae CLI is being revamped on a feature branch. This reference documents the shipping behavior. The authoritative, always-current source for any command’s options is the CLI’s own help:

Command index

Global flags

These flags are available on the root command:

Common flags

Commands that talk to the agent share a common set of flags.

Choosing a configuration

Every agent-connecting command accepts a way to pick which configuration to use. --config and --profile are mutually exclusive. With neither flag, formae uses the active profile. See Configuration for how profiles are stored and selected.

Shaping the output

Commands that return data accept flags to switch between human and machine output. On an interactive terminal, apply, destroy, and cancel show a live status view by default and exit when the work completes. Press q to detach at any time; the command keeps running on the agent. Off a TTY (piped, CI, or machine output) they are fire-and-forget: they return a command ID and you follow progress with formae status. The status commands accept --watch to continuously refresh until completion.

Queries

Several commands accept a --query flag to select resources, targets, or commands by their attributes. Queries are space-separated key:value terms, and * works as a wildcard anywhere in a value (for example foo*, *foo, *foo*, or foo*bar).

Regenerating this reference

This reference is generated from the CLI’s own cobra command definitions, so it stays in step with the binary. To refresh it, build a small doc-gen harness that assembles the root command from the exported constructors in internal/cli/root.go and runs cobra/doc GenMarkdownTree, then fold the output into the pages under documentation/reference/cli/.