@fefeding/aicmd 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +40 -7
  2. package/README.zh.md +40 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,6 +9,7 @@ An AI-powered web SSH terminal that combines a full-featured terminal emulator w
9
9
  ### AI Agent
10
10
  - **Autonomous Operation**: AI agent directly executes commands in the terminal via tool calling (OpenAI function calling protocol). It observes output, makes decisions, and iterates until the task is done.
11
11
  - **System Awareness**: Automatically detects OS, CPU, memory, disk, installed services, and available languages on first connection. The AI always knows what system it's working with.
12
+ - **Language Adaptation**: AI automatically responds in the same language as the user's message. Falls back to the UI locale when the message language is ambiguous.
12
13
  - **Script Generation**: For complex multi-step tasks, the agent generates and executes scripts (Bash/Python/PowerShell) instead of running commands one by one.
13
14
  - **Cross-Platform Intelligence**: Adapts commands based on target OS — uses `systemctl` on Linux, `launchctl` on macOS, `Get-Service` on Windows.
14
15
 
@@ -42,6 +43,13 @@ An AI-powered web SSH terminal that combines a full-featured terminal emulator w
42
43
  - **Expandable Details**: Click any result to see full command output, with copy-to-clipboard support.
43
44
  - **Task History**: Recent batch tasks are stored for review.
44
45
 
46
+ ### Jump Host & SSH Agent Forwarding
47
+ - **Startup Script**: Configure a per-connection script that runs automatically after SSH login — ideal for jump host scenarios (e.g., `ssh target-server` to hop to the final destination).
48
+ - **SSH Agent Forwarding**: Forward your local SSH agent to the remote server, enabling key-based authentication for subsequent SSH hops without storing keys on intermediate servers.
49
+ - **Auto-Detection**: Automatically detects the local SSH agent socket (`SSH_AUTH_SOCK` on Linux/macOS, OpenSSH agent pipe on Windows).
50
+ - **Smart System Info**: For jump host sessions, system information is actively collected from the target server (not the jump host) when the AI needs it.
51
+ - See [Jump Host Guide](./docs/jump-host.md) for detailed setup instructions.
52
+
45
53
  ### Terminal
46
54
  - **SSH Remote Terminal**: Full SSH client based on xterm.js + ssh2 with 256-color support.
47
55
  - **Local Shell**: Native local shell via node-pty (Bash/Zsh on macOS/Linux, PowerShell on Windows).
@@ -49,12 +57,14 @@ An AI-powered web SSH terminal that combines a full-featured terminal emulator w
49
57
  - **Multi-Session**: Tab-based multi-session management with persistent state across restarts.
50
58
  - **Auto-Reconnect**: One-click reconnection for dropped SSH sessions.
51
59
  - **Session Persistence**: All sessions and chat history are persisted on the server side.
60
+ - **Adaptive Layout**: Terminal automatically resizes when the AI chat panel is toggled, maintaining proper column count.
52
61
 
53
62
  ### General
54
- - **Connection Management**: Visual SSH connection configuration (CRUD) with key-based and password auth.
63
+ - **Connection Management**: Visual SSH connection configuration (CRUD) with key-based, password, and auto auth. Supports startup scripts and agent forwarding for jump host workflows.
55
64
  - **i18n**: Chinese / English UI with runtime language switching.
56
- - **Desktop App**: Cross-platform desktop client via Electron.
65
+ - **Desktop App**: Cross-platform desktop client via Electron (Windows, macOS, Linux).
57
66
  - **Chat History**: Persistent AI conversation history with browsing and restoration across sessions.
67
+ - **CI/CD**: Automated multi-platform builds via GitHub Actions — push a version tag to generate installers for all platforms.
58
68
 
59
69
  ## Screenshot
60
70
 
@@ -131,14 +141,28 @@ node server.js --port 3000
131
141
 
132
142
  ### Desktop App (Electron)
133
143
 
