---
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>
**Context is the single most important concept in the CLI.** Many commands —
`node`, `graph`, `save`, and other workflow-scoped verbs — operate on "the current
workflow" stored in your config. If that pointer is stale, those commands fail with
`ERR_NOT_FOUND`. Always check `trickest status` first.
</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` | Default output format | `config set` |
| `context.space` | Active space name | `switch`, `config set` |
| `context.workflow` | Active workflow | `workflow use`, `switch` |

```bash
trickest config get auth.vault_id
# {"key":"auth.vault_id","value":"e54ccb18-…"}

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

## The active context

Workflow-scoped commands read `context.workflow` (and sometimes `context.space`).
You set the 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 7b4a4059-…
# Active workflow set to: DAST v2
```

### `trickest save`

Save the current (context) workflow — handy in fast editor/build loops.

```bash
trickest save
```

## 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)

Released installs always talk to **`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
```

`trickest status` shows the active `base_url` so you can confirm where commands
are going.

## 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._
