redisctl/lib.rs
1//! # redisctl
2//!
3//! A unified command-line interface for managing Redis deployments across Cloud and Enterprise.
4//!
5//! ## Overview
6//!
7//! `redisctl` is a comprehensive CLI tool that unifies management of both Redis Cloud and
8//! Redis Enterprise deployments. It automatically detects which API to use based on your
9//! configuration profile or explicit command selection, providing a consistent interface
10//! for all Redis management tasks.
11//!
12//! ## Installation
13//!
14//! Install the CLI tool from crates.io:
15//!
16//! ```bash
17//! cargo install redisctl
18//! ```
19//!
20//! ## Quick Start
21//!
22//! ### Configure Authentication
23//!
24//! For Redis Cloud:
25//! ```bash
26//! export REDIS_CLOUD_API_KEY="your-api-key"
27//! export REDIS_CLOUD_API_SECRET="your-api-secret"
28//! ```
29//!
30//! For Redis Enterprise:
31//! ```bash
32//! export REDIS_ENTERPRISE_URL="https://cluster.example.com:9443"
33//! export REDIS_ENTERPRISE_USER="admin@example.com"
34//! export REDIS_ENTERPRISE_PASSWORD="your-password"
35//! ```
36//!
37//! Or use profiles:
38//! ```bash
39//! redisctl profile set prod-cloud \
40//! --deployment-type cloud \
41//! --api-key YOUR_KEY \
42//! --api-secret YOUR_SECRET
43//! ```
44//!
45//! ### Basic Usage
46//!
47//! ```bash
48//! # List all profiles
49//! redisctl profile list
50//!
51//! # Cloud-specific commands
52//! redisctl cloud subscription list
53//! redisctl cloud database list
54//!
55//! # Enterprise-specific commands
56//! redisctl enterprise cluster info
57//! redisctl enterprise database list
58//!
59//! # Smart routing (auto-detects based on profile)
60//! redisctl cloud database list --profile prod-cloud
61//! ```
62//!
63//! ## Features
64//!
65//! - **Unified Interface** - Single CLI for both Redis Cloud and Enterprise
66//! - **Smart Command Routing** - Automatically routes commands based on deployment type
67//! - **Profile Management** - Save and switch between multiple Redis deployments
68//! - **Multiple Output Formats** - JSON, YAML, and Table output with JMESPath queries
69//! - **Comprehensive API Coverage** - Full implementation of both Cloud and Enterprise REST APIs
70//!
71//! ## Using as a Library
72//!
73//! If you need to programmatically interact with Redis Cloud or Enterprise APIs,
74//! use the dedicated library crates instead:
75//!
76//! - [`redis-cloud`](https://docs.rs/redis-cloud) - Redis Cloud REST API client
77//! - [`redis-enterprise`](https://docs.rs/redis-enterprise) - Redis Enterprise REST API client
78//!
79//! ## Documentation
80//!
81//! For complete documentation and examples, see the [GitHub repository](https://github.com/joshrotenberg/redisctl).
82
83// Internal modules for CLI functionality
84pub(crate) mod cli;
85pub(crate) mod commands;
86pub(crate) mod config;
87pub(crate) mod connection;
88pub(crate) mod error;
89pub(crate) mod output;
90pub(crate) mod workflows;