144
+ Pre-built installers are available from [GitHub Releases](https://github.com/fefeding/ai-cmd/releases), or build from source:
145
+
134
146
  ```bash
135
147
  pnpm electron:dev # Dev mode
136
148
  pnpm electron:build # Current platform
137
- pnpm electron:build:win # Windows
138
- pnpm electron:build:mac # macOS
139
- pnpm electron:build:linux # Linux
149
+ pnpm electron:build:win # Windows (NSIS installer)
150
+ pnpm electron:build:mac # macOS (DMG, x64 + arm64)
151
+ pnpm electron:build:linux # Linux (AppImage)
152
+ ```
153
+
154
+ ### Automated Builds (CI/CD)
155
+
156
+ Push a version tag to trigger multi-platform builds:
157
+
158
+ ```bash
159
+ git tag v0.1.6
160
+ git push origin v0.1.6
161
+ # GitHub Actions builds for Windows, macOS, Linux and creates a Release
140
162
  ```
141
163
 
164
+ Or trigger manually from the **Actions** tab with platform selection.
165
+
142
166
  ## AI Usage Examples
143
167
 
144
168
  ### Natural Language Operations
@@ -198,13 +222,22 @@ Steps to deploy:
198
222
 
199
223
  Then trigger with `/deploy-my-app` in the chat.
200
224
 
225
+ ## Documentation
226
+
227
+ - [Architecture Design](./docs/ARCHITECTURE.md) — Core architecture, Agent loop, skills system, MCP integration
228
+ - [Jump Host Guide](./docs/jump-host.md) — SSH jump host and agent forwarding configuration
229
+ - [Deployment Guide](./docs/deployment.md) — Docker, npm, Electron, and CI/CD deployment
230
+ - [Custom Skills Guide](./docs/skills-guide.md) — How to create and author custom AI skills
231
+
201
232
  ## Project Structure
202
233
 
203
234
  ```
204
235
  .
236
+ ├── .github/workflows/ # GitHub Actions CI/CD
205
237
  ├── bin/ # CLI entry (aicmd command)
206
238
  ├── data/skills/ # Built-in AI skills
207
239
  ├── dist/ # Build output
240
+ ├── docs/ # Documentation
208
241
  ├── electron/ # Electron main process & preload
209
242
  ├── public/ # Static assets
210
243
  ├── scripts/ # Build scripts (Electron)
@@ -214,11 +247,11 @@ Then trigger with `/deploy-my-app` in the chat.
214
247
  │ └── index.ts # Server entry
215
248
  ├── src/ # Frontend source (Vue 3)
216
249
  │ ├── components/ # Vue components
217
- │ │ ├── ai-chat/ # AI chat panel (Chat / Audit / Monitor tabs)
250
+ │ │ ├── ai-chat/ # AI chat panel (Chat / Audit tabs)
218
251
  │ │ ├── ai-settings/ # AI config modal
219
252
  │ │ ├── audit-panel/ # Command audit timeline
220
- │ │ ├── log-monitor/ # Real-time log monitoring
221
253
  │ │ ├── batch-panel/ # Multi-server batch operations
254
+ │ │ ├── connection-editor/ # Connection config (jump host, agent forwarding)
222
255
  │ │ └── ... # Terminal, sidebar, etc.
223
256
  │ ├── locales/ # i18n translations
224
257
  │ ├── service/ # Frontend API services
package/README.zh.md CHANGED
@@ -9,6 +9,7 @@
9
9
  ### AI Agent
10
10
  - **自主操作**:AI Agent 通过工具调用(OpenAI function calling 协议)直接在终端中执行命令。它观察输出、做出决策并迭代直到任务完成。
11
11
  - **系统感知**:首次连接时自动检测操作系统、CPU、内存、磁盘、已安装服务和可用语言。AI 始终了解它在什么系统上工作。
12
+ - **语言自适应**:AI 自动匹配用户消息的语言进行回复。当消息语言不明确时,回退到前端 UI 设置的语言。
12
13
  - **脚本生成**:对于复杂的多步任务,Agent 会生成并执行脚本(Bash/Python/PowerShell),而不是逐条运行命令。
13
14
  - **跨平台智能**:根据目标操作系统自适应命令 — Linux 用 `systemctl`,macOS 用 `launchctl`,Windows 用 `Get-Service`。
14
15
 
@@ -42,6 +43,13 @@
42
43
  - **可展开详情**:点击任意结果查看完整命令输出,支持一键复制。
43
44
  - **任务历史**:最近的批量任务会被保存以供回顾。
44
45
 
46
+ ### 跳板机与 SSH Agent 转发
47
+ - **启动脚本**:为每个连接配置登录后自动执行的脚本 — 适用于跳板机场景(如 `ssh target-server` 跳转到目标机器)。
48
+ - **SSH Agent 转发**:将本机 SSH Agent 转发到远程服务器,使后续 SSH 跳转可使用本机密钥认证,无需在中间服务器存放密钥。
49
+ - **自动检测**:自动检测本机 SSH Agent 套接字(Linux/macOS 的 `SSH_AUTH_SOCK`,Windows 的 OpenSSH Agent 管道)。
50
+ - **智能系统信息**:跳板机会话中,AI 需要系统信息时主动从目标服务器采集(而非跳板机)。
51
+ - 详见 [跳板机配置指南](./docs/jump-host.md)。
52
+
45
53
  ### 终端
46
54
  - **SSH 远程终端**:基于 xterm.js + ssh2 的完整 SSH 客户端,支持 256 色。
47
55
  - **本地 Shell**:通过 node-pty 提供原生本地 Shell(macOS/Linux 上为 Bash/Zsh,Windows 上为 PowerShell)。
@@ -49,12 +57,14 @@
49
57
  - **多会话**:基于标签页的多会话管理,重启后状态持久化。
50
58
  - **自动重连**:一键重连断开的 SSH 会话。
51
59
  - **会话持久化**:所有会话和聊天历史均在服务端持久化。
60
+ - **自适应布局**:开关 AI 聊天面板时终端自动调整尺寸,保持正确的列数。
52
61
 
53
62
  ### 通用
54
- - **连接管理**:可视化 SSH 连接配置(增删改查),支持密钥和密码认证。
63
+ - **连接管理**:可视化 SSH 连接配置(增删改查),支持密钥、密码和自动认证。支持启动脚本和 Agent 转发用于跳板机工作流。
55
64
  - **国际化**:中文 / 英文 UI,运行时语言切换。
56
- - **桌面应用**:通过 Electron 提供跨平台桌面客户端。
65
+ - **桌面应用**:通过 Electron 提供跨平台桌面客户端(Windows、macOS、Linux)。
57
66
  - **聊天历史**:持久化 AI 对话历史,支持跨会话浏览和恢复。
67
+ - **CI/CD**:通过 GitHub Actions 自动化多平台构建 — 推送版本标签即可生成全平台安装包。
58
68
 
59
69
  ## 截图
60
70
 
@@ -131,14 +141,28 @@ node server.js --port 3000
131
141
 
132
142
  ### 桌面应用(Electron)
133
143
 
144
+ 预构建安装包可从 [GitHub Releases](https://github.com/fefeding/ai-cmd/releases) 下载,或从源码构建:
145
+
134
146
  ```bash
135
147
  pnpm electron:dev # 开发模式
136
148
  pnpm electron:build # 当前平台
137
- pnpm electron:build:win # Windows
138
- pnpm electron:build:mac # macOS
139
- pnpm electron:build:linux # Linux
149
+ pnpm electron:build:win # Windows(NSIS 安装包)
150
+ pnpm electron:build:mac # macOS(DMG,x64 + arm64)
151
+ pnpm electron:build:linux # Linux(AppImage)
152
+ ```
153
+
154
+ ### 自动化构建(CI/CD)
155
+
156
+ 推送版本标签触发多平台自动构建:
157
+
158
+ ```bash
159
+ git tag v0.1.6
160
+ git push origin v0.1.6
161
+ # GitHub Actions 自动构建 Windows、macOS、Linux 并创建 Release
140
162
  ```
141
163
 
164
+ 也可在 **Actions** 页面手动触发并选择平台。
165
+
142
166
  ## AI 使用示例
143
167
 
144
168
  ### 自然语言操作
@@ -198,13 +222,22 @@ tags: [deploy, ops]
198
222
 
199
223
  然后在聊天中使用 `/deploy-my-app` 触发。
200
224
 
225
+ ## 文档
226
+
227
+ - [架构设计](./docs/ARCHITECTURE.md) — 核心架构、Agent 循环、技能系统、MCP 集成
228
+ - [跳板机指南](./docs/jump-host.md) — SSH 跳板机和 Agent 转发配置
229
+ - [部署指南](./docs/deployment.md) — Docker、npm、Electron、CI/CD 部署方式
230
+ - [自定义技能指南](./docs/skills-guide.md) — 如何创建和编写自定义 AI 技能
231
+
201
232
  ## 项目结构
202
233
 
203
234
  ```
204
235
  .
236
+ ├── .github/workflows/ # GitHub Actions CI/CD
205
237
  ├── bin/ # CLI 入口(aicmd 命令)
206
238
  ├── data/skills/ # 内置 AI 技能
207
239
  ├── dist/ # 构建输出
240
+ ├── docs/ # 文档
208
241
  ├── electron/ # Electron 主进程 & 预加载脚本
209
242
  ├── public/ # 静态资源
210
243
  ├── scripts/ # 构建脚本(Electron)
@@ -214,11 +247,11 @@ tags: [deploy, ops]
214
247
  │ └── index.ts # 服务端入口
215
248
  ├── src/ # 前端源码(Vue 3)
216
249
  │ ├── components/ # Vue 组件
217
- │ │ ├── ai-chat/ # AI 聊天面板(Chat / Audit / Monitor 标签)
250
+ │ │ ├── ai-chat/ # AI 聊天面板(Chat / Audit 标签)
218
251
  │ │ ├── ai-settings/ # AI 配置弹窗
219
252
  │ │ ├── audit-panel/ # 命令审计时间线
220
- │ │ ├── log-monitor/ # 实时日志监控
221
253
  │ │ ├── batch-panel/ # 多服务器批量操作
254
+ │ │ ├── connection-editor/ # 连接配置(跳板机、Agent 转发)
222
255
  │ │ └── ... # 终端、侧边栏等
223
256
  │ ├── locales/ # i18n 翻译
224
257
  │ ├── service/ # 前端 API 服务
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fefeding/aicmd",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "description": "AI-powered web SSH terminal with autonomous agent, skills, and file transfer",