Skip to content

Commit f548405

Browse files
committed
docs: fix brew tap command and set mdbook folding to closed by default
- Change brew tap from joshrotenberg/tap to joshrotenberg/brew - Set mdbook fold level to 0 (closed by default)
1 parent cbdd343 commit f548405

File tree

14 files changed

+572
-603
lines changed

14 files changed

+572
-603
lines changed

docker-compose.yml

Lines changed: 225 additions & 152 deletions
Large diffs are not rendered by default.

docs/book.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ edit-url-template = "https://github.com/joshrotenberg/redisctl/edit/main/docs/{p
1313

1414
[output.html.fold]
1515
enable = true
16-
level = 1
16+
level = 0
1717

1818
# Temporarily disabled for reorganization
1919
# [preprocessor.lint]

docs/src/walkthrough/01-problem.md

Lines changed: 23 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@
44

55
## Redis Cloud
66

7-
### What Exists
8-
- 🖱️ **Web UI** - Point and click (not scriptable)
9-
- 🏗️ **Terraform Provider** - Good for IaC, not ad-hoc operations
10-
- 🌐 **REST API** - Documented but no tooling around it
7+
**What Exists:**
8+
- Web UI - Point and click (not scriptable)
9+
- Terraform Provider - Good for IaC, not ad-hoc operations
10+
- REST API - Documented but no tooling around it
1111

12-
### The Gap
13-
No CLI for day-to-day operations
14-
No way to script common tasks
15-
Must use UI or write custom bash scripts
12+
**The Gap:**
13+
- No CLI for day-to-day operations
14+
- No way to script common tasks
15+
- Must use UI or write custom bash scripts
1616

1717
## Redis Enterprise
1818

19-
### What Exists
20-
- 🖥️ **rladmin** - Powerful but limited
19+
**What Exists:**
20+
- **rladmin** - Powerful but limited
2121
- Must SSH to cluster nodes
2222
- Text output (hard to parse)
2323
- Not cross-platform (Linux only on nodes)
2424
- Single cluster at a time
25-
- 🌐 **REST API** - Large (~100+ endpoints), poorly documented
25+
- **REST API** - Large (~100+ endpoints), poorly documented
2626
- Manual JSON construction
2727
- No official tooling
2828

29-
### The Gap
30-
No remote management CLI
31-
No automation-friendly tools
32-
No multi-cluster support
29+
**The Gap:**
30+
- No remote management CLI
31+
- No automation-friendly tools
32+
- No multi-cluster support
3333

3434
## The Reality
3535

