---
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 [folder]` | List a page of vault files, or the direct files of a folder |
| `storage folders [path]` | List child folders with file counts |
| `storage get <id>` | File metadata by ID |
| `storage push <local> <remote>` | Upload a file |
| `storage pull <remote> [local]` | Download a file, or the direct files of a folder with `--folder` |
| `storage mkdir <path>` | Create a directory |
| `storage rmdir <path>` | Delete a folder, its nested folders and the files inside |
| `storage rm <id>` | Delete a file |

### `storage ls`

```bash
trickest storage ls
trickest storage ls /reports --type application/pdf --size 1024
```
```json
{"count":1,"countExact":true,"page":1,"next":null,"previous":null,"results":[{"id":"6ab5fcef-…","name":"scope.txt","path":"/reports/scope.txt","folderPath":"/reports","size":297600,"content_type":"text/plain","created_date":"2026-06-02T09:43:29Z","modified_date":"2026-06-02T09:43:29Z"}]}
```

| Flag | Description |
|---|---|
| `--root` | Only files at the vault root, outside any folder |
| `--page <n>` | Page number (default `1`) |
| `--limit <n>` | Page size, 1 to 100 (default `50`) |
| `--filter <text>` | Only files whose name contains the text (case-insensitive) |
| `--type <type>` | Filter by content type |
| `--size <bytes>` | Minimum size in bytes |

### `storage folders`

```bash
trickest storage folders /reports --recursive --filter q2
```

| Flag | Description |
|---|---|
| `--recursive` | Include every descendant folder |
| `--filter <text>` | Only folders whose path contains the text (case-insensitive) |

### 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
trickest storage pull /reports ./reports --folder --max-files 50
```

| `storage pull` flag | Description |
|---|---|
| `--folder` | `<remote>` is a folder; pulls its direct files only |
| `--max-files <n>` | Maximum files in a folder pull; larger selections are rejected (default `100`) |
| `--max-bytes <n>` | Total download budget in bytes (default `268435456`) |
| `--timeout <seconds>` | Deadline for the whole pull (default `300`) |
| `--overwrite` | Replace existing destinations after a successful transfer |

<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; `--filter <query>` keeps names containing the text |
| `variables get <name-or-id>` | Get one variable |
| `variables set <name> <value>` | Create; fails if the name exists (`rm` first). `-` reads the value from stdin |
| `variables rm <name-or-id>` | Delete |
| `variables secrets` | Secret-variable subcommands; `secrets update <name-or-id> <value>` replaces an existing secret |

### `variables ls`

```bash
trickest variables ls
trickest variables ls --filter DOMAIN
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._
