# CLI command reference

Every `solidafy` command, its arguments and its flags. Use it as a lookup; for a guided first run, see the [Quickstart](/docs/getting-started/quickstart).

## How commands are shaped

Most commands follow `solidafy <resource> <verb> [arguments] [flags]`, for example `solidafy pipelines push file.yaml`. A few things hold everywhere:

- Resource names work in the singular and the plural: `pipeline` and `pipelines`, `dashboard` and `dashboards`, `report` and `reports`, and so on.
- For most resources, running the resource on its own lists it: `solidafy pipelines` is the same as `solidafy pipelines list`. This applies to `pipelines`, `dashboard`, `report`, `liveboard`, `triggers`, `datasources`, `channels`, `groups`, `policies` and `seeds`.
- An unknown verb is an error, not a silent list.
- Commands that read or change a pipeline take the path to its YAML file, not the pipeline's name.
- Commands that talk to Solidafy run inside a project (a folder containing `solidafy.json`, or any folder below it) and act on the project's active environment. See [Working with environments](/docs/cli/environments).
- `solidafy --help` lists all commands, and `solidafy <command> --help` shows one command's subcommands and flags.

## Project setup

### `solidafy init`

Creates a new project in the current directory: checks your credentials, writes `solidafy.json`, `environments/<env>/.env`, a `.gitignore`, `CLAUDE.md`, `docs/`, `examples/` and `.claude/`, and pulls your existing pipelines. With no flags it prompts for a project name, a token and an API URL. It refuses to run if `solidafy.json` already exists.

| Flag | Description |
| --- | --- |
| `--pat <token>` | Personal access token (`sk_pat_...`). Skips the prompts. |
| `--token <token>` | Same as `--pat`. |
| `--api-key <key>` | API key. Defaults to the token. |
| `--api-url <url>` | API base URL. Defaults to `https://api.solidafy.com`. |
| `--name <name>` | Project name. Defaults to the directory name. |

The first environment is named after the kind of credential: `sandbox` for an `sk_test_` key, `production` for an `sk_live_` key, and `default` otherwise, which includes every personal access token.

### `solidafy env`

| Command | Description |
| --- | --- |
| `solidafy env add <name> --pat <token>` | Adds an environment, after checking the credentials work. Also accepts `--token`, `--api-key` and `--api-url` (default `https://api.solidafy.com`). |
| `solidafy env use <name>` | Makes `<name>` the active environment. |
| `solidafy env list` | Lists environments, marks the active one, and flags any without credentials on this machine. |
| `solidafy env status` | Shows the active environment and whether the API is reachable, with pipeline and dashboard counts. |

Details in [Working with environments](/docs/cli/environments).

### `solidafy update`