@@ -47,38 +47,23 @@ curl -X POST https://api.redislabs.com/v1/subscriptions \
4747
while true; do
4848
STATUS=$(curl -s https://api.redislabs.com/v1/tasks/$TASK_ID | jq -r '.status')
4949
if [ "$STATUS" = "completed" ]; then break; fi
50-
echo "Still waiting..."
5150
sleep 2
5251
done
53-
54-
# Then create database...
55-
# Poll again...
56-
# Repeat for every operation...
5752
```
5853

59-
## Problems with This Approach
60-
61-
1.**No type safety** - Typos cause runtime failures
62-
2.**Manual JSON** - Error-prone, hard to maintain
63-
3.**Polling loops** - Fragile, need manual error handling
64-
4.**Credential exposure** - API keys in shell history
65-
5.**Not portable** - Requires bash, curl, jq
66-
6.**No progress feedback** - Silent failures
67-
7.**Everyone reinvents** - Same scripts written over and over
54+
## Problems
6855

69-
## Who This Affects
70-
71-
- **Support Engineers** → Manual UI clicking, can't script diagnostics
72-
- **DevOps Teams** → Can't automate without Terraform
73-
- **Customers** → Build fragile bash scripts or don't automate
74-
- **Everyone** → Wastes time on operations that should be simple
56+
1. No type safety - Typos cause runtime failures
57+
2. Manual JSON - Error-prone, hard to maintain
58+
3. Polling loops - Fragile, need manual error handling
59+
4. Credential exposure - API keys in shell history
60+
5. Not portable - Requires bash, curl, jq
61+
6. No progress feedback - Silent failures
7562

7663
## The Core Problem
7764

7865
**Redis had ZERO command-line tools for Cloud or Enterprise management**
7966

8067
---
8168

82-
**Next →** [2. Enter redisctl](./02-solution.md) - The first CLI tool
83-
84-
**Demo:** Run `examples/presentation/01-before-redisctl.sh` to see this in action
69+
**Next:** [2. Enter redisctl](./02-solution.md)

docs/src/walkthrough/02-solution.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,68 +6,63 @@
66

77
A unified CLI that eliminates fragile bash scripts with:
88

9-
Type-safe API clients
10-
Automatic async operation handling
11-
Support package automation
12-
Profile management with secure keyring
13-
Structured output (JSON, YAML, Table)
14-
Library-first architecture
9+
- Type-safe API clients
10+
- Automatic async operation handling
11+
- Support package automation
12+
- Profile management with secure keyring
13+
- Structured output (JSON, YAML, Table)
14+
- Library-first architecture
1515

1616
## Before vs After
1717

18-
### Before: 50 Lines of Bash
19-
18+
**Before: 50 Lines of Bash**
2019
```bash
2120
curl + jq + while loops + manual polling + text parsing
2221
```
2322
24-
### After: One Command
25-
23+
**After: One Command**
2624
```bash
2725
redisctl cloud database create \
28-
--subscription-id 12345 \
26+
--subscription 12345 \
2927
--data '{"name": "mydb", "memoryLimitInGb": 1}' \
3028
--wait
3129
```
3230
3331
## Key Benefits
3432
35-
### For Support Engineers
36-
- Remote cluster management (no SSH)
37-
- Support package automation (10 min 30 sec)
38-
- Scriptable diagnostics
33+
**Support Engineers:**
34+
- Remote cluster management (no SSH)
35+
- Support package automation (10 min to 30 sec)
36+
- Scriptable diagnostics
3937
40-
### For DevOps Teams
41-
- CI/CD integration (JSON output)
42-
- Multi-cluster management (profiles)
43-
- Automation-friendly
38+
**DevOps Teams:**
39+
- CI/CD integration (JSON output)
40+
- Multi-cluster management (profiles)
41+
- Automation-friendly
4442
45-
### For Developers
46-
- Reusable libraries
47-
- Type-safe API clients
48-
- Build custom tools
43+
**Developers:**
44+
- Reusable libraries
45+
- Type-safe API clients
46+
- Build custom tools
4947
5048
## Metrics
5149
52-
- **50+ API handlers** (21 Cloud + 29 Enterprise)
53-
- **85%+ test coverage** (production quality)
54-
- **Cross-platform** (macOS, Linux, Windows)
55-
- **v0.6.5** released and actively maintained
50+
- 50+ API handlers (21 Cloud + 29 Enterprise)
51+
- 85%+ test coverage
52+
- Cross-platform (macOS, Linux, Windows)
53+
- v0.6.5 released and actively maintained
5654
5755
## The Impact
5856
5957
**One command replaces 50 lines of fragile bash**
6058
6159
```bash
62-
# Everything just works
6360
redisctl cloud subscription list
64-
redisctl enterprise database list -o table
61+
redisctl enterprise database list
6562
redisctl enterprise support-package cluster --upload
6663
```
6764
6865
---
6966
70-
**← Previous:** [1. The Problem](./01-problem.md)
71-
**Next →** [3. Installation & Setup](./03-setup.md)
72-
73-
**Demo:** Run `examples/presentation/02-after-redisctl.sh` to see the difference
67+
**Previous:** [1. The Problem](./01-problem.md)
68+
**Next:** [3. Installation & Setup](./03-setup.md)

docs/src/walkthrough/03-setup.md

Lines changed: 53 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -2,98 +2,94 @@
22

33
## Installation
44

5-
### Homebrew (macOS/Linux)
6-
5+
**Homebrew (macOS/Linux):**
76
```bash
8-
brew install joshrotenberg/brew/redisctl
7+
brew tap joshrotenberg/brew
8+
brew install redisctl
99
```
1010

11-
### GitHub Releases
12-
13-
Download pre-built binaries for your platform:
14-
- macOS (Intel & Apple Silicon)
15-
- Linux (x86_64)
16-
- Windows (x86_64)
17-
18-
[→ Latest Release](https://github.com/joshrotenberg/redisctl/releases)
19-
20-
### Docker
11+
**GitHub Releases:**
12+
Download pre-built binaries: [Latest Release](https://github.com/joshrotenberg/redisctl/releases)
2113

14+
**Docker:**
2215
```bash
2316
docker run ghcr.io/joshrotenberg/redisctl:latest --help
2417
```
2518

26-
### Cargo (from source)
27-
19+
**Cargo (from source):**
2820
```bash
2921
cargo install redisctl
3022
```
3123

3224
## Profile Setup
3325

34-
### Why Profiles?
35-
36-
Profiles let you:
37-
- Manage multiple clusters (dev, staging, prod)
38-
- Store credentials securely (OS keyring)
39-
- Override with env vars or CLI flags
40-
41-
### Cloud Profile
26+
Profiles let you manage multiple clusters (dev, staging, prod) and store credentials securely.
4227

28+
**Cloud Profile:**
4329
```bash
44-
redisctl profile set prod-cloud \
45-
--deployment-type cloud \
30+
redisctl profile set prod --deployment cloud \
4631
--api-key "your-api-key" \
47-
--api-secret "your-secret-key" \
48-
--use-keyring
32+
--api-secret "your-secret-key"
4933
```
5034

51-
### Enterprise Profile
52-
35+
**Enterprise Profile:**
5336
```bash
54-
redisctl profile set prod-cluster \
55-
--deployment-type enterprise \
56-
--url "https://cluster.example.com:9443" \
57-
--username "[email protected]" \
58-
--use-keyring
59-
# Password will be prompted and stored securely
37+
redisctl profile set local --deployment enterprise \
38+
--url https://localhost:9443 \
39+
--username [email protected] \
40+
--password Redis123! \
41+
--insecure
6042
```
6143

62-
### Verify Setup
63-
44+
**List Profiles:**
6445
```bash
65-
# List profiles
6646
redisctl profile list
67-
68-
# Test connection
69-
redisctl api cloud get / # Cloud
70-
redisctl api enterprise get /v1/cluster # Enterprise
7147
```
7248

73-
## Secure Credential Storage
49+
**Use a Profile:**
50+
```bash
51+
# With flag
52+
redisctl -p prod cloud subscription list
7453

75-
With `--use-keyring`:
76-
- **macOS**: Keychain
77-
- **Windows**: Credential Manager
78-
- **Linux**: Secret Service
54+
# With environment variable
55+
export REDISCTL_PROFILE=prod
56+
redisctl cloud subscription list
57+
```
7958

80-
No credentials in config files or shell history!
59+
## Credential Storage
8160

82-
## Override Hierarchy
61+
**Plaintext** (default) - Stored in config.toml
8362

63+
**Environment Variables:**
64+
```bash
65+
export REDIS_CLOUD_API_KEY="your-key"
66+
export REDIS_CLOUD_SECRET_KEY="your-secret"
8467
```
85-
CLI flags > Environment variables > Profile settings
68+
69+
**OS Keyring** (requires `secure-storage` feature):
70+
```bash
71+
redisctl profile set prod --deployment cloud \
72+
--api-key "$KEY" \
73+
--api-secret "$SECRET" \
74+
--use-keyring
8675
```
8776

88-
Example:
77+
## Docker Compose Demo
78+
79+
Try the complete Enterprise demo:
80+
8981
```bash
90-
# Override profile URL for one command
91-
redisctl --url https://other-cluster:9443 enterprise cluster get
82+
git clone https://github.com/joshrotenberg/redisctl
83+
cd redisctl
84+
docker compose up -d
85+
86+
# Watch initialization
87+
docker compose logs -f redis-enterprise-init
9288
```
9389

94-
---
90+
See `docker-compose.yml` for annotated examples of every command type.
9591

96-
**← Previous:** [2. Enter redisctl](./02-solution.md)
97-
**Next →** [4. Raw API Layer](./04-raw-api.md)
92+
---
9893

99-
See [Configuration Guide](../getting-started/configuration.md) for details
94+
**Previous:** [2. Enter redisctl](./02-solution.md)
95+
**Next:** [4. Raw API Access](./04-raw-api.md)

0 commit comments

Comments
 (0)