11# redisctl
22
3- A unified CLI for Redis Cloud and Redis Enterprise REST APIs.
3+ A unified CLI for Redis Cloud and Redis Enterprise REST APIs with comprehensive async operation support.
4+
5+ ## Features
6+
7+ - 🚀 ** Unified Interface** - Single CLI for both Redis Cloud and Redis Enterprise
8+ - ⏳ ** Async Operations** - Full support for long-running operations with ` --wait ` flags
9+ - 🔄 ** Smart Routing** - Automatically detects which API to use based on context
10+ - 📊 ** Multiple Output Formats** - JSON, YAML, and Table output with JMESPath filtering
11+ - 🔐 ** Secure Configuration** - Profile-based auth with environment variable support
12+ - 🌐 ** Comprehensive Coverage** - Full API coverage for both platforms
13+ A unified CLI for Redis Cloud and Redis Enterprise REST APIs with comprehensive async operation support.
14+
15+ ## Features
16+
17+ - 🚀 ** Unified Interface** - Single CLI for both Redis Cloud and Redis Enterprise
18+ - ⏳ ** Async Operations** - Full support for long-running operations with ` --wait ` flags
19+ - 🔄 ** Smart Routing** - Automatically detects which API to use based on context
20+ - 📊 ** Multiple Output Formats** - JSON, YAML, and Table output with JMESPath filtering
21+ - 🔐 ** Secure Configuration** - Profile-based auth with environment variable support
422
523## Installation
624
725``` bash
8- # Install from source
9- cargo install --path crates/redisctl
10-
11- # Or install from crates.io (coming soon)
26+ # Install from crates.io
1227cargo install redisctl
28+
29+ # Or build from source
30+ git clone https://github.com/joshrotenberg/redisctl.git
31+ cd redisctl
32+ cargo install --path crates/redisctl
1333```
1434
15- ## Quick Configuration
35+ ## Quick Start
36+
37+ ### Configure Authentication
1638
1739Create ` ~/.config/redisctl/config.toml ` :
1840
1941``` toml
20- # Redis Cloud Profile
2142[profiles .cloud ]
2243deployment_type = " cloud"
23- api_key = " your-account -key" # From Redis Cloud console
24- api_secret = " your-secret-key" # Keep this secret!
44+ api_key = " your-api -key"
45+ api_secret = " your-secret-key"
2546
26- # Redis Enterprise Profile
2747[profiles .enterprise ]
2848deployment_type = " enterprise"
29- url = " https://your- cluster:9443"
49+ url = " https://cluster:9443"
30503151password = " your-password"
32- insecure = true # For self-signed certificates
3352
34- # Set your default
3553default_profile = " cloud"
3654```
3755
3856Or use environment variables:
3957
4058``` bash
41- # For Redis Cloud
59+ # Redis Cloud
4260export REDIS_CLOUD_API_KEY=" your-key"
4361export REDIS_CLOUD_API_SECRET=" your-secret"
4462
45- # For Redis Enterprise
63+ # Redis Enterprise
4664export REDIS_ENTERPRISE_URL=" https://cluster:9443"
4765export REDIS_ENTERPRISE_USER=
" [email protected] " 4866export REDIS_ENTERPRISE_PASSWORD=" your-password"
4967```
5068
51- ## Basic Usage
69+ ### Basic Usage
70+
71+ ### Database Operations
5272
5373``` bash
5474# List databases
5575redisctl database list
5676
57- # Get specific database
58- redisctl database get 12345
77+ # Create database with async wait
78+ redisctl cloud database create --data @database.json --wait
5979
60- # Direct API access
61- redisctl api cloud get /subscriptions
62- redisctl api enterprise get /v1/cluster
80+ # Create database with async wait
81+ redisctl cloud database create
82+ # UpdateDifferent output
83+ redisctl Deletedatabaselist-o yaml | yq ' .[] | select(.name == "prod")' database with force and wait
84+ redisctl cloud database delete 12345 --force --wait
85+ ```
6386
64- # Output formats
87+ ## Output Formats
88+
89+ ``` bash
90+ # JSON output (default)
6591redisctl database list -o json
92+
93+ # YAML output
6694redisctl database list -o yaml
95+
96+ # Human-readable table
6797redisctl database list -o table
6898
6999# Filter with JMESPath
70- redisctl database list -q " [?status=='active'].name"
100+ redisctl database list -q " [?status=='active'].{name: name, memory: memoryLimitInGb}"
101+
102+ # Combine with jq for advanced processing
103+ redisctl database list -o json | jq ' .[] | select(.name | contains("prod"))'
71104```
72105
73- ## Command Structure
106+ ## Profile Management
74107
108+ ``` bash
109+ # List all profiles
110+ redisctl profile list
111+
112+ # Set default profile
113+ redisctl profile default cloud-prod
114+
115+ # Get specific profile settings
116+ redisctl profile get enterprise-dev
117+
118+ # Set profile values
119+ redisctl profile set cloud-staging api_key " new-key"
120+ redisctl profile set cloud-staging api_secret " new-secret"
121+
122+ # Remove profile
123+ redisctl profile remove old-profile
124+
125+ # Use specific profile for a command
126+ redisctl database list --profile cloud-staging
75127```
76- redisctl
77- ├── api # Raw API access (any endpoint)
78- ├── cloud # Cloud-specific commands
79- ├── enterprise # Enterprise-specific commands
80- ├── database # Smart commands (work with both)
81- └── profile # Manage configuration profiles
82- ```
128+
129+ ## Environment Variables
130+
131+ ### Cloud Configuration
132+ - ` REDIS_CLOUD_API_KEY ` - API key for authentication
133+ - ` REDIS_CLOUD_API_SECRET ` - API secret for authentication
134+ - ` REDIS_CLOUD_API_URL ` - Custom API URL (optional)
135+
136+ ### Enterprise Configuration
137+ - ` REDIS_ENTERPRISE_URL ` - Cluster API URL
138+ - ` REDIS_ENTERPRISE_USER ` - Username for authentication
139+ - ` REDIS_ENTERPRISE_PASSWORD ` - Password for authentication
140+ - ` REDIS_ENTERPRISE_INSECURE ` - Allow insecure TLS (true/false)
141+
142+ ### General Configuration
143+ - ` REDISCTL_PROFILE ` - Default profile to use
144+ - ` RUST_LOG ` - Logging level (error, warn, info, debug, trace)
83145
84146## Documentation
85147
86- For comprehensive documentation, see the [ User Guide ] ( https:// docs.rs/redisctl ) .
148+ For comprehensive documentation, see the [ mdBook documentation ] ( docs/ ) :
87149
88- - ** Getting Started** - Installation, configuration, first commands
89- - ** Redis Cloud** - Cloud-specific operations and API reference
90- - ** Redis Enterprise** - Enterprise-specific operations and API reference
91- - ** Examples** - Common use cases and patterns
150+ - [ Getting Started] ( docs/src/getting-started/index.md ) - Installation and configuration
151+ - [ CLI Reference] ( docs/src/cli-reference/index.md ) - Complete command reference
152+ - [ Async Operations] ( docs/src/features/async-operations.md ) - Using ` --wait ` flags
153+ - [ Examples] ( docs/src/examples/index.md ) - Common use cases and patterns
154+ - ** API Reference** - Complete command reference
92155
93156## Development
94157
@@ -100,6 +163,8 @@ redis-cloud = "0.2" # Redis Cloud API client
100163redis-enterprise = " 0.2" # Redis Enterprise API client
101164```
102165
166+ See [ CONTRIBUTING.md] ( CONTRIBUTING.md ) for development guidelines.
167+
103168## License
104169
105- MIT
170+ This project is licensed under the MIT License - see [ LICENSE ] ( LICENSE ) file for details.
0 commit comments