danger

You are viewing documentation for an older version.

Click here to view the latest documentation.

Core Rudder CLI Commands Reference Alpha

Core Rudder CLI commands, flags, and options for authentication, import, validation, apply, and destroy, plus pointers to resource-specific subcommands.
Available Plans
  • free
  • starter
  • growth
  • enterprise

This guide covers the core workflow commands available in the Rudder CLI tool for managing resources like Tracking Plans, Data Catalog, SQL Models, and Event Stream sources.

For resource-specific commands (for example SQL model preview), see the sections below and the linked how-to guides.

Authentication

Before running any commands, you must authenticate the CLI tool with your RudderStack workspace.

rudder-cli auth login

You will be prompted to enter your Service Access Token.

Commands

Use the following commands to manage various RudderStack resources.

import workspace

Import existing resources from your RudderStack workspace into your local project directory. This is useful when you want to start managing existing dashboard configurations as code.

rudder-cli import workspace -l <project-directory>

Supported resources for import

  • Data Catalog (Events, Properties, Categories, Custom Types)
  • Tracking Plans
  • Event Stream sources (SDK-based)
  • SQL Models

See Import Workspace Resources for prerequisites, metadata, and troubleshooting.

validate

Validate your local YAML configurations for syntax errors, structural integrity, and resource-specific constraints.

rudder-cli validate -l <project-directory>

What it checks

  • YAML syntax and schema compliance
  • Resource referencing (for example, ensuring an event references a valid property)
  • SQL syntax and warehouse connectivity

apply

Sync your local configurations to your RudderStack workspace.

rudder-cli apply -l <project-directory>

Dry run

RudderStack recommends running the apply command with the --dry-run flag first to preview the changes that will be made to your workspace.

rudder-cli apply -l <project-directory> --dry-run

destroy

Use this command to permanently remove resources that Rudder CLI manages from your workspace, based on your local project state.

danger
This is a destructive operation.
rudder-cli destroy

Rudder CLI lists what it plans to remove and asks you to confirm before anything is deleted.

tip
Tip: Flags and behavior can change between CLI releases — run rudder-cli destroy --help for the options your build supports, and prefer dry runs (validate, apply --dry-run) in CI before you use destroy in production.

Additional command groups

The CLI also exposes subcommands for specific workflows. See the linked docs for syntax, flags, and examples:

ResourceExample commandsDocumentation
SQL Models (Reverse ETL)
  • rudder-cli workspace accounts list
  • rudder-cli workspace retl-sources list
  • rudder-cli import retl-sources ...
  • rudder-cli retl-sources preview ...
  • rudder-cli retl-sources validate ...

Run rudder-cli --help and rudder-cli <command> --help locally for the full list of subcommands and flags for your CLI version.

Questions? We're here to help.

Join the RudderStack Slack community or email us for support