redisctl 0.4.1

Unified CLI for Redis Cloud and Enterprise
Documentation

redisctl

Crates.io Documentation CI License

A unified command-line interface for managing Redis Cloud and Redis Enterprise deployments through their REST APIs.

Features

  • Unified Interface - Single CLI for both Redis Cloud and Redis Enterprise
  • Async Operations - Full support for long-running operations with --wait flags
  • Explicit Commands - Clear separation between Cloud and Enterprise operations
  • Multiple Output Formats - JSON, YAML, and Table output with JMESPath filtering
  • Profile Management - Secure credential storage with environment variable support

Installation

From Binary Releases

Download the latest release for your platform from the releases page.

From Cargo

cargo install redisctl

Using Docker

docker run --rm joshrotenberg/redisctl --help

Quick Start

1. Configure Authentication

# Redis Cloud
export REDIS_CLOUD_API_KEY="your-api-key"
export REDIS_CLOUD_SECRET_KEY="your-secret-key"

# Redis Enterprise
export REDIS_ENTERPRISE_URL="https://your-cluster:9443"
export REDIS_ENTERPRISE_USER="your-email@example.com"
export REDIS_ENTERPRISE_PASSWORD="your-password"

Or use profiles for multiple environments:

# Create a profile
redisctl profile set cloud-prod \
  --cloud-api-key="$REDIS_CLOUD_API_KEY" \
  --cloud-secret-key="$REDIS_CLOUD_SECRET_KEY"

# Use the profile
redisctl --profile cloud-prod cloud database list

Profiles are stored in:

  • Linux/macOS: ~/.config/redisctl/config.toml
  • Windows: %APPDATA%\redis\redisctl\config.toml

Example configuration file:

default_profile = "cloud-prod"

[profiles.cloud-prod]
deployment_type = "cloud"
api_key = "${REDIS_CLOUD_API_KEY}"
api_secret = "${REDIS_CLOUD_API_SECRET}"

[profiles.enterprise-dev]
deployment_type = "enterprise"
url = "https://localhost:9443"
username = "admin@redis.local"
password = "${REDIS_ENTERPRISE_PASSWORD}"
insecure = true

2. Verify Setup & First Commands

# Test your connection
redisctl api cloud get /        # For Cloud
redisctl api enterprise get /v1/cluster  # For Enterprise

# View your configuration
redisctl profile list           # Show all profiles
redisctl profile path           # Show config file location

# Common first commands
redisctl cloud database list      # List Cloud databases
redisctl cloud subscription list  # List Cloud subscriptions
redisctl enterprise node list      # List Enterprise nodes

# Get detailed output
redisctl cloud database get 12345 --output table  # Table format
redisctl cloud database list -o json | jq         # JSON with jq

# Create resources and wait for completion
redisctl cloud database create --data @database.json --wait

Using with Docker

# Run commands directly with Docker
docker run --rm \
  -e REDIS_CLOUD_API_KEY \
  -e REDIS_CLOUD_API_SECRET \
  joshrotenberg/redisctl:latest \
  cloud subscription list

# Use local config file
docker run --rm \
  -v ~/.config/redisctl:/root/.config/redisctl:ro \
  joshrotenberg/redisctl:latest \
  database list

# Development environment with test cluster
docker compose up -d                    # Start Redis Enterprise cluster
docker compose --profile cli up cli     # Interactive CLI session
docker compose --profile test up test   # Run test suite
docker compose down -v                  # Clean up

See the Docker documentation for advanced usage.

Documentation

For comprehensive documentation including:

  • Detailed configuration options
  • Complete command reference
  • Async operation handling
  • Output formatting and filtering
  • Troubleshooting guides

Visit the full documentation.

Development

Building from Source

git clone https://github.com/joshrotenberg/redisctl.git
cd redisctl
cargo build --release

Running Tests

cargo test --workspace

Contributing

Contributions are welcome! Please see the contributing guidelines in the documentation.

License

Licensed under either of:

at your option.