Skip to content

Commit fee956d

Browse files
Merge pull request #202 from joshrotenberg/docs/comprehensive-update
docs: comprehensive documentation update for async operations
2 parents 56cd49b + 793194c commit fee956d

File tree

11 files changed

+1680
-39
lines changed

11 files changed

+1680
-39
lines changed

CHANGELOG.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
#### Comprehensive Async Operation Support (#175-#201)
13+
- **Database Operations** - Added `--wait` flag support for all database operations including create, update, delete, import, backup, and migrate commands
14+
- **Subscription Management** - Full async support for regular and fixed subscription operations with progress tracking
15+
- **Active-Active Databases** - Complete async operation support for CRDB create, update, and delete operations
16+
- **Network Connectivity** - Implemented `--wait` flags for:
17+
- VPC Peering operations (regular and Active-Active)
18+
- Private Service Connect (PSC) operations (regular and Active-Active)
19+
- Transit Gateway (TGW) operations including attach/detach (regular and Active-Active)
20+
- **ACL Management** - Added async support for all 9 ACL commands:
21+
- Redis ACL Rules (create, update, delete)
22+
- ACL Roles (create, update, delete)
23+
- ACL Users (create, update, delete)
24+
- **User Management** - Added `--wait` flag support for user deletion operations
25+
- **Provider Accounts** - Full async support for cloud provider account operations (create, update, delete)
26+
- **Fixed Plans** - Implemented async operations for fixed databases and fixed subscriptions
27+
28+
#### Wait Flag Options
29+
- `--wait` - Wait for operation to complete with default 600s timeout
30+
- `--wait-timeout <seconds>` - Configurable timeout duration for long operations
31+
- `--wait-interval <seconds>` - Customizable polling interval (default: 10s)
32+
33+
### Changed
34+
35+
#### Code Organization Improvements
36+
- **Parameter Grouping** - Introduced parameter structs to avoid `too_many_arguments` clippy warnings:
37+
- `AsyncOperationArgs` for async operation parameters
38+
- `ConnectivityOperationParams` for network connectivity operations
39+
- `CloudAccountOperationParams` for provider account operations
40+
- `AclOperationParams` for ACL management operations
41+
- **Module Consolidation** - Reorganized connectivity commands under unified module structure
42+
- **Centralized Async Handling** - All async operations now use the centralized `handle_async_response` function for consistency
43+
44+
### Fixed
45+
- Fixed clippy warnings for functions with too many arguments
46+
- Improved error handling for async operations with better context
47+
- Enhanced progress indicators with animated spinners
48+
- Fixed task ID extraction from various API response formats
49+
50+
### Documentation
51+
- Comprehensive README update with all new async operation examples
52+
- Updated CLAUDE.md with architectural changes and patterns
53+
- Created FEATURES.md documenting all async operations in detail
54+
- Added usage examples for all new `--wait` flag operations
55+
56+
## [0.2.0] - Previous Release
57+
58+
### Added
59+
- Basic Cloud API support
60+
- Enterprise API support
61+
- Profile management system
62+
- Multiple output formats (JSON, YAML, Table)
63+
- JMESPath query filtering
64+
65+
### Changed
66+
- Improved error handling
67+
- Better configuration management
68+
69+
### Fixed
70+
- Various bug fixes and improvements
71+
72+
## [0.1.0] - Initial Release
73+
74+
### Added
75+
- Initial implementation
76+
- Basic command structure
77+
- Authentication support
78+
- Raw API access

README.md

Lines changed: 102 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,157 @@
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
1227
cargo 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

1739
Create `~/.config/redisctl/config.toml`:
1840

1941
```toml
20-
# Redis Cloud Profile
2142
[profiles.cloud]
2243
deployment_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]
2848
deployment_type = "enterprise"
29-
url = "https://your-cluster:9443"
49+
url = "https://cluster:9443"
3050
username = "[email protected]"
3151
password = "your-password"
32-
insecure = true # For self-signed certificates
3352

34-
# Set your default
3553
default_profile = "cloud"
3654
```
3755

3856
Or use environment variables:
3957

4058
```bash
41-
# For Redis Cloud
59+
# Redis Cloud
4260
export REDIS_CLOUD_API_KEY="your-key"
4361
export REDIS_CLOUD_API_SECRET="your-secret"
4462

45-
# For Redis Enterprise
63+
# Redis Enterprise
4664
export REDIS_ENTERPRISE_URL="https://cluster:9443"
4765
export REDIS_ENTERPRISE_USER="[email protected]"
4866
export REDIS_ENTERPRISE_PASSWORD="your-password"
4967
```
5068

51-
## Basic Usage
69+
### Basic Usage
70+
71+
### Database Operations
5272

5373
```bash
5474
# List databases
5575
redisctl 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)
6591
redisctl database list -o json
92+
93+
# YAML output
6694
redisctl database list -o yaml
95+
96+
# Human-readable table
6797
redisctl 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
100163
redis-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.

docs/src/SUMMARY.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88
- [Configuration](./getting-started/configuration.md)
99
- [Quick Start](./getting-started/quickstart.md)
1010

11+
# Features
12+
13+
- [Async Operations](./features/async-operations.md)
14+
- [Database Operations](./features/database-operations.md)
15+
- [Subscription Management](./features/subscription-management.md)
16+
- [Network Connectivity](./features/network-connectivity.md)
17+
- [ACL Management](./features/acl-management.md)
18+
- [User & Account Management](./features/user-management.md)
19+
- [Output Formats](./features/output-formats.md)
20+
- [Profile Management](./features/profiles.md)
21+
1122
# Redis Cloud
1223

1324
- [Overview](./cloud/overview.md)
@@ -26,15 +37,24 @@
2637
- [Workflows (Coming Soon)]()
2738
- [Examples](./enterprise/examples.md)
2839

40+
# CLI Reference
41+
42+
- [Global Options](./cli-reference/global-options.md)
43+
- [Cloud Commands](./cli-reference/cloud-commands.md)
44+
- [Enterprise Commands](./cli-reference/enterprise-commands.md)
45+
- [Smart Commands](./cli-reference/smart-commands.md)
46+
- [Profile Commands](./cli-reference/profile-commands.md)
47+
2948
# Reference
3049

3150
- [Environment Variables](./reference/environment-variables.md)
3251
- [Configuration File](./reference/config-file.md)
33-
- [Output Formats](./reference/output-formats.md)
3452
- [Troubleshooting](./reference/troubleshooting.md)
53+
- [Best Practices](./reference/best-practices.md)
3554

3655
# Developer Guide
3756

3857
- [Architecture](./developer/architecture.md)
3958
- [Using the Libraries](./developer/libraries.md)
40-
- [Contributing](./developer/contributing.md)
59+
- [Contributing](./developer/contributing.md)
60+
- [Adding Commands](./developer/adding-commands.md)

0 commit comments

Comments
 (0)