---
title: "Storage & Variables in the CLI"
canonical: https://trickest.com/docs/developer-tools/cli/storage-variables
description: "Upload files, list storage, and manage workspace variables and secrets from the trickest CLI."
---

# Storage & Variables in the CLI

## `trickest storage`

Vault-scoped **file storage** for artifacts you upload and reference from workflows.

| Subcommand | Description |
|---|---|
| `storage ls [path]` | List files at a path |
| `storage get <id>` | File metadata by ID |
| `storage push <local> <remote>` | Upload a file |
| `storage pull <remote> [local]` | Download a file |
| `storage mkdir <path>` | Create a directory |
| `storage rm <id>` | Delete a file |

### `storage ls`

```bash
trickest storage ls
trickest storage ls /reports --type application/pdf --size 1024
```
```json
[{"id":"6ab5fcef-…","name":"scope.txt","size":297600,"pretty_size":"290.6KB","modified_date":"2026-06-02T09:43:29Z","username":"you"}]
```

| Flag | Description |
|---|---|
| `--type <type>` | Filter by content type |
| `--size <bytes>` | Minimum size in bytes |

### Upload and download

```bash
trickest storage push ./scan.txt /inputs/scan.txt
trickest storage push ./report.pdf /reports/q2.pdf --content-type application/pdf
trickest storage pull /reports/q2.pdf ./q2-local.pdf
```

<Info>
Uploading and using files in workflows from the UI is covered in
[Uploading files](/docs/using-the-app/workflow-and-executions/uploading-files).
</Info>

## `trickest variables`

Regular **variables** (alias **`var`**) hold vault-wide configuration values.
**Secrets** are separate personal or space-scoped resources managed through
`variables secrets`. Their read responses contain metadata rather than secret values.

| Subcommand | Description |
|---|---|
| `variables ls` | List variables |
| `variables get <name-or-id>` | Get one variable |
| `variables set <name> <value>` | Create or update |
| `variables rm <name-or-id>` | Delete |
| `variables secrets` | Secret-variable subcommands |

### `variables ls`

```bash
trickest variables ls
trickest variables ls --space <space-id>
trickest variables ls --secrets
```
```json
[{"id":"007d09b7-…","name":"TRICKEST_TOKEN","value":"","is_global":true,"is_dynamic":true,"is_secret":true,"is_overridden":false}]
```

Regular variables and secrets are separate resources. Regular variables are
vault-wide. `variables set --space` is rejected unless you also pass `--secret`.
Use `variables secrets` to list, set, or remove personal or space-scoped secrets;
without `--space`, it selects personal secrets. Secret lists contain metadata,
not the stored secret value.

`variables get` masks values marked secret by default. Its `--reveal` option only
shows a value the API returns; do not rely on it to recover a secret.

### `variables set` / `rm`

```bash
trickest variables set DOMAIN example.com
trickest variables set API_KEY "$API_KEY" --secret
trickest variables rm DOMAIN
trickest variables secrets set API_KEY "$API_KEY" --space <space-id>
trickest variables secrets ls --space <space-id>
trickest variables secrets rm API_KEY --space <space-id>
```

| `variables set` flag | Description |
|---|---|
| `--secret` | Store as a secret variable |
| `--space <id>` | With `--secret`, scope the secret to a space |

<Info>
Managing variables in the workflow editor is described in
[Managing variables](/docs/using-the-app/workflow-and-executions/managing-variables).
</Info>

## Related

<CardGroup cols={2}>
  <Card title="Runs & Outputs" icon="play" href="/docs/developer-tools/cli/runs">
    Pull run artifacts or mount outputs into the sandbox.
  </Card>
  <Card title="Workflows" icon="diagram-project" href="/docs/developer-tools/cli/workflows">
    Variables are resolved when a workflow runs.
  </Card>
</CardGroup>

---
_Markdown source of https://trickest.com/docs/developer-tools/cli/storage-variables._
