Skip to content

Commit 4a5a4ee

Browse files
docs: simplify README to focus on getting started (#249)
- Reduced README from 219 to 110 lines - Kept only essential information for quick start - Moved detailed content to documentation site: - Shell completions moved to installation guide - Detailed examples remain in docs - Configuration details link to full docs - Clear path from installation to first command - Added prominent link to full documentation Part of #244
1 parent 66b0294 commit 4a5a4ee

File tree

2 files changed

+158
-173
lines changed

2 files changed

+158
-173
lines changed

README.md

Lines changed: 54 additions & 163 deletions
Original file line numberDiff line numberDiff line change
@@ -1,220 +1,111 @@
11
# redisctl
22

33
[![Crates.io](https://img.shields.io/crates/v/redisctl.svg)](https://crates.io/crates/redisctl)
4-
[![Downloads](https://img.shields.io/crates/d/redisctl.svg)](https://crates.io/crates/redisctl)
54
[![Documentation](https://docs.rs/redisctl/badge.svg)](https://docs.rs/redisctl)
6-
[![GitHub Release](https://img.shields.io/github/v/release/joshrotenberg/redisctl)](https://github.com/joshrotenberg/redisctl/releases)
7-
[![License](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](https://github.com/joshrotenberg/redisctl#license)
85
[![CI](https://github.com/joshrotenberg/redisctl/actions/workflows/ci.yml/badge.svg)](https://github.com/joshrotenberg/redisctl/actions/workflows/ci.yml)
9-
[![Security Audit](https://github.com/joshrotenberg/redisctl/actions/workflows/security.yml/badge.svg)](https://github.com/joshrotenberg/redisctl/actions/workflows/security.yml)
10-
[![Docker](https://img.shields.io/docker/v/joshrotenberg/redisctl?label=docker)](https://hub.docker.com/r/joshrotenberg/redisctl)
6+
[![License](https://img.shields.io/badge/license-MIT%20OR%20Apache--2.0-blue.svg)](https://github.com/joshrotenberg/redisctl#license)
117

12-
A unified CLI for Redis Cloud and Redis Enterprise REST APIs with comprehensive async operation support.
8+
A unified command-line interface for managing Redis Cloud and Redis Enterprise deployments through their REST APIs.
139

1410
## Features
1511

1612
- **Unified Interface** - Single CLI for both Redis Cloud and Redis Enterprise
1713
- **Async Operations** - Full support for long-running operations with `--wait` flags
1814
- **Smart Routing** - Automatically detects which API to use based on context
1915
- **Multiple Output Formats** - JSON, YAML, and Table output with JMESPath filtering
20-
- **Secure Configuration** - Profile-based auth with environment variable support
21-
- **Comprehensive Coverage** - Full API coverage for both platforms
16+
- **Profile Management** - Secure credential storage with environment variable support
2217

2318
## Installation
2419

25-
```bash
26-
# Install from crates.io
27-
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
33-
```
20+
### From Binary Releases
21+
Download the latest release for your platform from the [releases page](https://github.com/joshrotenberg/redisctl/releases).
3422

35-
### Shell Completions
36-
37-
`redisctl` can generate shell completions for various shells. To install them:
38-
39-
#### Bash
23+
### From Cargo
4024
```bash
41-
# Generate and install completion
42-
redisctl completions bash > ~/.local/share/bash-completion/completions/redisctl
43-
44-
# Or for system-wide installation (requires sudo)
45-
redisctl completions bash | sudo tee /usr/share/bash-completion/completions/redisctl
46-
```
47-
48-
#### Zsh
49-
```bash
50-
# Generate completion to a directory in your $fpath
51-
redisctl completions zsh > ~/.zsh/completions/_redisctl
52-
53-
# Add this to your ~/.zshrc if not already present
54-
fpath=(~/.zsh/completions $fpath)
55-
autoload -U compinit && compinit
56-
```
57-
58-
#### Fish
59-
```bash
60-
# Generate completion
61-
redisctl completions fish > ~/.config/fish/completions/redisctl.fish
62-
```
63-
64-
#### PowerShell
65-
```powershell
66-
# Generate completion
67-
redisctl completions powershell > $PROFILE.CurrentUserAllHosts
68-
69-
# Or add to your profile
70-
redisctl completions powershell >> $PROFILE
25+
cargo install redisctl
7126
```
7227

73-
#### Elvish
28+
### Using Docker
7429
```bash
75-
# Generate completion
76-
redisctl completions elvish > ~/.elvish/lib/redisctl.elv
77-
78-
# Add to rc.elv
79-
echo "use redisctl" >> ~/.elvish/rc.elv
30+
docker run --rm joshrotenberg/redisctl --help
8031
```
8132

8233
## Quick Start
8334

84-
### Configure Authentication
85-
86-
Create `~/.config/redisctl/config.toml`:
87-
88-
```toml
89-
[profiles.cloud]
90-
deployment_type = "cloud"
91-
api_key = "your-api-key"
92-
api_secret = "your-secret-key"
93-
94-
[profiles.enterprise]
95-
deployment_type = "enterprise"
96-
url = "https://cluster:9443"
97-
username = "admin@example.com"
98-
password = "your-password"
99-
100-
default_profile = "cloud"
101-
```
102-
103-
Or use environment variables:
35+
### 1. Configure Authentication
10436

10537
```bash
10638
# Redis Cloud
107-
export REDIS_CLOUD_API_KEY="your-key"
108-
export REDIS_CLOUD_API_SECRET="your-secret"
39+
export REDIS_CLOUD_API_KEY="your-api-key"
40+
export REDIS_CLOUD_SECRET_KEY="your-secret-key"
10941

11042
# Redis Enterprise
111-
export REDIS_ENTERPRISE_URL="https://cluster:9443"
112-
export REDIS_ENTERPRISE_USER="admin@example.com"
43+
export REDIS_ENTERPRISE_URL="https://your-cluster:9443"
44+
export REDIS_ENTERPRISE_USER="your-email@example.com"
11345
export REDIS_ENTERPRISE_PASSWORD="your-password"
11446
```
11547

116-
### Basic Usage
117-
118-
### Database Operations
48+
Or use profiles for multiple environments:
11949

12050
```bash
121-
# List databases
122-
redisctl database list
123-
124-
# Create database with async wait
125-
redisctl cloud database create --data @database.json --wait
51+
# Create a profile
52+
redisctl profile set cloud-prod \
53+
--cloud-api-key="$REDIS_CLOUD_API_KEY" \
54+
--cloud-secret-key="$REDIS_CLOUD_SECRET_KEY"
12655

127-
# Update database with wait
128-
redisctl cloud database update 12345 --data @update.json --wait
129-
130-
# Different output formats with filtering
131-
redisctl database list -o yaml | yq '.[] | select(.name == "prod")'
132-
133-
# Delete database with force and wait
134-
redisctl cloud database delete 12345 --force --wait
56+
# Use the profile
57+
redisctl --profile cloud-prod cloud database list
13558
```
13659

137-
## Output Formats
60+
### 2. Basic Commands
13861

13962
```bash
140-
# JSON output (default)
141-
redisctl database list -o json
142-
143-
# YAML output
144-
redisctl database list -o yaml
145-
146-
# Human-readable table
147-
redisctl database list -o table
148-
149-
# Filter with JMESPath
150-
redisctl database list -q "[?status=='active'].{name: name, memory: memoryLimitInGb}"
151-
152-
# Combine with jq for advanced processing
153-
redisctl database list -o json | jq '.[] | select(.name | contains("prod"))'
154-
```
155-
156-
## Profile Management
157-
158-
```bash
159-
# List all profiles
160-
redisctl profile list
161-
162-
# Set default profile
163-
redisctl profile default cloud-prod
164-
165-
# Get specific profile settings
166-
redisctl profile get enterprise-dev
63+
# List databases (auto-detects deployment type from profile)
64+
redisctl database list
16765

168-
# Set profile values
169-
redisctl profile set cloud-staging api_key "new-key"
170-
redisctl profile set cloud-staging api_secret "new-secret"
66+
# Get database details with formatted output
67+
redisctl database get 12345 --output table
17168

172-
# Remove profile
173-
redisctl profile remove old-profile
69+
# Create a database and wait for completion
70+
redisctl cloud database create --data @database.json --wait
17471

175-
# Use specific profile for a command
176-
redisctl database list --profile cloud-staging
72+
# Direct API access for any endpoint
73+
redisctl api cloud get /subscriptions/88449/databases
17774
```
17875

179-
## Environment Variables
180-
181-
### Cloud Configuration
182-
- `REDIS_CLOUD_API_KEY` - API key for authentication
183-
- `REDIS_CLOUD_API_SECRET` - API secret for authentication
184-
- `REDIS_CLOUD_API_URL` - Custom API URL (optional)
185-
186-
### Enterprise Configuration
187-
- `REDIS_ENTERPRISE_URL` - Cluster API URL
188-
- `REDIS_ENTERPRISE_USER` - Username for authentication
189-
- `REDIS_ENTERPRISE_PASSWORD` - Password for authentication
190-
- `REDIS_ENTERPRISE_INSECURE` - Allow insecure TLS (true/false)
191-
192-
### General Configuration
193-
- `REDISCTL_PROFILE` - Default profile to use
194-
- `RUST_LOG` - Logging level (error, warn, info, debug, trace)
195-
19676
## Documentation
19777

198-
For comprehensive documentation, see the [mdBook documentation](docs/):
78+
For comprehensive documentation including:
79+
- Detailed configuration options
80+
- Complete command reference
81+
- Async operation handling
82+
- Output formatting and filtering
83+
- Troubleshooting guides
19984

200-
- [Getting Started](docs/src/getting-started/index.md) - Installation and configuration
201-
- [CLI Reference](docs/src/cli-reference/index.md) - Complete command reference
202-
- [Async Operations](docs/src/features/async-operations.md) - Using `--wait` flags
203-
- [Examples](docs/src/examples/index.md) - Common use cases and patterns
204-
- **API Reference** - Complete command reference
85+
Visit the [full documentation](https://joshrotenberg.github.io/redisctl/).
20586

20687
## Development
20788

208-
This project provides Rust client libraries for both APIs:
89+
### Building from Source
90+
```bash
91+
git clone https://github.com/joshrotenberg/redisctl.git
92+
cd redisctl
93+
cargo build --release
94+
```
20995

210-
```toml
211-
[dependencies]
212-
redis-cloud = "0.2" # Redis Cloud API client
213-
redis-enterprise = "0.2" # Redis Enterprise API client
96+
### Running Tests
97+
```bash
98+
cargo test --workspace
21499
```
215100

216-
See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
101+
## Contributing
102+
103+
Contributions are welcome! Please see the [contributing guidelines](https://joshrotenberg.github.io/redisctl/developer/contributing.html) in the documentation.
217104

218105
## License
219106

220-
This project is licensed under the MIT License - see [LICENSE](LICENSE) file for details.
107+
Licensed under either of:
108+
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE))
109+
- MIT license ([LICENSE-MIT](LICENSE-MIT))
110+
111+
at your option.

0 commit comments

Comments
 (0)