Files
JRedisDesktop/README.md
T

107 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# JRedisDesktop
基于 Electron + Vue 3 + Vite 的现代 Redis 桌面管理器。
> Fork 自 [AnotherRedisDesktopManager](https://github.com/qishibo/AnotherRedisDesktopManager)。
> 旧版 Vue 2 代码库已归档至 [`legacy/`](legacy/)。
## 功能特性
### 连接管理
- 创建、编辑、删除连接(主机/端口/密码)
- TLS/SSL 支持
- **测试连接** - 保存前验证连接是否成功
- **导入/导出** - JSON 格式连接配置
- 健康检查 + 自动重连指示器
### Key 浏览器
- **模式搜索** - 支持 Redis MATCH 语法(如 `user:*``cache:??`
- 本地过滤快速搜索
- SCAN 分页加载
- 树形视图(按 key 分隔符分组)
- 多选批量操作
- 批量删除(pipeline
### 类型编辑器
- **String** - 查看/编辑,自动 JSON 格式化
- **Hash** - 字段表格,支持增删改
- **List** - 分页查看,支持推入/编辑/移除
- **Set** - 成员列表,支持过滤/添加/移除
- **Zset** - 有序集合,显示分数
- **Stream** - 流数据查看,字段管理
### Key 操作
- **TTL** - 查看和编辑过期时间
- **重命名** - 支持存在性检查
- **复制键名** - 一键复制到剪贴板
- 单个/批量删除
### 分析工具
- **Redis CLI** - 交互式终端,支持命令历史
- **慢日志** - 查看慢命令及耗时
- **INFO 仪表板** - 服务器统计信息
- **数据库选择器** - 切换 DB 0-15
### 设置
- **主题** - 深色、浅色、跟随系统
- **语言** - English / 中文
- **SCAN 数量** - 每次扫描的 key 数量
- **字体大小** - 可调节
### 快捷键
| 快捷键 | 功能 |
|--------|------|
| `Ctrl+N` | 新建连接 |
| `Ctrl+R` | 刷新 key 列表 |
| `F5` | 刷新 key 列表 |
| `Delete` | 删除选中的 key |
| `Escape` | 取消选择 |
## 开发
```bash
npm install
npm run dev # electron-vite 开发模式,支持 HMR
npm run build # 生产构建
```
## 打包
```bash
npm run build:linux
npm run build:mac
npm run build:win
```
## 技术栈
- **主进程:** Electron 33
- **预加载:** contextBridge + 类型化 IPC
- **渲染进程:** Vue 3 + Pinia + Element Plus
- **构建工具:** electron-vite + Vite 6 + TypeScript 5
- **Redis 客户端:** ioredis 5
- **持久化:** electron-store + safeStorage(加密凭据)
## 架构
```
Electron 主进程 (src/main/)
├── RedisService # ioredis 封装(连接、扫描、CRUD、Stream)
├── electron-store # 持久化(连接配置、设置)
├── safeStorage # 凭据加密
└── ipc-handlers # 所有 IPC 通道处理
预加载 (src/preload/)
└── contextBridge → window.electronAPI
渲染进程 (src/renderer/src/)
├── stores/ # Pinia 状态管理(connection, key, app
├── components/ # Vue 3 组件
├── i18n/ # 国际化(英文 + 中文)
└── composables/ # 组合式函数(useKeyboard
```
## License
MIT