---
title: "Trickest CLI"
canonical: https://trickest.com/docs/developer-tools/cli
description: "Manage Trickest workflows, inspect results, and automate platform tasks from your terminal with JSON output and structured errors."
---

# Trickest CLI

Use the **`trickest` CLI** to manage workflows, inspect results, and automate
platform tasks from your terminal.

Use JSON output and structured errors to parse results and handle failures in
scripts. The CLI remembers your active space and workflow so you can run related
commands without repeating IDs.

<Note>
For scripting, read **[Output formats & exit codes](/docs/developer-tools/cli/output-and-exit-codes)**
for JSON shapes, status lines, and error handling.
</Note>

## Install

The installer detects your OS and architecture and adds the standalone binary
to your `PATH`:

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

For a manual install, download the binary and checksum for your platform from the
[CLI settings page](https://trickest.io/settings/cli) in the app.

Verify the install:

```bash
trickest --version
```

<Tip>
Install the CLI in an agent's execution environment for platform operations.
Check `trickest --version` before assuming a sandbox image includes
it. The separate [Sandbox SDK](/docs/developer-tools/sandbox-sdk) creates and
controls execution environments; see [CLI sandbox compatibility](/docs/developer-tools/cli/sandbox)
before using the CLI's platform-session commands.
</Tip>

## Authenticate

For scripts, agents, and CI, set the `TRICKEST_TOKEN` environment variable:

```bash
export TRICKEST_TOKEN=<your-api-token>
trickest auth status
# {"authenticated":true,"source":"TRICKEST_TOKEN env var","email":"you@org.com","vault":"your-vault"}
```

For interactive use you can log in once and have the token stored for you:

```bash
trickest auth login
```

See **[Authentication](/docs/developer-tools/cli/authentication)** for the full
token model and precedence rules.

## The mental model

The CLI uses these conventions:

<CardGroup cols={3}>
  <Card title="Output for terminals and scripts" icon="brackets-curly">
    Output helpers default to tables in a terminal and JSON when piped. For
    scripts, use `--output json --quiet` to select JSON and suppress status lines.
  </Card>
  <Card title="Structured errors + exit codes" icon="circle-exclamation">
    Handled errors use a JSON envelope `{code, message, hint}` when stderr is
    redirected. Terminal errors and argument-parser errors use text. Scripts
    can branch on the exit code.
  </Card>
  <Card title="Persistent context" icon="crosshairs">
    The CLI remembers your active space and workflow. Workflow-scoped commands
    (`node`, `graph`, `save`) act on "the current workflow" without repeating IDs.
  </Card>
</CardGroup>

### A first session

```bash
export TRICKEST_TOKEN=<token>

trickest auth status                 # who am I?
trickest space ls                    # what spaces exist?
trickest switch /spaces/Solutions/workflows/"DAST v2"   # set active context
trickest node ls                     # nodes in the active workflow
trickest graph analyze               # DAG stats: layers, critical path, parallelism
trickest run ls                      # recent runs
```

## How this section is organized

The left sidebar groups the CLI by what you're trying to do:

<CardGroup cols={2}>
  <Card title="Getting Started" icon="rocket" href="/docs/developer-tools/cli/authentication">
    Authentication, configuration & context, and the output/exit-code contract.
  </Card>
  <Card title="Workflows" icon="diagram-project" href="/docs/developer-tools/cli/spaces">
    Spaces & projects, workflows, nodes & connections, and graph analysis.
  </Card>
  <Card title="Execution" icon="play" href="/docs/developer-tools/cli/runs">
    Running workflows, reading outputs, scheduling, and sandbox sessions.
  </Card>
  <Card title="Agent & Knowledge" icon="robot" href="/docs/developer-tools/cli/memory">
    Agent memory, sessions & skills, notifications & audit log.
  </Card>
  <Card title="Data & Assets" icon="database" href="/docs/developer-tools/cli/database">
    The Live Table database (TQL), storage, variables, library, tools, modules, solutions.
  </Card>
  <Card title="Organization" icon="building" href="/docs/developer-tools/cli/fleet">
    Fleets & machines, users & teams, integrations and billing.
  </Card>
</CardGroup>

## Discovering commands

The CLI is self-documenting. `--help` works at every level:

```bash
trickest --help                      # all top-level commands
trickest <command> --help            # subcommands + options for a command
trickest <command> <subcommand> --help
```

Find all top-level commands in the
**[Command Index](/docs/developer-tools/cli/command-index)**.

## Conventions used throughout these docs

- Examples assume `TRICKEST_TOKEN` is set in your environment.
- Output examples omit fields and abbreviate IDs for readability
  (e.g. `7b4a4059-…`).
- Put **global flags before the subcommand**: `trickest --output table node ls`.
- `[ ]` marks optional arguments/flags; `<>` marks required ones.

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