1 Commits

Author SHA1 Message Date
Jokul d7dcf1fd34 docs: 更新 AGENTS.md 和 README.md 2026-07-12 15:41:55 +08:00
2 changed files with 77 additions and 17 deletions
+31 -4
View File
@@ -14,6 +14,9 @@ Fork of [AnotherRedisDesktopManager](https://github.com/qishibo/AnotherRedisDesk
- **Module system:** `"type": "module"` (ESM) — main outputs `.js`, preload outputs `.mjs` - **Module system:** `"type": "module"` (ESM) — main outputs `.js`, preload outputs `.mjs`
- **Redis client:** ioredis 5 (main process only) - **Redis client:** ioredis 5 (main process only)
- **Persistence:** electron-store + safeStorage (credentials) - **Persistence:** electron-store + safeStorage (credentials)
- **Virtual scrolling:** @tanstack/vue-virtual (large list rendering)
- **Code editor:** @guolao/vue-monaco-editor (Monaco editor integration)
- **SSH tunnel:** ssh2 (SSH tunnel support for Redis connections)
## Commands ## Commands
@@ -64,8 +67,8 @@ Renderer (src/renderer/)
├── App.vue # Shell layout (TitleBar + Sidebar + MainArea + StatusBar) ├── App.vue # Shell layout (TitleBar + Sidebar + MainArea + StatusBar)
├── env.d.ts # Vite client + *.vue / *.css module declarations ├── env.d.ts # Vite client + *.vue / *.css module declarations
├── stores/ ├── stores/
│ ├── app.ts # theme, fontSize, scanCount │ ├── app.ts # theme, fontSize, zoom, fontFamily
│ ├── connection.ts # connections CRUD, connect/disconnect, health check │ ├── connection.ts # connections CRUD, connect/disconnect, health check, import/export
│ └── key.ts # key list, scan, tree view, selected key data │ └── key.ts # key list, scan, tree view, selected key data
├── components/ ├── components/
│ ├── layout/ # App shell │ ├── layout/ # App shell
@@ -90,13 +93,15 @@ Renderer (src/renderer/)
│ │ ├── ZsetEditor.vue # sorted set with scores │ │ ├── ZsetEditor.vue # sorted set with scores
│ │ ├── StreamEditor.vue # stream entries │ │ ├── StreamEditor.vue # stream entries
│ │ └── ReJsonEditor.vue # JSON.GET / JSON.SET editing │ │ └── ReJsonEditor.vue # JSON.GET / JSON.SET editing
│ ├── common/ # Shared components
│ │ └── VirtualScrollList.vue # virtual scrolling for large lists
│ └── views/ # Tab content views │ └── views/ # Tab content views
│ ├── StatusView.vue # INFO dashboard with stat cards │ ├── StatusView.vue # INFO dashboard with stat cards
│ ├── CliView.vue # interactive terminal │ ├── CliView.vue # interactive terminal
│ ├── SlowLogView.vue # slow log table │ ├── SlowLogView.vue # slow log table
│ ├── MemoryAnalysis.vue # MEMORY USAGE scan & sort │ ├── MemoryAnalysis.vue # MEMORY USAGE scan & sort
│ ├── CommandLog.vue # command execution history │ ├── CommandLog.vue # command execution history
│ └── SettingsView.vue # theme, language, font │ └── SettingsView.vue # theme, language, font, zoom
├── i18n/ ├── i18n/
│ ├── index.ts # useI18n composable │ ├── index.ts # useI18n composable
│ └── locales/ │ └── locales/
@@ -106,7 +111,8 @@ Renderer (src/renderer/)
│ ├── ko.ts # 한국어 │ ├── ko.ts # 한국어
│ └── de.ts # Deutsch │ └── de.ts # Deutsch
├── composables/ ├── composables/
── useKeyboard.ts # keyboard shortcut handler ── useKeyboard.ts # keyboard shortcut handler
│ └── useTypeColor.ts # Redis type color mapping
├── styles/ ├── styles/
│ ├── variables.css # CSS custom properties │ ├── variables.css # CSS custom properties
│ └── global.css # global overrides │ └── global.css # global overrides
@@ -250,6 +256,27 @@ If output directory or file extensions change, update these paths accordingly.
- `safeStorage` - OS-level encryption for credentials - `safeStorage` - OS-level encryption for credentials
- All Redis operations go through typed IPC to main process - All Redis operations go through typed IPC to main process
## Connection Features
### SSH Tunnel
- TCP tunnel via ssh2 library
- Password or private key authentication
- Passphrase support for encrypted keys
### Sentinel Mode
- Redis Sentinel support for high availability
- Configure sentinel host, port, and master name
- Automatic failover support
### Cluster Mode
- Redis Cluster support
- Automatic slot routing
- Multi-node connection handling
### TLS/SSL
- CA certificate, client certificate, and private key support
- Optional server certificate verification
## Legacy ## Legacy
The `legacy/` directory contains the old Vue 2 + Webpack 4 codebase. It is gitignored and not part of the v2 build. See `legacy/AGENTS.md` for its documentation. The `legacy/` directory contains the old Vue 2 + Webpack 4 codebase. It is gitignored and not part of the v2 build. See `legacy/AGENTS.md` for its documentation.
+46 -13
View File
@@ -2,16 +2,18 @@
基于 Electron + Vue 3 + Vite 的现代 Redis 桌面管理器。 基于 Electron + Vue 3 + Vite 的现代 Redis 桌面管理器。
> Fork 自 [AnotherRedisDesktopManager](https://github.com/qishibo/AnotherRedisDesktopManager)。
> 旧版 Vue 2 代码库已归档至 [`legacy/`](legacy/)。
## 功能特性 ## 功能特性
### 连接管理 ### 连接管理
- 创建、编辑、删除连接(主机/端口/密码) - 创建、编辑、删除连接(主机/端口/密码)
- TLS/SSL 支持 - **SSH 隧道** - 通过 SSH 安全连接 Redis
- **Sentinel 模式** - 支持 Redis Sentinel 高可用
- **Cluster 模式** - 支持 Redis Cluster 集群
- **TLS/SSL** - 支持 CA 证书、客户端证书和私钥
- **测试连接** - 保存前验证连接是否成功 - **测试连接** - 保存前验证连接是否成功
- **导入/导出** - JSON 格式连接配置 - **导入/导出** - JSON 格式连接配置
- **连接颜色** - 为连接设置自定义颜色
- **连接复制** - 一键复制连接配置
- 健康检查 + 自动重连指示器 - 健康检查 + 自动重连指示器
### Key 浏览器 ### Key 浏览器
@@ -21,6 +23,8 @@
- 树形视图(按 key 分隔符分组) - 树形视图(按 key 分隔符分组)
- 多选批量操作 - 多选批量操作
- 批量删除(pipeline - 批量删除(pipeline
- **Key 导入/导出** - 批量导出/导入 key
- **内存分析** - 扫描并排序 key 内存占用
### 类型编辑器 ### 类型编辑器
- **String** - 查看/编辑,自动 JSON 格式化 - **String** - 查看/编辑,自动 JSON 格式化
@@ -28,25 +32,30 @@
- **List** - 分页查看,支持推入/编辑/移除 - **List** - 分页查看,支持推入/编辑/移除
- **Set** - 成员列表,支持过滤/添加/移除 - **Set** - 成员列表,支持过滤/添加/移除
- **Zset** - 有序集合,显示分数 - **Zset** - 有序集合,显示分数
- **Stream** - 流数据查看,字段管理 - **Stream** - 流数据查看,字段管理,消费者组支持
- **ReJSON** - RedisJSON 模块支持(JSON.GET / JSON.SET
### Key 操作 ### Key 操作
- **TTL** - 查看和编辑过期时间 - **TTL** - 查看和编辑过期时间
- **重命名** - 支持存在性检查 - **重命名** - 支持存在性检查
- **复制键名** - 一键复制到剪贴板 - **复制键名** - 一键复制到剪贴板
- 单个/批量删除 - 单个/批量删除
- **内存占用** - 查看单个 key 内存占用
### 分析工具 ### 分析工具
- **Redis CLI** - 交互式终端,支持命令历史 - **Redis CLI** - 交互式终端,支持命令历史、事务、Pub/Sub、Monitor
- **慢日志** - 查看慢命令及耗时 - **慢日志** - 查看慢命令及耗时
- **INFO 仪表板** - 服务器统计信息 - **INFO 仪表板** - 服务器统计信息
- **命令日志** - 记录所有执行的命令
- **数据库选择器** - 切换 DB 0-15 - **数据库选择器** - 切换 DB 0-15
### 设置 ### 设置
- **主题** - 深色、浅色、跟随系统 - **主题** - 深色、浅色、跟随系统
- **语言** - English / 中文 - **语言** - English / 中文 / 日本語 / 한국어 / Deutsch
- **SCAN 数量** - 每次扫描的 key 数量 - **SCAN 数量** - 每次扫描的 key 数量
- **字体大小** - 可调节 - **字体大小** - 可调节
- **页面缩放** - 50% - 200%
- **字体族** - 可选择等宽字体
### 快捷键 ### 快捷键
| 快捷键 | 功能 | | 快捷键 | 功能 |
@@ -73,6 +82,25 @@ npm run build:mac
npm run build:win npm run build:win
``` ```
## 环境要求
- Node.js 18+
- npm 或 yarn
- 对于 Linux 构建:可能需要额外的依赖(如 `libsecret-1-dev`
## 项目结构
```
JRedisDesktop/
├── src/
│ ├── main/ # Electron 主进程
│ ├── preload/ # 预加载脚本
│ └── renderer/ # Vue 3 渲染进程
├── build/ # 构建资源(图标等)
├── out/ # 构建输出
└── release/ # 打包输出
```
## 技术栈 ## 技术栈
- **主进程:** Electron 33 - **主进程:** Electron 33
@@ -81,6 +109,9 @@ npm run build:win
- **构建工具:** electron-vite + Vite 6 + TypeScript 5 - **构建工具:** electron-vite + Vite 6 + TypeScript 5
- **Redis 客户端:** ioredis 5 - **Redis 客户端:** ioredis 5
- **持久化:** electron-store + safeStorage(加密凭据) - **持久化:** electron-store + safeStorage(加密凭据)
- **虚拟滚动:** @tanstack/vue-virtual(大数据量渲染)
- **代码编辑器:** Monaco Editor(通过 vue-monaco-editor
- **SSH 隧道:** ssh2
## 架构 ## 架构
@@ -97,10 +128,12 @@ Electron 主进程 (src/main/)
渲染进程 (src/renderer/src/) 渲染进程 (src/renderer/src/)
├── stores/ # Pinia 状态管理(connection, key, app ├── stores/ # Pinia 状态管理(connection, key, app
├── components/ # Vue 3 组件 ├── components/ # Vue 3 组件
├── i18n/ # 国际化(英文 + 中文) ├── layout/ # 应用布局
└── composables/ # 组合式函数(useKeyboard │ ├── connection/ # 连接管理
│ ├── key/ # Key 浏览
│ ├── editors/ # 类型编辑器
│ ├── common/ # 通用组件(虚拟滚动)
│ └── views/ # 视图(CLI、慢日志、内存分析等)
├── i18n/ # 国际化(英文、中文、日语、韩语、德语)
└── composables/ # 组合式函数(useKeyboard, useTypeColor
``` ```
## License
MIT