> For the complete documentation index, see [llms.txt](https://docs.hardpoint.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hardpoint.dev/guides/invar/appendix/cli-reference.md).

# CLI Reference

Command line usage reference for Invar

```
Invar: the diskless document store

Usage: invar [OPTIONS] --backend <BACKEND>
```

Every flag below also has an environment variable equivalent, which is how you'll set most of these in practice — see [Quick Start](https://docs.hardpoint.dev/guides/invar/quick-start.md) and [Configuring object storage and caching](https://docs.hardpoint.dev/guides/invar/operations/storage-and-caching.md) for real examples. Where both are set, the flag wins.

| Flag                    | Environment variable  | Default                   | Description                                                                                                                                                                                 |
| ----------------------- | --------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--backend <BACKEND>`   | `INVAR_BACKEND`       | *(required)*              | Storage backend: `slate` for SlateDB backed by S3 (or an S3-compatible store), or `fjall` for local disk. Use `fjall` for local dev and CI; use `slate` for anything you'd call production. |
| `--bucket <BUCKET>`     | `INVAR_S3_BUCKET`     | *(required with `slate`)* | Bucket name for the `slate` backend. Ignored for `fjall`.                                                                                                                                   |
| `--prefix <PREFIX>`     | `INVAR_BUCKET_PREFIX` | `/invar`                  | Key prefix within the bucket, for `slate`. Namespaces multiple instances or tenants sharing one bucket. Ignored for `fjall`.                                                                |
| `--path <PATH>`         | `INVAR_DATA_PATH`     | `/tmp/invar`              | Local directory to persist data in, for the `fjall` backend. Ignored for `slate`.                                                                                                           |
| `--metrics-addr <ADDR>` | `INVAR_METRICS_ADDR`  | unset (metrics disabled)  | Bind address for the Prometheus `/metrics` exporter, e.g. `0.0.0.0:9090`. Omit entirely to run with no metrics listener at all.                                                             |
| `-h`, `--help`          | —                     | —                         | Print help and exit.                                                                                                                                                                        |
| `-V`, `--version`       | —                     | —                         | Print version and exit.                                                                                                                                                                     |

## Notes

{% hint style="warning" %}
**`--metrics-addr` can take a literal `host:port`, or a hostname.** `0.0.0.0:9090` or `127.0.0.1:9090` work; `localhost:9090` will also work but be aware that Invar needs to be able to perform DNS lookups on startup if you pass a hostname instead of an IP address.
{% endhint %}

{% hint style="info" %}
**Object storage credentials aren't Invar-specific flags.** For the `slate` backend, everything beyond `--bucket`/`--prefix` — credentials, region, and any custom endpoint for S3-compatible providers — comes from the standard AWS SDK environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`, `AWS_ENDPOINT_URL_S3`, `AWS_ALLOW_HTTP`, and so on). See [Configuring object storage and caching](https://docs.hardpoint.dev/guides/invar/operations/storage-and-caching.md) for the full picture, including which providers are safe to use.
{% endhint %}

{% hint style="info" %}
**There's no flag to select the wire protocol.** Invar serves RESP by default — there's nothing to opt into.
{% endhint %}
