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

# formae apply

> Create or update infrastructure from a forma file. Reference for formae apply, its flags, and its required apply mode.

Apply a forma to create or update infrastructure. `apply` reads a forma file,
sends it to the agent, and reconciles or patches your resources depending on the
[apply mode](/documentation/concepts/apply-modes).

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae apply --mode <reconcile|patch> [flags] <forma file>
```

The `--mode` flag is required, and a forma file argument is required.

## Examples

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae apply --mode reconcile forma.pkl
formae apply --mode patch forma.pkl
formae apply --mode reconcile --simulate forma.pkl
```

For human output, `apply` always simulates first and shows the planned changes
before asking you to confirm. Use `--yes` to skip the confirmation, or `--simulate`
to stop after the dry run.

## Flags

| Flag                                         | Default   | Description                                                                                  |
| -------------------------------------------- | --------- | -------------------------------------------------------------------------------------------- |
| `--mode <reconcile\|patch>`                  |           | Apply mode. This flag is required. See [apply modes](/documentation/concepts/apply-modes).   |
| `--simulate`                                 | `false`   | Simulate the command rather than make actual changes.                                        |
| `--force`                                    | `false`   | Overwrite any changes since the last reconcile without prompting. Applies in reconcile mode. |
| `--status-output-layout <summary\|detailed>` | `summary` | What to print as status output.                                                              |
| `--yes`                                      | `false`   | Run without any confirmations.                                                               |
| `--output-consumer <human\|machine>`         | `human`   | Consumer of the command result.                                                              |
| `--output-schema <json\|yaml>`               | `json`    | The schema to use for the result output.                                                     |
| `--config <path>`                            |           | Path to a config file.                                                                       |
| `--profile <name>`                           |           | Named profile to use.                                                                        |

## Property flags

Properties declared in your forma become flags on `apply`, so you can set them
per run without editing the file. `apply`, `destroy`, and `eval` all support the
properties declared by the forma they target. Run `formae apply --help` against a
specific forma to see the property flags it exposes.
