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

> List resources, stacks, targets, and policies that formae manages. Reference for formae inventory and its subcommands.

Query what formae knows about: managed and unmanaged resources, stacks, targets,
and standalone policies. Each subcommand accepts `--max-results` to bound the
table, and most accept a `--query` to filter by attributes.

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae inventory <resources|stacks|targets|policies> [flags]
```

## formae inventory resources

Query the inventory of resources.

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

### Examples

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae inventory resources --query 'type:AWS::S3::Bucket'
formae inventory resources --query 'type:GCP::Compute::* stack:prod'
formae inventory resources --query 'target:eu target:us managed:false'
formae inventory resources --max-results 50
```

### Flags

| Flag                                 | Default | Description                                                               |
| ------------------------------------ | ------- | ------------------------------------------------------------------------- |
| `--query <query>`                    |         | Find resources by their attributes. `*` works as a wildcard.              |
| `--max-results <int>`                | `10`    | Maximum number of resources to display in the table. `0` means unlimited. |
| `--output-consumer <human\|machine>` | `human` | Consumer of the command output.                                           |
| `--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 inventory stacks

Query the inventory of stacks.

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

### Examples

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae inventory stacks
formae inventory stacks --max-results 50
```

### Flags

| Flag                                 | Default | Description                                                            |
| ------------------------------------ | ------- | ---------------------------------------------------------------------- |
| `--max-results <int>`                | `10`    | Maximum number of stacks to display in the table. `0` means unlimited. |
| `--output-consumer <human\|machine>` | `human` | Consumer of the command output.                                        |
| `--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 inventory targets

Query the inventory of targets.

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

### Examples

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae inventory targets --query 'discoverable:true'
formae inventory targets --query 'namespace:AWS label:prod-*'
formae inventory targets --max-results 50
```

### Flags

| Flag                                 | Default | Description                                                                                                                             |
| ------------------------------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `--query <query>`                    |         | Find targets by their attributes, for example `namespace:AWS`, `discoverable:true`, or `label:prod-us-east-1`. `*` works as a wildcard. |
| `--max-results <int>`                | `10`    | Maximum number of targets to display in the table. `0` means unlimited.                                                                 |
| `--output-consumer <human\|machine>` | `human` | Consumer of the command output.                                                                                                         |
| `--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 inventory policies

Query the inventory of standalone policies.

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

### Examples

```bash theme={"languages":{"custom":["/languages/pkl.json"]}}
formae inventory policies
formae inventory policies --max-results 50
```

### Flags

| Flag                                 | Default | Description                                                              |
| ------------------------------------ | ------- | ------------------------------------------------------------------------ |
| `--max-results <int>`                | `10`    | Maximum number of policies to display in the table. `0` means unlimited. |
| `--output-consumer <human\|machine>` | `human` | Consumer of the command output.                                          |
| `--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.                                                    |