Refreshes the files the CLI owns in your project (`docs/`, `examples/`, `.claude/skills/`, the `solidafy` entry in `.claude/settings.json`, and `CLAUDE.md`) to match the installed CLI version. It also deletes a top-level `AGENT.md` and the `.claude/agents/` folder if your project has them. It does not upgrade the CLI itself; see [Upgrading](/docs/cli/installation#upgrading).

## Discovering data

| Command | Description |
| --- | --- |
| `solidafy tables` | Lists every table in the active environment, grouped by namespace, with column counts. |
| `solidafy schema <table>` | Shows a table's columns and types. Pass `namespace.table`, or just `table` to search all namespaces. |
| `solidafy dsl <query>` | Runs a DSL query. Read-only unless you pass `-x`. |
| `solidafy docs [topic] [query]` | Prints the reference guides bundled with the CLI. Works offline. |

### `solidafy dsl`

```bash
solidafy dsl 'source("ns.table").limit(5)'
```

| Flag | Description |
| --- | --- |
| `-x`, `--execute` | Allow writes (`.output(...)`). The query runs as a temporary job, and the CLI waits for it to finish, then prints rows written and the tables touched. |
| `--force` | Required together with `-x` when the active environment is named `production` or `prod`. |
| `--json` | Print one JSON document on stdout with every row: `{ columns, rows, rowCount }` for a read, `{ status, rowsWritten, outputTables }` for a write. Errors go to stderr with a non-zero exit code. |

Without `--json`, results print as a table of at most 100 rows, with long values cut at 40 characters. Use `--json` when a script consumes the output.

### `solidafy docs`

| Command | Description |
| --- | --- |
| `solidafy docs` | Lists the available guides. |
| `solidafy docs dsl` | The full DSL reference. |
| `solidafy docs dsl-agent` | The DSL reference written for AI agents. |
| `solidafy docs dsl-portal` | The DSL reference for portal charts. |
| `solidafy docs charts` | The chart authoring guide. |
| `solidafy docs filters` | The dashboard filter guide. |
| `solidafy docs examples` | Common query patterns. |
| `solidafy docs search <text>` | Searches all guides and prints matching lines. |
| `solidafy docs <file>` | Prints any bundled guide by file name, for example `solidafy docs reports-guide`. |

## Pipelines

| Command | Description |
| --- | --- |
| `solidafy pipelines list` | Lists pipelines with id, status, last update and schedule. |
| `solidafy pipelines pull [name]` | Writes pipelines as YAML into `environments/<env>/pipelines/`. Pass a name for one pipeline, or nothing (or `--all`) for every pipeline. |
| `solidafy pipelines push <file>` | Validates the YAML, then creates or updates the pipeline and prints its status. With no `id` in the file it creates a new pipeline and writes the `id` back into the file. The top-level `schedule` (a cron expression) and `status` (`draft`, `active` or `paused`) in the file are applied on every push, including the first. |
| `solidafy pipelines run <file>` | Starts a run. Add `--watch` to wait until it finishes (polls every 5 seconds, for up to 10 minutes), or `--status` to show the last 10 runs instead of starting one. |
| `solidafy validate <file>` | Checks a pipeline YAML locally (structure, step types, dependencies, dashboard sections, and that `schedule` is a valid cron expression) without pushing. `--all` checks every file in the active environment's `pipelines/` folder. Exits non-zero on errors. |
| `solidafy test <file> [chart]` | Runs every chart query and drilldown in the file against live data and reports PASS or FAIL for each. Pass part of a chart's name to test only matching charts. |
| `solidafy logs <file>` | Shows the 5 most recent runs of a pipeline with status, step counts, records synced and errors. |

`pipelines run --watch` exits with a non-zero code when the run fails. `validate` checks structure; it does not prove that every query runs, so use `test` for charts and a real run for steps.

The top-level commands `solidafy pull`, `solidafy push` and `solidafy run` still work as aliases of the `pipelines` versions, but print a deprecation notice. Use the `pipelines` forms.

### Schedules and status

A pipeline runs on its `schedule` only while its `status` is `active`. Set both in the YAML and the pipeline runs on that schedule from its first push:

```yaml
name: Daily pull requests
schedule: "0 6 * * *"
status: active
```

A field the file leaves out keeps the value the pipeline already has (a new pipeline starts as a `draft` with no schedule), and `schedule: null` clears the cron. `validate` and `pipelines push` warn when a file sets `schedule` without `status: active` or `paused`, because a draft never runs on its schedule. A `schedule` that is not a valid cron expression is an error.

### How `test` fills in a chart query

`test` fills each `[%variable%]` with the filter's default value, and each `${column}` in a drilldown with that column from the first row of the chart above it. It does not replace `@time` or `@granularity`: it sends them as they are and leaves them for the query engine to resolve.

When a chart or drilldown that uses a filter variable fails under those values, `test` runs it once more with the `.filter(...)` clauses that use a variable removed, as if every filter were cleared. If that run works, the chart counts as a pass and the line says `empty under test filters; OK with filters cleared`. If it still fails, the query itself is broken.

### `solidafy triggers`

Triggers start one pipeline when another finishes.

| Command | Description |
| --- | --- |
| `solidafy triggers list` | Lists triggers as `source → target`, with id and status. |
| `solidafy triggers create <source> <target>` | Creates a trigger between two pipelines, given by name or id. |
| `solidafy triggers toggle <id>` | Enables or disables a trigger. |
| `solidafy triggers delete <id>` | Deletes a trigger. |

### `solidafy webhook`

Each takes a pipeline YAML file that has been pushed (it needs the `id`).

| Command | Description |
| --- | --- |
| `solidafy webhook enable <file>` | Turns on the pipeline's webhook and prints its details, including the secret. |
| `solidafy webhook disable <file>` | Turns the webhook off. |
| `solidafy webhook status <file>` | Shows whether the webhook is enabled, and its configuration. |
| `solidafy webhook test <file>` | Sends a test payload to the webhook and prints the response. |

See [Triggers and webhooks](/docs/pipelines/triggers-and-webhooks).

### `solidafy seeds`

Seed tables are small lookup tables (team names, mappings) stored with a pipeline.

| Command | Description |
| --- | --- |
| `solidafy seeds list` | Lists seed tables across your pipelines. |
| `solidafy seeds show <table>` | Prints a seed table's rows. |
| `solidafy seeds export <table>` | Writes a seed table to `environments/<env>/seeds/` as CSV. |
| `solidafy seeds import <table> <file>` | Replaces a seed table's rows with the contents of a CSV file. The first line must be the column names. |

## Dashboards, liveboards and reports

### `solidafy dashboard`

| Command | Description |
| --- | --- |
| `solidafy dashboard list` | Lists dashboards with id, published or draft, and chart count. |
| `solidafy dashboard push <file>` | Builds a dashboard from the `charts:` and `filters:` in a pipeline YAML and creates or updates it. Pushing the pipeline does not do this for you. |
| `solidafy dashboard pull [name]` | Writes dashboards into `environments/<env>/dashboards/`. Pass a name, or nothing (or `--all`) for all. `-o yaml` (the default) writes a file you can edit and push back; `-o json` writes the raw API response. |
| `solidafy dashboard delete <name-or-id>` | Deletes a dashboard. |

### `solidafy liveboard`

| Command | Description |
| --- | --- |
| `solidafy liveboard list` | Lists liveboards. |
| `solidafy liveboard push <file>` | Validates a liveboard file (JSON or YAML, shaped `{ id?, name, description?, slug?, spec }`) and creates or updates it. A new liveboard's `id` is written back into the file. |
| `solidafy liveboard pull [name]` | Writes liveboards as YAML into `environments/<env>/liveboards/`. Pass a name, or nothing (or `--all`) for all. |
| `solidafy liveboard pull-binding [name]` | Writes the binding a board was compiled from into `<slug>.binding.yaml`, for boards that have one. `--all` pulls every stored binding. |

See [Liveboards](/docs/dashboards/liveboards).

### `solidafy report`

| Command | Description |
| --- | --- |
| `solidafy report list` | Lists reports. `--q <text>` (or `--search <text>`) filters them. |
| `solidafy report get <id-or-slug>` | Prints a report as JSON. |
| `solidafy report pull [id-or-slug]` | Writes reports into `environments/<env>/reports/` as JSON. Pass one, or nothing (or `--all`) for all. |
| `solidafy report push <file>` | Creates or updates a report from a JSON file shaped `{ id?, name, description?, slug?, spec }`. A changed spec creates a new version; `--summary <text>` records what changed. A new report's `id` is written back into the file. |
| `solidafy report versions <id-or-slug>` | Lists earlier versions. |
| `solidafy report restore <id-or-slug> <version>` | Makes an earlier version current again. The current version is kept in the history. |
| `solidafy report publish <id-or-slug>` | Publishes a report. |
| `solidafy report unpublish <id-or-slug>` | Unpublishes it. |
| `solidafy report share <id-or-slug>` | Creates a public share link that works without signing in. Only use it for reports with nothing sensitive in them. |
| `solidafy report unshare <id-or-slug>` | Revokes the share link. |
| `solidafy report delete <id-or-slug>` | Deletes a report. |

See [Reports](/docs/dashboards/reports).

## Data sources, channels and access

### `solidafy datasources`

| Command | Description |
| --- | --- |
| `solidafy datasources list` | Lists data sources. |
| `solidafy datasources show <name>` | Shows a data source with its configuration keys, not the values. |
| `solidafy datasources create <name> --connector <type>` | Creates a data source. `--config <json>` sets its configuration, `--streams <json>` its streams, and `--namespace <ns>` the namespace it writes to (defaults to the connector name). |
| `solidafy datasources update <name> --config <json>` | Replaces a data source's configuration. |
| `solidafy datasources delete <name>` | Deletes a data source. |

> **Warning:** Anything you pass in `--config` lands in your shell history. For secrets, consider creating the data source in the portal instead.

### `solidafy registry`

| Command | Description |
| --- | --- |
| `solidafy registry connectors [name]` | Lists connectors, or shows one connector's details and configuration fields. |
| `solidafy registry pipelines [name]` | Lists pipeline templates, or shows one. `--yaml` prints the template's YAML. |
| `solidafy registry products [slug]` | Lists products, or shows one product's status. |

`connector`, `pipeline` and `product` work as singular forms here too.

### `solidafy channels`

| Command | Description |
| --- | --- |
| `solidafy channels list` | Lists notification channels. |
| `solidafy channels create <name> --type <type>` | Creates a channel. `--type` is one of `email`, `slack`, `mattermost` or `internal_users`. Slack and Mattermost need `--webhook <url>`; Mattermost also takes `--base-url <url>`; email needs `--recipients <a@x.com,b@x.com>`. `--handler <id>` sets the name alert DSL uses for the channel (defaults from the channel name). |
| `solidafy channels toggle <name>` | Enables or disables a channel. |
| `solidafy channels delete <name>` | Deletes a channel. |

### `solidafy groups`

| Command | Description |
| --- | --- |
| `solidafy groups list` | Lists security groups. |
| `solidafy groups show <name>` | Lists a group's members. |
| `solidafy groups create <name>` | Creates a group. `--description <text>` is optional. |
| `solidafy groups add-member <name> <email>` | Adds a member by email. |
| `solidafy groups remove-member <name> <email>` | Removes a member. |
| `solidafy groups delete <name>` | Deletes a group. |

### `solidafy policies`

Row-level access policies, kept in `environments/<env>/policies/access-policies.yaml`.

| Command | Description |
| --- | --- |
| `solidafy policies list` | Lists policies. |
| `solidafy policies pull` | Writes the environment's policies to `access-policies.yaml`. |
| `solidafy policies push` | Makes the environment match the file: creates, updates and deletes policies. `--dry-run` prints the plan without changing anything. |

> **Warning:** `policies push` deletes any policy that is not in the file, and it does not ask for confirmation. Run `policies pull` first and check `--dry-run` output before pushing.

The file groups filters by who they apply to:

```yaml
rules:
  - name: frontend-only
    target_type: security_group
    target: Frontend Team
    enabled: true
    filters:
      scout.pull_requests: 'team == "Frontend"'
```

See [Security and access control](/docs/access/security).

## AI agents

### `solidafy mcp`

| Command | Description |
| --- | --- |
| `solidafy mcp install` | Registers the Solidafy MCP server with an AI client. `--client` is `claude-code` (default), `claude-desktop`, `cursor` or `windsurf`. `--global` installs for all projects where the client supports it. `--http` (Claude Code only) uses the hosted server instead of a local one. `--url <url>` and `--token <token>` override the server URL and the token. |
| `solidafy mcp uninstall` | Removes the server from every known client configuration, or only one with `--client`. |
| `solidafy mcp status` | Shows which clients have the server registered, and how. |
| `solidafy mcp serve` | Runs the MCP server over stdio. Your AI client starts this; you do not run it by hand. |
| `solidafy mcp push <file>` | Syncs the environment's Data Explorer tools from an `mcp.yml` file. `--dry-run` prints the plan, `--prune` deletes tools missing from the file instead of disabling them, `--yes` skips the confirmation. |

Details in [AI agents and MCP](/docs/cli/ai-agents).
