> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# suprsend-cli

> Equip your AI agent to run SuprSend CLI commands — push workflows, sync workspaces, manage schemas, and more.

The `suprsend-cli` skill gives your agent the complete SuprSend CLI reference so it can run commands correctly on the first try — no guessing at flags or subcommand names.

## Installation

```bash theme={"system"}
npx skills add https://github.com/suprsend/skills --skill suprsend-cli
```

***

## What it enables

<CardGroup cols={2}>
  <Card title="Full workflow lifecycle" icon="diagram-project">
    Pull workflows from your workspace, edit locally, and push back — with `--commit=true` and `--commit-message` for version tracking.
  </Card>

  <Card title="Multi-asset management" icon="layer-group">
    Manage not just workflows but also [schemas](https://docs.suprsend.com/reference/cli-schema-overview.md), [events](https://docs.suprsend.com/reference/cli-event-overview.md), [preference categories](https://docs.suprsend.com/reference/cli-category-overview.md), and [translations](https://docs.suprsend.com/reference/cli-translation-overview.md) — all from the terminal.
  </Card>

  <Card title="Cross-workspace sync" icon="arrows-rotate">
    [Sync](https://docs.suprsend.com/reference/cli-sync.md) notification assets between staging and production workspaces in a single command.
  </Card>

  <Card title="Type generation" icon="code">
    [Generate](https://docs.suprsend.com/docs/type-generation.md) TypeScript, Python, Go, Java, Ruby, Swift, or Kotlin type definitions from your event schemas for type-safe integrations.
  </Card>

  <Card title="CI/CD pipelines" icon="gears">
    Configure GitHub Actions, GitLab CI, or other pipelines to pull, validate, and push notification changes automatically on merge.
  </Card>

  <Card title="Start MCP server" icon="server">
    Start and configure the [SuprSend MCP server](https://docs.suprsend.com/reference/mcp-overview.md) directly from the terminal with `suprsend start-mcp-server`.
  </Card>
</CardGroup>

***

## Before using the CLI

All commands require a [service token](https://docs.suprsend.com/docs/developer/service-tokens.md). Set it as an environment variable:

```bash theme={"system"}
export SUPRSEND_SERVICE_TOKEN="your_service_token_here"
```

Always verify your active workspace before pushing:

```bash theme={"system"}
suprsend profile list
suprsend profile use --name <profile-name>
```

<Note>
  `--workspace` switches between workspaces within an account. The `profile` command is for self-hosted or BYOC deployments. See [Setting Up CLI Access](https://docs.suprsend.com/docs/self-hosted/cli-profiles.md).
</Note>

***

## Example commands

```bash theme={"system"}
suprsend workflow push --slug cart-abandonment --commit=true
suprsend schema push --dir ./schemas/ --commit=true
suprsend sync --source-workspace staging --target-workspace production --assets workflows,schemas
suprsend generate types --output ./types/ --language typescript
```

***

## Common gotchas

| What goes wrong                               | Why                                                  | Fix                                        |
| --------------------------------------------- | ---------------------------------------------------- | ------------------------------------------ |
| `workflow push myfile.json` silently pushes 0 | Command expects `--slug` or `--dir`, not a file path | Use `--slug` or `--dir suprsend/workflow/` |
| Workflow pushed but nothing fires             | Pushed workflows are **drafts by default**           | Add `--commit=true`                        |
| "Successfully pushed: 0"                      | Wrong active profile or workspace                    | Run `suprsend profile list` and switch     |
| Validation error on push                      | Referenced schema or category doesn't exist          | Push dependencies first                    |

***

## Learn more

Run `suprsend --help` or `suprsend <command> --help` for full flag details.

<CardGroup cols={2}>
  <Card title="Full CLI Reference" icon="terminal" href="/reference/cli-intro">
    Every command, subcommand, flag, and output format.
  </Card>

  <Card title="suprsend-workflow-schema" icon="diagram-project" href="/reference/agent-skill-workflow-schema">
    Generate valid workflow JSON to push.
  </Card>
</CardGroup>
