## Introducing redisctl v0.5.0 - Unified CLI for Redis Cloud & Enterprise 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. ### What it does 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 ### Quick examples ```bash # 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 ``` ### Workflow examples **Database migration workflow:** ```bash # 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:** ```bash # 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:** ```bash # 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:** ```bash #!/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 ``` ### What's new in v0.5.0 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 ### Installation ```bash # 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 ``` ### Getting started Set up profiles in `~/.config/redisctl/config.toml`: ```bash 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: ```bash redisctl --profile cloud-prod database list redisctl profile default enterprise-dev ``` ### Links - 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!