# openrail variables

> List, set and delete the linked service's variables.

List, set and delete the linked service's variables.

## Usage

```sh
openrail variables list [--kv]
openrail variables set K=V [K=V ...] [--stage] [--skip-deploys]
openrail variables delete K
```

## Flags

| Flag | Meaning |
|---|---|
| `--kv` | Show values (audited reveal); without it only names are listed |
| `--stdin` | Read the value from standard input (for multi-line values and secrets you do not want in shell history) |
| `--stage` | Stage the change instead of committing it |
| `--skip-deploys` | Commit without redeploying |

## Details

- `variable` is an alias.
- `set` stages and commits in one step unless `--stage` is given. References such as `${{Postgres.DATABASE_URL}}` are stored as written and resolved at deploy time; quote them in your shell.

## Examples

```sh
openrail variables set 'DATABASE_URL=${{Postgres.DATABASE_URL}}'
openrail variables list --kv
```

## Railway equivalent

`railway variables` works the same way through the [railway alias](https://openrail.app/docs/cli/railway-alias).

Every command also accepts the [global options](https://openrail.app/docs/cli/global-options).
