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

> Load the suprsend-cli skill so your AI agent runs SuprSend CLI commands correctly, with the right flags for push, pull, sync, and workspace tasks.

**Use this skill when** you want your AI agent to push, sync, or manage SuprSend assets from the terminal - without you having to remember `--slug` vs `--dir`, or whether `--commit=true` is needed.

The skill loads the full SuprSend CLI reference into your agent's context: every command, every flag, and the gotchas that catch people most.

<CardGroup cols={2}>
  <Card title="Install" icon="download">
    ```bash theme={"system"}
    npx skills add https://github.com/suprsend/skills --skill suprsend-cli
    ```
  </Card>

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

***

## Try it

<Steps>
  <Step title="Ask your agent">
    ```text theme={"system"}
    Push the cart-abandonment workflow to staging and commit it
    with the message "initial version".
    ```
  </Step>

  <Step title="Your agent runs the right command">
    ```bash theme={"system"}
    suprsend workflow push --slug cart-abandonment --commit=true \
      --commit-message "initial version"
    ```

    No guessing at flags. No silent `Successfully pushed: 0`.
  </Step>
</Steps>

***

## Things you can ask your AI to do

<AccordionGroup>
  <Accordion title="Push and version a workflow" icon="upload">
    *"Push the onboarding workflow as a draft, then commit it once I confirm."*

    Your agent will push without `--commit=true` first, wait for your sign-off, then run a follow-up commit.
  </Accordion>

  <Accordion title="Pull, edit, push" icon="arrows-rotate">
    *"Pull the password-reset workflow from production, change the SMS delay from 5 minutes to 2, and push the change to staging."*

    Full lifecycle - pull, modify locally, push back - handled by the agent.
  </Accordion>

  <Accordion title="Sync between workspaces" icon="arrows-left-right">
    *"Sync all workflows and schemas from staging to production."*

    The agent runs [`suprsend sync`](https://docs.suprsend.com/reference/cli-sync.md) with the right `--source-workspace`, `--target-workspace`, and `--assets` flags.
  </Accordion>

  <Accordion title="Generate type-safe SDK code" icon="code">
    *"Generate TypeScript types for all my event schemas into ./types."*

    The agent runs [`suprsend generate types`](https://docs.suprsend.com/docs/type-generation.md) for TypeScript, Python, Go, Java, Ruby, Swift, or Kotlin.
  </Accordion>

  <Accordion title="Set up CI/CD" icon="gears">
    *"Add a GitHub Actions step that pushes any changed workflows on merge to main."*

    The agent generates the workflow YAML using the right CLI commands and environment variables.
  </Accordion>

  <Accordion title="Manage schemas, events, categories, translations" icon="layer-group">
    *"Push every event schema in ./schemas to staging."*

    Works for [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) - same patterns as workflows.
  </Accordion>

  <Accordion title="Start the MCP server" icon="server">
    *"Start the SuprSend MCP server."*

    The agent runs `suprsend start-mcp-server` with the right scopes. See [MCP Server](https://docs.suprsend.com/reference/mcp-overview.md).
  </Accordion>
</AccordionGroup>

***

## Before your first command

The CLI needs a [service token](https://docs.suprsend.com/docs/developer/service-tokens.md). Pick the auth flow that fits your setup:

<Tabs>
  <Tab title="Environment variable">
    ```bash theme={"system"}
    export SUPRSEND_SERVICE_TOKEN="your_service_token_here"
    ```

    Best for CI/CD and one-off shells.
  </Tab>

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

    Best for day-to-day development when you switch between workspaces.

    <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>
  </Tab>
</Tabs>

***

## Common gotchas

These are the mistakes the skill is built to prevent - but worth knowing if something looks off.

<AccordionGroup>
  <Accordion title="workflow push myfile.json silently pushes 0" icon="circle-exclamation">
    **Why:** Command expects `--slug` or `--dir`, not a file path.

    **Fix:** Use `--slug` or `--dir suprsend/workflow/`.
  </Accordion>

  <Accordion title="Workflow pushed but nothing fires" icon="circle-exclamation">
    **Why:** Pushed workflows are drafts by default.

    **Fix:** Add `--commit=true`.
  </Accordion>

  <Accordion title="&#x22;Successfully pushed: 0&#x22;" icon="circle-exclamation">
    **Why:** Wrong active profile or workspace.

    **Fix:** Run `suprsend profile list` and switch.
  </Accordion>

  <Accordion title="Validation error on push" icon="circle-exclamation">
    **Why:** Referenced schema or category doesn't exist.

    **Fix:** Push dependencies first.
  </Accordion>
</AccordionGroup>

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

***

## Learn more

<CardGroup cols={2}>
  <Card title="Workflow Schema skill" icon="diagram-project" href="/reference/agent-skill-workflow-schema">
    Generate the workflow JSON your agent will push.
  </Card>

  <Card title="Template Schema skill" icon="file-lines" href="/reference/agent-skill-template-schema">
    Generate the template variants your agent will push.
  </Card>

  <Card title="Docs & Support skill" icon="book-open" href="/reference/agent-skill-docs-support">
    Let your agent fetch live SuprSend docs while debugging.
  </Card>

  <Card title="Agent Skills Overview" icon="graduation-cap" href="/reference/agent-skills">
    All available skills.
  </Card>
</CardGroup>
