Using the Resonate CLI
The Resonate CLI is your primary tool for running the server, managing Durable Promises, and interacting with the Resonate system.
Getting help
The CLI has excellent built-in help. Use --help on any command to see detailed usage:
resonate --help
resonate <command> --help
resonate <command> <subcommand> --help
Examples:
resonate --help
resonate promises --help
resonate promises resolve --help
The CLI help is always up-to-date with your installed version. The built-in examples show exactly what syntax to use.
Common workflows
Start a development server
resonate dev
The server starts on:
- HTTP API:
http://localhost:8001 - gRPC API:
localhost:50051 - Metrics:
http://localhost:9090
See resonate dev --help for options.
Start a production server
resonate serve --aio-store-sqlite-path /var/lib/resonate/resonate.db
resonate serve \
--aio-store-postgres-enable \
--aio-store-postgres-host localhost \
--aio-store-postgres-database resonate \
--aio-store-postgres-username resonate \
--aio-store-postgres-password secret
See resonate serve --help for all configuration options.
Invoke a function
resonate invoke order-123 --func processOrder --arg '{"orderId": "123"}'
Useful for:
- Testing functions outside your application
- Triggering workflows manually
- Debugging function behavior
Manage Durable Promises
Create a promise:
resonate promises create approval-456 --timeout 24h
Resolve a promise:
resonate promises resolve approval-456 --data '{"approved": true}'
Check promise state:
resonate promises get order-123
Search for promises:
resonate promises search "*" --state pending --limit 10
Work with schedules
Create a recurring schedule:
resonate schedules create hourly-sync \
--cron "0 * * * *" \
--promise-id "sync-{{.timestamp}}" \
--description "Hourly data sync"
List schedules:
resonate schedules search "*"
Delete a schedule:
resonate schedules delete hourly-sync
Authentication
If your server requires authentication, pass credentials with every command:
Token authentication:
resonate promises get order-123 --token YOUR_TOKEN
Basic authentication:
resonate promises get order-123 --username admin --password secret
Or set environment variables:
export RESONATE_TOKEN="YOUR_TOKEN"
# or
export RESONATE_USERNAME="admin"
export RESONATE_PASSWORD="secret"
resonate promises get order-123 # Uses env vars automatically
Configuration files
Instead of passing flags every time, create a configuration file:
api:
http:
addr: ":8001"
auth:
admin: "secret"
aio:
store:
postgres:
enable: true
host: "localhost"
database: "resonate"
username: "resonate"
password: "secret"
Then start the server with the config:
resonate serve --config resonate.yaml
See the server configuration reference for all available options.
Tips and tricks
Use wildcards for search
resonate promises search "order-*" --limit 20
Format output as JSON
resonate promises get order-123 --output json
Useful for scripting and automation.
Check server health
curl http://localhost:8001/healthz
View metrics
curl http://localhost:9090/metrics
Connect to remote server
resonate promises get order-123 --server https://resonate.yourcompany.com
Troubleshooting
Command not found
Error: resonate: command not found
Solution: Install the Resonate CLI using Homebrew or download from GitHub releases.
Connection refused
Error: connect: connection refused
Solution:
- Is the server running? Start it with
resonate dev - Using the correct URL? Default is
http://localhost:8001 - Check the
--serverflag points to the right address
Authentication failed
Error: 401 Unauthorized
Solution:
- Does your server require auth? Check the server configuration
- Providing correct credentials? Use
--tokenor--username/--password - Using the right auth method? (token vs basic)
Promise not found
Error: 404 Not Found
Solution:
- Check the promise ID is correct (IDs are case-sensitive)
- Was the promise created? Use
resonate promises searchto verify - Did the promise expire? Check timeout settings
Next steps
- Start a development server (
resonate dev) and connect your SDK - Explore example applications that show real-world CLI usage
- Read about production deployment with persistent storage
- Review the TypeScript SDK guide or Python SDK guide