---
title: "Configuration & Context"
canonical: https://trickest.com/docs/developer-tools/cli/configuration
description: "The CLI config file, your active space/workflow context, base URL, and the status command."
---

# Configuration & Context

The CLI keeps a small amount of persistent state so you don't have to repeat
yourself: your **active context** (space + workflow), your **vault**, and
output **preferences**. This page explains that state and the commands that
read and write it.

<Note>
Workflow-scoped commands such as `node`, `graph`, and `save` operate on the current
workflow stored in your context. If that reference is stale, resolution can fail
with `ERR_NOT_FOUND`. Check `trickest status` before editing.
</Note>

## `trickest status`

The fastest way to see "where am I and who am I":

```bash
trickest status
```
```json
{
  "authenticated": true,
  "auth_source": "TRICKEST_TOKEN",
  "space": "Solutions",
  "workflow": "dast-nightly",
  "base_url": "https://trickest.io"
}
```

This is the first command to run in any session, it shows your auth source, active
space and workflow, and which backend you're talking to.

## `trickest config`

Read and write persisted CLI configuration.

| Command | Description |
|---|---|
| `trickest config list` | Print all config keys and values |
| `trickest config get <key>` | Read one key |
| `trickest config set <key> <value>` | Write one key |
| `trickest config unset <key>` | Remove one key |

```bash
trickest config list
```
```json
{"auth.vault_id":"e54ccb18-…","preferences.format":"json","context.space":"Solutions","context.workflow":"dast-nightly"}
```

### Config keys

| Key | Meaning | Typically set by |
|---|---|---|
| `auth.vault_id` | Active vault (org/workspace scope) | Resolved from your token |
| `preferences.format` | Stored preference; pass `--output` to select the command output format | `config set` |
| `context.space` | Active space name or ID | `switch`, `config set` |
| `context.workflow` | Active workflow | `workflow use`, `switch` |

```bash
trickest config get auth.vault_id
# {"key":"auth.vault_id","value":"<vault-id>"}

trickest config set preferences.format json
trickest config unset context.workflow
```

## The active context

Workflow-scoped commands read `context.workflow` (and sometimes `context.space`).
`TRICKEST_SPACE` and `TRICKEST_WORKFLOW` override the saved values. Remove those
overrides when you want commands to follow a newly selected context.
You set the saved context with two commands:

### `trickest switch <path>`

Set both the active space **and** workflow in one step. Accepts a path or a bare
name/ID:

```bash
trickest switch /spaces/Solutions/workflows/"DAST v2"
trickest switch <workflow-id>
```

### `trickest workflow use <name-or-id>`

Set just the active workflow:

```bash
trickest workflow use <workflow-id>
# Active workflow set to: DAST v2
```

### `trickest save`

Save another version of the latest graph in the active workflow. Graph mutations
already persist their changes; `save` is not a required commit step. See
[Workflow version saves](/docs/developer-tools/cli/workflows#setting-the-active-workflow).

```bash
trickest save
```

`config list` and `config get` print stored values without redaction. Do not store secrets in arbitrary configuration keys or share output that contains sensitive values. Normal login credentials are stored separately.

## Why stale context bites

If `context.workflow` points at a workflow that no longer exists (or you switched
spaces), workflow-scoped commands fail clearly:

```bash
trickest node ls
```
```json
{"code":"ERR_NOT_FOUND","message":"Workflow not found: dast-nightly","hint":"Use `trickest workflow ls` to see available workflows"}
```

This exits with code **3** (`ERR_NOT_FOUND`). The fix is to repoint context, then
re-run:

```bash
trickest workflow ls                 # find a real workflow in the active space
trickest workflow use <workflow-id>  # repoint context
trickest node ls                     # now works
```

<Warning>
`workflow ls` is scoped to the **active space**. If you don't see the workflow you
expect, `switch` to the right space first (or set `context.space`).
</Warning>

## Choosing a backend (base URL)

The default backend is **`https://trickest.io`**. You do not need to
configure a base URL for normal use:

```bash
curl -fsSL https://trickest.io/install.sh | sh
trickest auth login
```

To use another deployment, run `trickest auth login --base-url https://your-deployment.example`.
The origin is saved with that login. `TRICKEST_BASE_URL` overrides it. When
`TRICKEST_TOKEN` is set, the CLI uses the environment base URL or the production
default, not the origin stored with a different login.

`config set url` and `config set preferences.base_url` are rejected.
`trickest status` shows the selected `base_url`; its `authenticated` field only
checks for local credentials. Use `trickest auth status` to check them with the server.

## Related

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/docs/developer-tools/cli/authentication">
    Tokens, the TRICKEST_TOKEN env var, and identity checks.
  </Card>
  <Card title="Workflows" icon="diagram-project" href="/docs/developer-tools/cli/workflows">
    Create, inspect, and switch between workflows.
  </Card>
</CardGroup>

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