An open API service indexing awesome lists of open source software.

https://github.com/redis-developer/redisctl

Unified CLI for Redis Cloud and Enterprise management
https://github.com/redis-developer/redisctl

cli redis redis-cloud redis-enterprise

Last synced: 2 days ago
JSON representation

Unified CLI for Redis Cloud and Enterprise management

Awesome Lists containing this project

README

          

# redisctl

> **A modern CLI for Redis Cloud and Redis Enterprise** — Automate deployments, manage resources, and troubleshoot issues from one unified interface.

[![Crates.io](https://img.shields.io/crates/v/redisctl.svg)](https://crates.io/crates/redisctl)
[![Documentation](https://docs.rs/redisctl/badge.svg)](https://docs.rs/redisctl)
[![CI](https://github.com/redis-developer/redisctl/actions/workflows/ci.yml/badge.svg)](https://github.com/redis-developer/redisctl/actions/workflows/ci.yml)
[![License](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](https://github.com/redis-developer/redisctl#license)

```bash
# Create a Redis Cloud subscription with one command
redisctl subscription create @subscription.json --wait

# Stream logs in real-time
redisctl logs list --follow

# Generate and upload support packages
redisctl support-package cluster --optimize --upload
```

> **Prefix-free commands** — `cloud`/`enterprise` prefixes are optional. The CLI infers the platform from your [profile configuration](#profiles). Use explicit prefixes in scripts or when multiple profiles exist.

---

## Why redisctl?

Managing Redis Cloud and Redis Enterprise through REST APIs means juggling curl commands, parsing JSON, and manually polling for operation completion. **redisctl eliminates that friction.**

### What You Get

- **One CLI for Everything** — Manage both Redis Cloud and Enterprise from a single tool
- **Intelligent Async Handling** — `--wait` flags automatically poll long-running operations
- **Real-Time Streaming** — Tail logs and metrics with `--follow`
- **Automated Workflows** — High-level commands like `subscription-setup` handle complex tasks
- **Smart Output** — Tables for humans, JSON for scripts, with JMESPath filtering built-in
- **Production Ready** — Secure credential storage, profile management, and comprehensive error handling

---

## Quick Start

### 1. Install

```bash
# Homebrew (macOS/Linux)
brew install redis-developer/homebrew-tap/redisctl

# Cargo
cargo install redisctl

# Or download from releases
# https://github.com/redis-developer/redisctl/releases
```

### 2. Configure

```bash
# Redis Cloud
redisctl profile set prod \
--deployment cloud \
--api-key "$REDIS_CLOUD_API_KEY" \
--api-secret "$REDIS_CLOUD_SECRET_KEY"

# Redis Enterprise
redisctl profile set dev \
--deployment enterprise \
--url "https://cluster.local:9443" \
--username "admin@redis.local" \
--password "$REDIS_ENTERPRISE_PASSWORD"
```

### 3. Run Your First Commands

```bash
# List all databases (platform inferred from your profile)
redisctl database list

# Get cluster info in table format
redisctl cluster get -o table

# Create a database and wait for it to be ready
redisctl database create @db-config.json --wait

# Stream cluster logs
redisctl logs list --follow
```

> **Tip:** The commands above omit the `cloud`/`enterprise` prefix — the CLI infers the platform from your profile. You can always be explicit: `redisctl cloud database list` or `redisctl enterprise cluster get`.

**That's it!** You're ready to manage your Redis deployments.

[**Full Documentation →**](https://redis-field-engineering.github.io/redisctl-docs/)

---

## Feature Showcase

### Async Operations Made Easy

No more manual polling. The `--wait` flag handles it automatically:

```bash
# Old way: Create and manually check status
curl -X POST .../databases -d @config.json
# Wait...check status...wait...check again...

# New way: Create and wait automatically
redisctl cloud database create @config.json --wait
# ✓ Database created and ready in 45s
```

### Flexible Output Formats

```bash
# Human-friendly tables
redisctl cloud subscription list -o table

# Machine-readable JSON
redisctl cloud database list -o json

# Filter with JMESPath
redisctl cloud database list -q 'databases[?status==`active`].name'
```

### High-Level Workflows

Complex multi-step operations in one command:

```bash
# Set up a complete subscription with databases, ACLs, and networking
redisctl cloud workflow subscription-setup @workflow.yaml

# Results in:
# ✓ Subscription created
# ✓ VPC peering configured
# ✓ Databases provisioned
# ✓ ACL rules applied
# ✓ Ready for production
```

### Real-Time Streaming

Monitor your infrastructure live:

```bash
# Tail cluster logs
redisctl enterprise logs list --follow

# Watch with custom poll interval
redisctl enterprise logs list --follow --poll-interval 1
```

### Support Package Automation

Generate diagnostic packages and upload to Redis Support in one step:

```bash
# Generate, optimize, and upload cluster diagnostics
redisctl enterprise support-package cluster \
--optimize \
--upload \
--no-save

# Saves 20-30% space and uploads directly to Files.com
# ✓ Package generated (542 MB)
# ✓ Optimized to 389 MB
# ✓ Uploaded to Redis Support
```

---

## Real-World Examples

### Scenario: Deploy a New Database

```bash
# 1. Check available subscriptions
redisctl cloud subscription list -o table

# 2. Create database config
cat > database.json < `10`]'

# Multiple output formats
redisctl enterprise cluster get -o table
redisctl enterprise cluster get -o json | jq
redisctl enterprise cluster get -o yaml
```

### Python Bindings

Use the API client libraries from Python:

```bash
pip install redis-cloud redis-enterprise
```

```python
from redis_cloud import CloudClient
from redis_enterprise import EnterpriseClient

# Redis Cloud
cloud = CloudClient.from_env()
subs = cloud.subscriptions_sync()

# Redis Enterprise
enterprise = EnterpriseClient.from_env()
dbs = enterprise.databases_sync()

# Async support
async def main():
subs = await cloud.subscriptions()
```

- [redis-cloud on PyPI](https://pypi.org/project/redis-cloud/)
- [redis-enterprise on PyPI](https://pypi.org/project/redis-enterprise/)

### MCP Server (AI Integration)

redisctl includes an MCP server (`redisctl-mcp`) that enables AI assistants to manage Redis deployments:

```bash
# Start the MCP server
redisctl-mcp --profile my-profile

# Enable write operations
redisctl-mcp --profile my-profile --read-only=false
```

Configure your AI assistant (Claude Desktop, Cursor, etc.) to use it:

```json
{
"mcpServers": {
"redisctl": {
"command": "redisctl-mcp",
"args": ["--profile", "my-profile", "--read-only=false"]
}
}
}
```

**Zero-install with Docker** -- no local install needed:

```json
{
"mcpServers": {
"redisctl": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "REDIS_ENTERPRISE_URL=https://cluster:9443",
"-e", "REDIS_ENTERPRISE_USER=admin@redis.local",
"-e", "REDIS_ENTERPRISE_PASSWORD",
"ghcr.io/redis-developer/redisctl",
"redisctl-mcp"
]
}
}
}
```

See the [MCP Documentation](https://redis-field-engineering.github.io/redisctl-docs/mcp/) for full setup instructions including [Docker options](https://redis-field-engineering.github.io/redisctl-docs/getting-started/docker/#mcp-server-zero-install).

---

## Documentation

**[Complete Documentation](https://redis-field-engineering.github.io/redisctl-docs/)**

- [Getting Started Guide](https://redis-field-engineering.github.io/redisctl-docs/getting-started/)
- [Command Reference](https://redis-field-engineering.github.io/redisctl-docs/reference/)
- [Configuration Guide](https://redis-field-engineering.github.io/redisctl-docs/configuration/)
- [Workflow Examples](https://redis-field-engineering.github.io/redisctl-docs/workflows/)
- [Troubleshooting](https://redis-field-engineering.github.io/redisctl-docs/troubleshooting/)

---

## Changelogs

Individual crate changelogs:
- [redisctl CLI](crates/redisctl/CHANGELOG.md) - Command-line interface
- [redisctl-config](crates/redisctl-config/CHANGELOG.md) - Configuration management library
- [redisctl-mcp](crates/redisctl-mcp/CHANGELOG.md) - MCP server

The API client libraries are maintained in separate repositories:
- [redis-cloud](https://github.com/redis-developer/redis-cloud-rs) - Redis Cloud API client
- [redis-enterprise](https://github.com/redis-developer/redis-enterprise-rs) - Redis Enterprise API client

---

## Contributing

Contributions welcome! See our [Contributing Guide](https://redis-field-engineering.github.io/redisctl-docs/developer/contributing.html).

```bash
# Clone and build
git clone https://github.com/redis-developer/redisctl.git
cd redisctl
cargo build --release

# Run tests
cargo test --workspace

# Check code
cargo clippy --all-targets -- -D warnings
cargo fmt --all --check
```

---

## License

Licensed under either of:
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
- MIT license ([LICENSE-MIT](LICENSE-MIT))

at your option.

---

## Support

- [Documentation](https://redis-field-engineering.github.io/redisctl-docs/)
- [Issue Tracker](https://github.com/redis-developer/redisctl/issues)
- [Discussions](https://github.com/redis-developer/redisctl/discussions)