What is the Cadence CLI?
The Cadence CLI (cadence) is a powerful tool for interacting with Cadence workflow systems. It supports:
- Workflow execution management (start, stop, signal, query)
- Domain configuration and management
- Task list operations and monitoring
- Administrative operations for cluster management
- Batch operations for bulk workflow processing
Architecture
The CLI is built using the urfave/cli/v2 framework and communicates with Cadence through:- Frontend Service: Primary API for workflow and domain operations
- Admin Service: Administrative operations requiring elevated privileges
- Transport Protocols: Supports both TChannel (default) and gRPC
CLI Components
The CLI is organized into several top-level command groups:domain- Domain registration, updates, and managementworkflow- Workflow execution operationstasklist- Task list monitoring and operationsadmin- Administrative operations (requires elevated access)cluster- Cluster information and operations
Common Usage Patterns
Connecting to Cadence
All CLI commands require connecting to a Cadence frontend service:Working with Domains
Most workflow operations require specifying a domain:Using Aliases
The CLI provides short aliases for common commands:Global Flags
These flags are available for all commands:Frontend service address in
host:port format. Can also be set via CADENCE_CLI_ADDRESS environment variable.Cadence workflow domain for operations. Can also be set via
CADENCE_CLI_DOMAIN environment variable.Optional timeout for RPC calls in seconds. Can also be set via
CADENCE_CONTEXT_TIMEOUT environment variable.Optional JWT token for authorization. Can also be set via
CADENCE_CLI_JWT environment variable.Optional path to private key for creating JWT. Can also be set via
CADENCE_CLI_JWT_PRIVATE_KEY environment variable.Transport protocol:
grpc or tchannel (default). Can also be set via CADENCE_CLI_TRANSPORT_PROTOCOL environment variable.Path to TLS certificate for secure connections. Can also be set via
CADENCE_CLI_TLS_CERT_PATH environment variable.Configuration
Environment Variables
The CLI supports configuration through environment variables:Authentication
For JWT authentication:Output Formats
Many commands support multiple output formats:- Table (default): Human-readable table format
- JSON: Machine-readable JSON output using
--format json
Getting Help
Use the--help flag with any command to see available options:
Version Information
Check CLI and server compatibility:- CLI feature version (for compatibility checking)
- Release version
- Build commit hash
Next Steps
Installation
Install the Cadence CLI on your system
Workflow Commands
Manage workflow executions
Domain Commands
Configure and manage domains
Admin Commands
Administrative operations