Prerequisites
Before installing the Cadence CLI, ensure you have:- Access to a running Cadence server
- Network connectivity to the Cadence frontend service (typically port 7933)
- (For building from source) Go 1.19 or later
Installation Methods
Homebrew (macOS and Linux)
The easiest way to install the Cadence CLI on macOS and Linux is through Homebrew:Docker
Run the CLI directly from a Docker container without installation:Using Docker with Local Server
To connect to a Cadence server running on your host machine:Docker Compose Integration
If you’re running Cadence via Docker Compose, add the CLI service:docker-compose.yml
Building from Source
For the latest development version or custom builds:Clone the Repository
Checkout a Specific Version
It’s recommended to use a tagged release:Build the CLI
cadence in the current directory.
Test the Build
Install System-Wide (Optional)
Move the binary to a directory in your PATH:Configuration
Environment Variables
Set up default configuration to avoid repeating flags:.bashrc or .zshrc
TLS Configuration
For production environments with TLS enabled:JWT Authentication
For authenticated environments:Verify Installation
Test your CLI installation by connecting to a Cadence server:Common Connection Issues
Connection refused
Connection refused
Problem:
connection refused error when connecting to Cadence.Solutions:- Verify Cadence server is running:
docker psornetstat -an | grep 7933 - Check the address and port:
--address localhost:7933 - For Docker, use host networking:
docker run --network=host
Domain not found
Domain not found
Problem:
Domain does not exist error.Solution: Register the domain first:TLS handshake failed
TLS handshake failed
Problem: TLS connection errors.Solutions:
- Verify certificate path:
--tls-cert-path /correct/path/to/cert.pem - Check certificate validity:
openssl x509 -in cert.pem -text -noout - Ensure server uses same TLS version
Timeout errors
Timeout errors
Problem: RPC calls timing out.Solutions:
- Increase timeout:
--context-timeout 300 - Check network connectivity to server
- Verify server health and load
Upgrading
Homebrew
Docker
Pull the latest image:From Source
Compatibility
The CLI is designed to be backward compatible with older Cadence server versions. However:- CLI Version: Should match or be older than server version
- Feature Parity: Server supports CLI feature version checks
- Breaking Changes: Major version updates may require CLI updates
- CLI feature version: For compatibility checking
- Release version: Actual CLI version
- Build commit: Git commit hash
Next Steps
CLI Overview
Learn about CLI architecture and usage patterns
Workflow Commands
Start managing workflow executions
Domain Commands
Configure your first domain
Quick Start
Get started with Cadence