Hey team,
I've been working on redisctl, a CLI tool that provides a consistent interface for both Redis Cloud and Enterprise APIs. Just shipped v0.5.0 and thought you might find it useful.
It's a single binary that works with both Redis Cloud and Enterprise deployments. Instead of writing curl commands or Python scripts, you get a proper CLI with:
- Consistent commands across both platforms
- Built-in
--wait
flags for async operations (no more polling loops!) - Multiple output formats: JSON, YAML, or formatted tables
- JMESPath queries to filter results with
-q
- Profile-based configuration for switching between environments
# List databases
redisctl cloud database list
redisctl enterprise database list
# Create database and wait for completion
redisctl database create --data @database.json --wait
# Query specific fields
redisctl cloud subscription list -q "[].{id:id,name:name,status:status}"
# Direct API access for anything not wrapped yet
redisctl api enterprise get /v1/nodes
Database migration workflow:
# Export from source database
redisctl enterprise database export 1 --data '{"exportToUri": "s3://bucket/backup.rdb"}' --wait
# Create new database in cloud
redisctl cloud database create --data @new-db.json --wait --wait-timeout 600
# Import data to new database
redisctl cloud database import 12345:67890 --data '{"sourceUri": "s3://bucket/backup.rdb"}' --wait
Set up VPC peering with monitoring:
# Create peering connection
redisctl cloud connectivity vpc-peering create --data @peering.json --wait
# Check status
redisctl cloud connectivity vpc-peering list -q "[?status=='active'].{id:id,name:name}"
# Set up alerts for the new connection
redisctl cloud subscription update 12345 --data '{"alerts": [{"name": "vpc-connectivity", "enabled": true}]}'
Bulk user management:
# Export users from one environment
redisctl enterprise user list -o json > users.json
# Process and create in another environment
cat users.json | jq '.[] | {email, role}' | while read user; do
redisctl cloud acl user create --data "$user"
done
Automated backup verification:
#!/bin/bash
# Check all database backups completed in last 24h
for db in $(redisctl enterprise database list -q "[].uid" -o json); do
status=$(redisctl api enterprise get "/v1/bdbs/$db" -q "backup_status")
if [[ "$status" != "success" ]]; then
echo "Backup failed for database $db"
fi
done
Added 7 more Enterprise command groups, bringing us to 74% API coverage:
- Alert management
- License operations
- Bootstrap/cluster initialization
- LDAP integration
- OCSP certificate validation
- Debug info collection
- Service management
# macOS/Linux binary
curl -L https://github.com/joshrotenberg/redisctl/releases/latest/download/redisctl-$(uname -m)-$(uname -s | tr '[:upper:]' '[:lower:]').tar.xz | tar -xJ
# Via cargo
cargo install redisctl
# Docker
docker run --rm joshrotenberg/redisctl:0.5.0 --help
Set up profiles in ~/.config/redisctl/config.toml
:
redisctl profile set cloud-prod --deployment-type cloud \
--api-key YOUR_KEY --api-secret YOUR_SECRET
redisctl profile set enterprise-dev --deployment-type enterprise \
--url https://cluster:9443 --username admin --password pass
Then use --profile
or set a default:
redisctl --profile cloud-prod database list
redisctl profile default enterprise-dev
- GitHub: https://github.com/joshrotenberg/redisctl
- Crates.io: https://crates.io/crates/redisctl
- Issues/requests: https://github.com/joshrotenberg/redisctl/issues
Let me know if you try it out or have any feature requests. Still actively developing it, so feedback is welcome!