Skip to main content

redisctl-database-connect

Connect to Redis databases using the redisctl CLI. Use when opening redis-cli sessions, managing connection profiles, or working with multiple Redis clusters.

来源信息

仓库
redis/redisctl
最近来源活动
2026年3月17日 16:45
检测到的 SKILL.md 语言
英语
星标
18
Forks
3

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
redisctl-database-connect
description
Connect to Redis databases using the redisctl CLI. Use when opening redis-cli sessions, managing connection profiles, or working with multiple Redis clusters.
## Overview Connect to Redis databases using profile-based credential management. Supports direct Redis connections, Cloud databases, and Enterprise databases. ## Quick Connect ```bash # Open redis-cli using the default database profile redisctl db open # Open redis-cli with a specific profile redisctl db open --profile my-redis ``` ## Profile-Based Connection Management ### Create Database Profiles ```bash # Local Redis redisctl profile set local --type database --url "redis://localhost:6379" # Redis with password redisctl profile set staging --type database --url "redis://:password@host:6379" # Redis with TLS redisctl profile set prod --type database --url "rediss://host:6380" # Set as default redisctl profile default-database local ``` ### Multi-Cluster Workflows Create profiles for each environment: ```bash redisctl profile set dev-redis --type database --url "redis://dev:6379" redisctl profile set staging-redis --type database --url "rediss://staging:6380" redisctl profile set prod-redis --type database --url "rediss://prod:6380" ``` Switch between them: ```bash # Connect to dev redisctl db open --profile dev-redis # Connect to staging redisctl db open --profile staging-redis ``` ## Raw API Access For operations not covered by specific commands: ```bash # Cloud API redisctl api cloud GET /subscriptions redisctl api cloud POST /subscriptions/12345/databases --data '{...}' # Enterprise API redisctl api enterprise GET /v1/bdbs redisctl api enterprise PUT /v1/bdbs/1 --data '{...}' ``` ## Tips - Database profile URLs follow the standard Redis URI scheme: `redis://[user:password@]host[:port][/db]` - Use `rediss://` (double s) for TLS connections - Profile credentials support environment variable substitution: `--url "redis://:${REDIS_PASSWORD}@host:6379"` - Run `redisctl profile validate` to test all profile connections
在 GitHub 查看