rush-ai 0.10.0-rc.2 → 0.10.0
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.
- package/README.md +146 -420
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# rush-ai
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
_Install once. Run anywhere. Hand off your context, not your prompt._
|
|
5
|
+
**把本地 IDE 的上下文交给 Rush 的 AI 平台继续执行 —— 不是复述 prompt,是接力。**
|
|
8
6
|
|
|
9
7
|
[](https://www.npmjs.com/package/rush-ai)
|
|
10
8
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -13,506 +11,234 @@ _Install once. Run anywhere. Hand off your context, not your prompt._
|
|
|
13
11
|
|
|
14
12
|
---
|
|
15
13
|
|
|
16
|
-
##
|
|
17
|
-
|
|
18
|
-
### One command, three agents — `rush-ai plugin install`
|
|
14
|
+
## 它解决什么
|
|
19
15
|
|
|
20
|
-
|
|
21
|
-
`/plugin install`. It writes plugin files (commands / skills / rules / hooks /
|
|
22
|
-
MCP servers) straight to each agent's on-disk layout:
|
|
16
|
+
你在 Cursor / Claude Code 里和本地 agent 聊得正深入 —— 它知道代码库、约束、已经试过什么。当某一步要交给 Rush 平台的云端 agent(建个真实可访问的站、调一个专家 agent、让模型在干净环境里写一套代码),你不想把整个对话再重新组织一遍。
|
|
23
17
|
|
|
24
|
-
-
|
|
25
|
-
registered in `installed_plugins.json` + `settings.json.enabledPlugins`.
|
|
26
|
-
Claude Code's own `/plugin list` sees it, `/plugin uninstall` can remove it.
|
|
27
|
-
- **Codex** — native plugin at `~/.codex/plugins/cache/<mkt>/<name>/<ver>/` with
|
|
28
|
-
`.codex-plugin/plugin.json` + external `.mcp.json`, registered in
|
|
29
|
-
`~/.codex/config.toml`.
|
|
30
|
-
- **Cursor** — attached via the conventional layout (`~/.cursor/skills/` +
|
|
31
|
-
bridge `.mdc` rules in `~/.cursor/rules/` + `~/.cursor/mcp.json`).
|
|
18
|
+
`rush-ai` 就是这个"接力"动作。本地 agent 调一条 `rush-ai task create` 把手里有的上下文直接递过去,Rush 接手执行,你切到浏览器看 preview,继续在那边迭代。
|
|
32
19
|
|
|
33
|
-
|
|
34
|
-
|
|
20
|
+
```bash
|
|
21
|
+
# 本地 agent(Cursor / Claude Code / ...)内部跑:
|
|
22
|
+
npx rush-ai task create -a web-builder -p "做一个公司官网,大气风格,深色强调色"
|
|
23
|
+
# → 拿到 task id,几十秒后 Rush 给回 preview URL
|
|
24
|
+
```
|
|
35
25
|
|
|
36
|
-
|
|
26
|
+
## 三条主路径
|
|
37
27
|
|
|
38
|
-
|
|
28
|
+
### 1. 从 prompt 直接建站(`web-builder`)
|
|
39
29
|
|
|
40
|
-
|
|
30
|
+
一句话生成一个完整可访问的站,自带 preview URL。继续迭代用 `task send`,满意了用 `task deploy` 上生产。
|
|
41
31
|
|
|
42
32
|
```bash
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
```
|
|
33
|
+
rush-ai task create -a web-builder -p "做个极简番茄钟 SPA,深色 + emerald 强调色"
|
|
34
|
+
# → Task xz5xgpn45fg1 running
|
|
46
35
|
|
|
47
|
-
|
|
36
|
+
rush-ai task status xz5xgpn45fg1
|
|
37
|
+
# Preview: https://xz5xgpn45fg1-preview.rush.zhenguanyu.com/
|
|
48
38
|
|
|
49
|
-
|
|
39
|
+
rush-ai task send xz5xgpn45fg1 -p "再加一个已完成次数的历史记录"
|
|
50
40
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
# Pick one and put it to work — e.g. the HR analytics specialist
|
|
56
|
-
npx rush-ai task create -a 人力资源分析专家 -p "分析 Q1 部门人效趋势"
|
|
41
|
+
rush-ai task domain check my-pomodoro --task xz5xgpn45fg1
|
|
42
|
+
rush-ai task deploy xz5xgpn45fg1 --domain my-pomodoro --yes
|
|
43
|
+
# → https://my-pomodoro.rush.zhenguanyu.com
|
|
57
44
|
```
|
|
58
45
|
|
|
59
|
-
###
|
|
46
|
+
### 2. 调用 Rush 的专家 agent 做子任务
|
|
60
47
|
|
|
61
|
-
|
|
48
|
+
Rush 平台有一批领域专家 agent(人力分析、营销策划、数据分析…)。你的 workflow 里某一步需要它们时,不重新写 prompt,直接调。
|
|
62
49
|
|
|
63
50
|
```bash
|
|
64
|
-
|
|
65
|
-
#
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
# Preview: https://lodig8oknq0r-preview.rush.zhenguanyu.com/
|
|
69
|
-
# Git: https://gitlab-ee.zhenguanyu.com/rush/online/lodig8oknq0r
|
|
51
|
+
rush-ai agent list # 看看都有谁
|
|
52
|
+
rush-ai agent info 人力资源分析专家 # 看这个 agent 的技能和能力
|
|
53
|
+
rush-ai task create -a 人力资源分析专家 -p "分析 Q1 部门人效趋势"
|
|
54
|
+
rush-ai task result <id> --json # 拿结构化输出
|
|
70
55
|
```
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
# 1. Install the CLI
|
|
76
|
-
npm install -g rush-ai
|
|
57
|
+
### 3. 本地改完代码同步到 Rush
|
|
77
58
|
|
|
78
|
-
|
|
79
|
-
rush-ai marketplace add github:kanyun-inc/rush-marketplace
|
|
80
|
-
rush-ai plugin install rush
|
|
59
|
+
在本地 IDE 里改了几行代码(或本地 agent 改的),想让 Rush 的 preview 立刻反映出来 —— 一条命令:
|
|
81
60
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
rush-
|
|
85
|
-
|
|
86
|
-
rush-ai task
|
|
61
|
+
```bash
|
|
62
|
+
# 前提:当前目录是 Rush 项目的 checkout
|
|
63
|
+
cd my-rush-project
|
|
64
|
+
# ... 本地改代码 + commit ...
|
|
65
|
+
rush-ai task push
|
|
87
66
|
```
|
|
88
67
|
|
|
89
|
-
`
|
|
90
|
-
|
|
91
|
-
## Features
|
|
92
|
-
|
|
93
|
-
- **Plugin installer** — `rush-ai plugin install <name>` writes plugin files to
|
|
94
|
-
Claude Code, Codex, and Cursor in one shot; auto-detects which IDEs you have
|
|
95
|
-
- **Marketplace management** — Register `directory:` or `github:` marketplaces,
|
|
96
|
-
cache under `~/.rush/marketplaces/`, resolve plugin references
|
|
97
|
-
- **Task lifecycle** — Create, watch (SSE streaming), send follow-ups, cancel, and download artifacts
|
|
98
|
-
- **Agent shelf** — Browse agents, inspect skills and MCP servers, plug any agent into your own workflow as a sub-agent
|
|
99
|
-
- **MCP integration** — Discover MCP servers, list tools, run as an MCP stdio server
|
|
100
|
-
- **Multi-profile** — Switch between environments (test, production, custom)
|
|
101
|
-
- **Shell completion** — Bash, Zsh, and Fish auto-completion
|
|
102
|
-
- **CI-friendly** — `--json` output, `--ci` mode, non-zero exit codes on failure
|
|
68
|
+
`task push` 会自动把改动推到 Rush,preview URL 几秒后就会显示新版本。
|
|
103
69
|
|
|
104
|
-
##
|
|
70
|
+
## Quick Start
|
|
105
71
|
|
|
106
|
-
|
|
72
|
+
要求:Node.js >= 18。如果不想全局装,任何 `rush-ai` 命令都可以用 `npx rush-ai` 替代。
|
|
107
73
|
|
|
108
74
|
```bash
|
|
109
|
-
#
|
|
110
|
-
npx rush-ai <command>
|
|
111
|
-
|
|
112
|
-
# Optional — pin a global binary
|
|
75
|
+
# 1. 装 CLI
|
|
113
76
|
npm install -g rush-ai
|
|
114
|
-
```
|
|
115
77
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
### Plugin distribution
|
|
119
|
-
|
|
120
|
-
The `marketplace` and `plugin` command groups are the CLI equivalent of each
|
|
121
|
-
IDE's built-in `/plugin` command — they write the exact same on-disk layout,
|
|
122
|
-
so the IDE's own `/plugin list` / `/plugin uninstall` still work.
|
|
123
|
-
|
|
124
|
-
| Command | Alias | Description |
|
|
125
|
-
|---------|-------|-------------|
|
|
126
|
-
| `marketplace add <source>` | - | Register a marketplace (`github:owner/repo`, `directory:/abs/path`); `--as <name>` to override auto-derived name |
|
|
127
|
-
| `marketplace remove <name>` | - | Remove a marketplace from the local cache |
|
|
128
|
-
| `marketplace list` | `marketplace ls` | List cached marketplaces and their plugins |
|
|
129
|
-
| `marketplace update [<name>]` | - | Pull latest for `github:` sources (`directory:` is a no-op) |
|
|
130
|
-
| `plugin install <ref>` | - | Install to Claude Code + Codex + Cursor (filter with `--target`); `--force`, `--dry-run` |
|
|
131
|
-
| `plugin uninstall <ref>` | `plugin remove` | Symmetric cleanup across the same targets |
|
|
132
|
-
| `plugin list` | `plugin ls` | List installed plugins; `--available` lists plugins in cached marketplaces |
|
|
133
|
-
| `plugin update [<name>]` | - | Bump installed plugins to the latest marketplace version |
|
|
134
|
-
|
|
135
|
-
`<ref>` form: `<name>` or `<name>@<marketplace>` (e.g. `rush@rush-marketplace`).
|
|
136
|
-
|
|
137
|
-
### Everything else
|
|
138
|
-
|
|
139
|
-
| Command | Alias | Description |
|
|
140
|
-
|---------|-------|-------------|
|
|
141
|
-
| `auth login` | - | Log in via browser (PKCE) or API key |
|
|
142
|
-
| `auth status` | - | Show current authentication status |
|
|
143
|
-
| `auth logout` | - | Log out and clear credentials |
|
|
144
|
-
| `agent list` | `agent ls` | List available agents |
|
|
145
|
-
| `agent info <name>` | - | Show agent details, skills, and MCP servers |
|
|
146
|
-
| `task create` | - | Create a task for an agent |
|
|
147
|
-
| `task send <id>` | - | Send a follow-up message to a task |
|
|
148
|
-
| `task status <id>` | - | Check task status |
|
|
149
|
-
| `task result <id>` | - | Get task result and file summary |
|
|
150
|
-
| `task files <id>` | - | List and download task artifacts |
|
|
151
|
-
| `task messages <id>` | - | View conversation messages for a task |
|
|
152
|
-
| `task list` | `task ls` | List tasks |
|
|
153
|
-
| `task watch <id>` | - | Stream task execution in real-time (SSE) |
|
|
154
|
-
| `task cancel <id>` | - | Cancel a running task |
|
|
155
|
-
| `task push` | - | Sync a local Rush project's commits to its pod (git push + pod sync/pull). Does NOT create projects. |
|
|
156
|
-
| `task deploy <id>` | - | Deploy a built web-builder task (default `--env production`; `--env test` allowed for non-Next.js templates); `--version`, `--domain`, `--yes` |
|
|
157
|
-
| `task versions <id>` | - | List buildable versions for a web-builder task (shows ✓ for versions already deployed to test / production) |
|
|
158
|
-
| `task domain check <prefix>` | - | Validate a custom domain prefix and check availability (`--task <id>` required) |
|
|
159
|
-
| `mcp serve` | - | Start MCP stdio server |
|
|
160
|
-
| `mcp list` | `mcp ls` | List available MCP servers |
|
|
161
|
-
| `mcp list-tools <id>` | - | List tools provided by an MCP server |
|
|
162
|
-
| `config show` | - | Show current configuration |
|
|
163
|
-
| `config set <key> <value>` | - | Set a config value (`api`, `collectMetrics`, `currentTeam`) |
|
|
164
|
-
| `config use <profile>` | - | Switch active profile |
|
|
165
|
-
| `config create <profile>` | - | Create a new profile |
|
|
166
|
-
| `config delete <profile>` | - | Delete a profile |
|
|
167
|
-
| `config list` | `config ls` | List all profiles |
|
|
168
|
-
| `completion install` | - | Auto-install shell completion |
|
|
169
|
-
| `completion bash\|zsh\|fish` | - | Print completion script |
|
|
170
|
-
| `doctor` | - | Run environment, auth, and connectivity diagnostics |
|
|
171
|
-
|
|
172
|
-
### Global Options
|
|
173
|
-
|
|
174
|
-
| Option | Description |
|
|
175
|
-
|--------|-------------|
|
|
176
|
-
| `--json` | Output as JSON (machine-readable) |
|
|
177
|
-
| `--ci` | CI mode: JSON output, no interactive prompts, strict exit codes |
|
|
178
|
-
| `--verbose` | Show detailed output including HTTP requests |
|
|
179
|
-
| `--debug` | Debug-level output (implies `--verbose`) |
|
|
180
|
-
| `--no-color` | Disable color output |
|
|
181
|
-
| `-f, --format <type>` | Output format: `table`, `json`, `csv` |
|
|
182
|
-
|
|
183
|
-
## Usage
|
|
184
|
-
|
|
185
|
-
### Authentication
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
# Browser login (PKCE flow — opens browser)
|
|
78
|
+
# 2. 登录(浏览器完成)
|
|
189
79
|
rush-ai auth login
|
|
190
80
|
|
|
191
|
-
#
|
|
192
|
-
rush-ai
|
|
81
|
+
# 3. 看 agent 列表
|
|
82
|
+
rush-ai agent list
|
|
193
83
|
|
|
194
|
-
#
|
|
195
|
-
rush-ai
|
|
84
|
+
# 4. 开一个任务
|
|
85
|
+
rush-ai task create -a web-builder -p "做一个极简 todo list"
|
|
86
|
+
rush-ai task status <id> --json
|
|
196
87
|
```
|
|
197
88
|
|
|
198
|
-
|
|
89
|
+
`rush` 是默认的通用 agent,任何 `agent list` 里的 agent 名字都能作为 `-a` 的值。
|
|
199
90
|
|
|
200
|
-
|
|
201
|
-
# Create a task
|
|
202
|
-
rush-ai task create -a rush -p "Add a contact form to the homepage"
|
|
91
|
+
## 主要能力
|
|
203
92
|
|
|
204
|
-
|
|
205
|
-
|
|
93
|
+
- **任务生命周期**:`task create` / `send` / `status` / `watch`(实时流)/ `result` / `files` / `cancel`
|
|
94
|
+
- **本地同步**:`task push` —— 改完本地代码,Rush preview 立刻更新
|
|
95
|
+
- **生产发布**:`task deploy <id>` —— web-builder 产物发 prod,支持自定义域名
|
|
96
|
+
- **agent shelf**:`agent list` / `agent info` —— 浏览和使用 Rush 平台的专家 agent
|
|
97
|
+
- **MCP 集成**:作为 MCP stdio server 跑,或浏览平台上的 MCP server 和工具
|
|
98
|
+
- **多环境 profile**:在不同 Rush 环境之间切换
|
|
99
|
+
- **shell 补全**:bash / zsh / fish
|
|
100
|
+
- **CI 友好**:`--json` 输出、`--ci` 模式、出错返回非 0 退出码
|
|
101
|
+
- **插件分发**:`marketplace` + `plugin install` 一条命令把 Rush 生态的 skill / command / rule / MCP 装到 Claude Code、Codex、Cursor 三家 IDE
|
|
206
102
|
|
|
207
|
-
|
|
208
|
-
rush-ai task result <task-id>
|
|
209
|
-
rush-ai task files <task-id> --download-all -o ./output
|
|
103
|
+
## 命令一览
|
|
210
104
|
|
|
211
|
-
|
|
212
|
-
rush-ai task send <task-id> -p "Change the button color to blue"
|
|
105
|
+
### 任务流
|
|
213
106
|
|
|
214
|
-
|
|
215
|
-
|
|
107
|
+
| 命令 | 说明 |
|
|
108
|
+
|------|------|
|
|
109
|
+
| `task create` | 建一个任务给某个 agent 执行 |
|
|
110
|
+
| `task send <id>` | 在已有任务上继续对话 / 发新消息(附件请用 `--file`) |
|
|
111
|
+
| `task status <id>` | 查任务状态 |
|
|
112
|
+
| `task watch <id>` | 实时跟一个任务的执行流 |
|
|
113
|
+
| `task result <id>` | 拿任务结果 + 文件摘要 |
|
|
114
|
+
| `task files <id>` | 列 / 下载任务产出文件 |
|
|
115
|
+
| `task messages <id>` | 看任务的对话历史 |
|
|
116
|
+
| `task list` / `task ls` | 列出我的任务 |
|
|
117
|
+
| `task cancel <id>` | 取消运行中的任务 |
|
|
118
|
+
| `task push` | 同步本地改动到 Rush(当前目录需要是 Rush 项目的 checkout) |
|
|
119
|
+
| `task deploy <id>` | 发布 web-builder 产物到 prod(`--domain` / `--version` / `--env`) |
|
|
120
|
+
| `task versions <id>` | 列出 web-builder 任务的可发布版本 |
|
|
121
|
+
| `task domain check <prefix>` | 校验自定义域名前缀是否可用(需 `--task <id>`) |
|
|
216
122
|
|
|
217
|
-
|
|
218
|
-
rush-ai task messages <task-id>
|
|
219
|
-
rush-ai task messages <task-id> -c <conversation-id>
|
|
220
|
-
rush-ai task messages <task-id> --last 5 --role user
|
|
221
|
-
rush-ai task messages <task-id> --compact
|
|
222
|
-
rush-ai task messages <task-id> --json
|
|
123
|
+
> 💡 即将推出:`task link` —— 把本地已有项目接入 Rush 的托管环境,继续在云端迭代。敬请期待。
|
|
223
124
|
|
|
224
|
-
|
|
225
|
-
rush-ai task list -l 10 -s completed
|
|
226
|
-
```
|
|
125
|
+
### agent / MCP
|
|
227
126
|
|
|
228
|
-
|
|
127
|
+
| 命令 | 说明 |
|
|
128
|
+
|------|------|
|
|
129
|
+
| `agent list` / `agent ls` | 列出可用 agent |
|
|
130
|
+
| `agent info <name>` | 查某个 agent 的描述、技能、MCP 配置 |
|
|
131
|
+
| `mcp list` / `mcp ls` | 列出 MCP server |
|
|
132
|
+
| `mcp list-tools <id>` | 列 MCP server 提供的工具 |
|
|
133
|
+
| `mcp serve` | 把 rush-ai 当成 MCP stdio server 启动 |
|
|
229
134
|
|
|
230
|
-
|
|
231
|
-
>
|
|
232
|
-
> This blocker is **specific to `task link`**. `task push` (sync-only, #1149) is unaffected — if you already have a Rush project checked out locally, `rush-ai task push` continues to work normally.
|
|
135
|
+
### 插件分发
|
|
233
136
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
137
|
+
| 命令 | 说明 |
|
|
138
|
+
|------|------|
|
|
139
|
+
| `marketplace add <source>` | 注册 marketplace(`github:owner/repo` 或 `directory:/abs/path`) |
|
|
140
|
+
| `marketplace list` / `remove` / `update` | 管理本地 marketplace 缓存 |
|
|
141
|
+
| `plugin install <ref>` | 一条命令同步装到 Claude Code + Codex + Cursor;`--target` 单独装;`--dry-run` / `--force` |
|
|
142
|
+
| `plugin list` / `uninstall` / `update` | 对称管理 |
|
|
238
143
|
|
|
239
|
-
|
|
240
|
-
# From your local project directory:
|
|
241
|
-
cd my-app
|
|
242
|
-
|
|
243
|
-
# Detect, confirm, and provision. Flags:
|
|
244
|
-
# --db create a Supabase database
|
|
245
|
-
# --oss record Rush-proxied storage endpoint (no per-project token)
|
|
246
|
-
# --name project slug (defaults to directory name)
|
|
247
|
-
# -y skip interactive prompts after detection
|
|
248
|
-
rush-ai task link --db --oss -y
|
|
249
|
-
|
|
250
|
-
# You now have .rush/env.md:
|
|
251
|
-
# PROJECT_ID=<id>
|
|
252
|
-
# PREVIEW_URL=https://<id>-preview.rush.zhenguanyu.com
|
|
253
|
-
# DATABASE_URL=postgres://...
|
|
254
|
-
# SUPABASE_URL=https://...
|
|
255
|
-
# SUPABASE_ANON_KEY=...
|
|
256
|
-
# STORAGE_API_BASE=https://rush.zhenguanyu.com/api/tasks/<id>/storage
|
|
257
|
-
# STATE=complete
|
|
258
|
-
|
|
259
|
-
# Your IDE agent reads .rush/agent-handoff.md and rewrites .env.local / upload code.
|
|
260
|
-
# When you're ready:
|
|
261
|
-
rush-ai task push # reuses PROJECT_ID from .rush/env.md
|
|
262
|
-
```
|
|
144
|
+
`<ref>` 格式:`<name>` 或 `<name>@<marketplace>`(例 `rush@rush-plugin`)。
|
|
263
145
|
|
|
264
|
-
|
|
265
|
-
AccessKeys. Server-side code in your app uses `$RUSH_PLATFORM_TOKEN` (already in
|
|
266
|
-
your environment via `rush-ai auth login`) to upload:
|
|
267
|
-
|
|
268
|
-
```ts
|
|
269
|
-
// apps/your-app/app/api/upload/route.ts — Next.js server route
|
|
270
|
-
export async function POST(req: Request) {
|
|
271
|
-
const fd = await req.formData();
|
|
272
|
-
const res = await fetch(`${process.env.STORAGE_API_BASE}/upload`, {
|
|
273
|
-
method: 'POST',
|
|
274
|
-
headers: { Authorization: `Bearer ${process.env.RUSH_PLATFORM_TOKEN}` },
|
|
275
|
-
body: fd,
|
|
276
|
-
});
|
|
277
|
-
return Response.json(await res.json());
|
|
278
|
-
}
|
|
279
|
-
```
|
|
146
|
+
### 认证 / 配置 / 其他
|
|
280
147
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
148
|
+
| 命令 | 说明 |
|
|
149
|
+
|------|------|
|
|
150
|
+
| `auth login` / `status` / `logout` | 登录(浏览器或 API key) / 看状态 / 登出 |
|
|
151
|
+
| `config show` / `set` / `use` / `create` / `delete` / `list` | profile 管理(多环境切换) |
|
|
152
|
+
| `completion install` / `bash\|zsh\|fish` | shell 补全 |
|
|
153
|
+
| `doctor` | 环境 / 认证 / 连通性诊断 |
|
|
154
|
+
| `check` | 本地项目部署前预检 |
|
|
284
155
|
|
|
285
|
-
|
|
286
|
-
- `.rush/env.md` is auto-gitignored — never commit it
|
|
287
|
-
- Single file ≤ 30 MB (larger streaming planned for Phase 2)
|
|
288
|
-
- Each task has a 5 GB soft storage quota
|
|
289
|
-
- `task link` projects have `template = null` and can't flow through `task deploy` — use `task push` for iterative updates
|
|
290
|
-
- `task link` is compensating, not atomic: if it fails mid-way, just re-run it; it resumes from the last checkpoint in `.rush/env.md`
|
|
156
|
+
### 全局选项
|
|
291
157
|
|
|
292
|
-
|
|
158
|
+
| 选项 | 说明 |
|
|
159
|
+
|------|------|
|
|
160
|
+
| `--json` | 输出 JSON(机器可读) |
|
|
161
|
+
| `--ci` | CI 模式:JSON 输出 + 不交互 + 严格退出码 |
|
|
162
|
+
| `--verbose` / `--debug` | 详细 / 调试输出 |
|
|
163
|
+
| `--no-color` | 禁用颜色 |
|
|
164
|
+
| `-f, --format <type>` | 输出格式:`table` / `json` / `csv` |
|
|
293
165
|
|
|
294
|
-
|
|
166
|
+
## 常见用法
|
|
295
167
|
|
|
296
|
-
|
|
297
|
-
message and it produced a commit), the CLI can take that version from the
|
|
298
|
-
preview URL to a real production deploy — mirroring the Web UI's **Deploy**
|
|
299
|
-
button, entirely in the terminal.
|
|
168
|
+
### 认证
|
|
300
169
|
|
|
301
170
|
```bash
|
|
302
|
-
#
|
|
303
|
-
rush-ai
|
|
304
|
-
# # Version Commit Created Test Production
|
|
305
|
-
# 1 1 abc12345 2026-05-01 14:20 ✓
|
|
306
|
-
# 2 2 def67890 2026-05-03 11:05 ✓
|
|
307
|
-
|
|
308
|
-
# 2. (Optional) Check a custom domain prefix for availability before deploying
|
|
309
|
-
# This does NOT reserve the prefix — a TOCTOU-safe reservation only happens
|
|
310
|
-
# inside `task deploy`.
|
|
311
|
-
rush-ai task domain check my-app --task <task-id>
|
|
312
|
-
# Success! Prefix available: https://my-app.<suffix>
|
|
313
|
-
|
|
314
|
-
# 3. Deploy — picks the latest buildable version by default
|
|
315
|
-
rush-ai task deploy <task-id> --domain my-app --yes
|
|
316
|
-
# Success! Deployed!
|
|
317
|
-
# URL: https://my-app.rush.zhenguanyu.com
|
|
318
|
-
# Version: abc12345
|
|
319
|
-
# Env: production
|
|
320
|
-
# Domain: my-app
|
|
321
|
-
|
|
322
|
-
# 4. Pin a specific commit instead of `--version latest`
|
|
323
|
-
rush-ai task deploy <task-id> --version def67890 --domain my-app --yes
|
|
324
|
-
|
|
325
|
-
# 5. Non-prod environment (non-Next.js templates only — Next.js is prod-only)
|
|
326
|
-
rush-ai task deploy <task-id> --env test --yes
|
|
327
|
-
|
|
328
|
-
# 6. CI / scripted use
|
|
329
|
-
RUSH_API_KEY=$KEY rush-ai task deploy <task-id> --domain my-app --ci
|
|
330
|
-
```
|
|
171
|
+
# 浏览器登录
|
|
172
|
+
rush-ai auth login
|
|
331
173
|
|
|
332
|
-
|
|
333
|
-
-
|
|
334
|
-
whose template is non-empty; everything else errors out early (before any
|
|
335
|
-
publish side effect).
|
|
336
|
-
- The Next.js template (`nextjs-fullstack`) deploys to a pod and streams
|
|
337
|
-
progress via SSE; the static template deploys to OSS and writes a
|
|
338
|
-
best-effort DB record afterward.
|
|
339
|
-
- Domain prefixes must match `^[a-z0-9][a-z0-9-]{0,28}[a-z0-9]$|^[a-z0-9]$`
|
|
340
|
-
— the CLI validates the prefix locally before hitting the API.
|
|
174
|
+
# API key 登录(非交互,适合 CI)
|
|
175
|
+
rush-ai auth login --api-key <key>
|
|
341
176
|
|
|
342
|
-
|
|
177
|
+
# 看当前登录态
|
|
178
|
+
rush-ai auth status
|
|
179
|
+
```
|
|
343
180
|
|
|
344
|
-
|
|
345
|
-
current directory to Rush and create a new task." That behaviour is now
|
|
346
|
-
`rush-ai task push`. The `task deploy` name has been reassigned to the new
|
|
347
|
-
production-deploy flow described above (it requires a task id).
|
|
181
|
+
### 多环境切换
|
|
348
182
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
183
|
+
```bash
|
|
184
|
+
rush-ai config create prod --api https://rush.example.com
|
|
185
|
+
rush-ai config create staging --api https://rush-staging.example.com
|
|
186
|
+
rush-ai config use prod
|
|
187
|
+
rush-ai config list
|
|
188
|
+
```
|
|
354
189
|
|
|
355
|
-
|
|
356
|
-
release — it prints a deprecation warning and forwards to `task push`. Plan
|
|
357
|
-
to update scripts and CI pipelines before the shim is removed.
|
|
190
|
+
### 插件分发(可选)
|
|
358
191
|
|
|
359
|
-
|
|
192
|
+
如果你想把 Rush 生态的 skill / command / rule / MCP 同时装到本地的 Claude Code / Codex / Cursor:
|
|
360
193
|
|
|
361
194
|
```bash
|
|
362
|
-
|
|
363
|
-
rush-ai marketplace add github:kanyun-inc/rush-marketplace
|
|
364
|
-
rush-ai marketplace add directory:/path/to/local-marketplace --as my-mkt
|
|
365
|
-
|
|
366
|
-
# Install a plugin to every detected IDE
|
|
195
|
+
rush-ai marketplace add github:kanyun-inc/rush-plugin
|
|
367
196
|
rush-ai plugin install rush
|
|
368
|
-
# ✓
|
|
369
|
-
# ✓
|
|
370
|
-
# ✓
|
|
197
|
+
# ✓ Claude Code (commands + skills + rules + MCP)
|
|
198
|
+
# ✓ Codex (skills + MCP)
|
|
199
|
+
# ✓ Cursor (skills + rules + MCP)
|
|
371
200
|
|
|
372
|
-
#
|
|
201
|
+
# 只装某一家
|
|
373
202
|
rush-ai plugin install rush --target claude-code
|
|
374
203
|
|
|
375
|
-
#
|
|
204
|
+
# 预览不落盘
|
|
376
205
|
rush-ai plugin install rush --dry-run
|
|
377
|
-
|
|
378
|
-
# List installed plugins across all targets
|
|
379
|
-
rush-ai plugin list
|
|
380
|
-
|
|
381
|
-
# Update installed plugins to the latest marketplace version
|
|
382
|
-
rush-ai plugin update
|
|
383
|
-
|
|
384
|
-
# Remove a plugin (symmetric across all targets)
|
|
385
|
-
rush-ai plugin uninstall rush
|
|
386
|
-
```
|
|
387
|
-
|
|
388
|
-
Capability-level skips (commands/rules/hooks on an IDE that doesn't support
|
|
389
|
-
them) do **not** downgrade the line-level status — the row stays `✓` and the
|
|
390
|
-
trailing bracket simply lists the skipped capabilities. A `✗` only appears
|
|
391
|
-
when an installer genuinely failed (and rolled back its own writes).
|
|
392
|
-
|
|
393
|
-
### Discovering Agents and MCP Servers
|
|
394
|
-
|
|
395
|
-
```bash
|
|
396
|
-
# Browse agents
|
|
397
|
-
rush-ai agent list
|
|
398
|
-
rush-ai agent info rush
|
|
399
|
-
|
|
400
|
-
# Browse MCP servers and their tools
|
|
401
|
-
rush-ai mcp list --search "database"
|
|
402
|
-
rush-ai mcp list-tools <server-id>
|
|
403
206
|
```
|
|
404
207
|
|
|
405
|
-
|
|
208
|
+
这条路径和每个 IDE 自己的 `/plugin install` 等价 —— 装完之后 IDE 的 `/plugin list` 能看到、`/plugin uninstall` 也能卸载。不用这条路径就忽略;日常的 `task create` / `task push` 和插件分发完全独立。
|
|
406
209
|
|
|
407
|
-
|
|
408
|
-
# Create profiles for different environments
|
|
409
|
-
rush-ai config create production --api https://rush.example.com
|
|
410
|
-
rush-ai config create staging --api https://rush-test.example.com
|
|
411
|
-
|
|
412
|
-
# Switch between profiles
|
|
413
|
-
rush-ai config use production
|
|
414
|
-
rush-ai config list
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
### CI/CD Integration
|
|
210
|
+
### CI / 脚本
|
|
418
211
|
|
|
419
212
|
```bash
|
|
420
|
-
#
|
|
213
|
+
# 非交互认证
|
|
421
214
|
RUSH_API_KEY=$KEY rush-ai task create -a rush -p "Run tests" --ci
|
|
422
215
|
|
|
423
|
-
#
|
|
216
|
+
# 机器可读输出
|
|
424
217
|
rush-ai task status <id> --json | jq '.status'
|
|
425
|
-
|
|
426
|
-
# Pipe results
|
|
427
218
|
rush-ai task result <id> --json | jq -r '.result'
|
|
428
219
|
```
|
|
429
220
|
|
|
430
|
-
##
|
|
221
|
+
## 环境变量
|
|
431
222
|
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
223
|
+
| 变量 | 说明 | 默认 |
|
|
224
|
+
|------|------|------|
|
|
225
|
+
| `RUSH_API_KEY` | API key,设了就跳过浏览器登录 | — |
|
|
226
|
+
| `RUSH_API_URL` | API base URL 覆盖 | `https://rush.zhenguanyu.com` |
|
|
227
|
+
| `RUSH_PROFILE` | 覆盖 active profile | — |
|
|
228
|
+
| `NO_COLOR` | 禁用颜色输出 | — |
|
|
229
|
+
| `DEBUG` | 启用调试日志 | — |
|
|
436
230
|
|
|
437
|
-
|
|
438
|
-
|-----|----------------|---------------|
|
|
439
|
-
| Claude Code | `~/.claude/plugins/cache/<mkt>/<name>/<ver>/` (commands / skills / rules / hooks / `.claude-plugin/plugin.json` with embedded `mcpServers`) | `~/.claude/plugins/known_marketplaces.json`, `installed_plugins.json`, `settings.json.enabledPlugins` |
|
|
440
|
-
| Codex | `~/.codex/plugins/cache/<mkt>/<name>/<ver>/` (`.codex-plugin/plugin.json` with `"skills": "./skills/"` + external `.mcp.json`) | `~/.codex/config.toml` `[marketplaces.*]` + `[plugins.*]` (original backed up to `config.toml.bak.<ts>`) |
|
|
441
|
-
| Cursor | `~/.cursor/skills/<name>/` **and** `~/.cursor/rules/<name>.mdc` (bridge rule with `@file` reference) + `~/.cursor/mcp.json` merge | n/a (rush-ai registry tracks it) |
|
|
231
|
+
## 配置文件
|
|
442
232
|
|
|
443
|
-
|
|
444
|
-
marker so uninstall can safely remove only files rush-ai created.
|
|
445
|
-
|
|
446
|
-
rush-ai keeps its own ledger in `~/.rush/plugins/registry.json` — `targets.<ide>.{status, files, mcpKeys, skipped}` per IDE, plus a `migrations` section for legacy cleanup — so uninstall is byte-accurate regardless of future IDE schema changes.
|
|
447
|
-
|
|
448
|
-
## Upgrading from 0.7.x (Breaking)
|
|
449
|
-
|
|
450
|
-
**0.8.0 changes what `rush-ai plugin install` writes to disk.** If you used
|
|
451
|
-
0.7.x in the past, `rush-ai` will migrate your install on the next
|
|
452
|
-
`plugin install` call, following a strict **install-new → verify → cleanup-old**
|
|
453
|
-
order (your old install keeps working until the new one is verified):
|
|
454
|
-
|
|
455
|
-
1. Installs the new native-format plugin into `~/.claude/plugins/cache/`, updates
|
|
456
|
-
`installed_plugins.json` / `settings.json.enabledPlugins`.
|
|
457
|
-
2. Verifies the new install (reads the manifest back, checks the cache dir).
|
|
458
|
-
3. On success: removes the legacy `~/.rush/plugins/claude-code/` asset tree,
|
|
459
|
-
unlinks `~/.claude/skills/rush-task`, removes `mcpServers.rush` from
|
|
460
|
-
`~/.claude/settings.json`.
|
|
461
|
-
4. On verification failure: leaves both installs in place, appends to
|
|
462
|
-
`~/.rush/plugins/migration-failed.log`, exits 0 so your install still
|
|
463
|
-
succeeds.
|
|
464
|
-
|
|
465
|
-
Opt out by setting `RUSH_SKIP_MIGRATION=1` — useful if you want to hold your
|
|
466
|
-
legacy install for an extra release cycle or audit the new format first.
|
|
467
|
-
|
|
468
|
-
## Environment Variables
|
|
469
|
-
|
|
470
|
-
| Variable | Description | Default |
|
|
471
|
-
|----------|-------------|---------|
|
|
472
|
-
| `RUSH_API_KEY` | API key for non-interactive auth (skips browser login) | - |
|
|
473
|
-
| `RUSH_API_URL` | API base URL override | `https://rush.zhenguanyu.com` |
|
|
474
|
-
| `RUSH_PROFILE` | Override active profile | - |
|
|
475
|
-
| `RUSH_SKIP_MIGRATION` | Skip 0.7.x legacy plugin migration on `plugin install` | - |
|
|
476
|
-
| `NO_COLOR` | Disable colored output | - |
|
|
477
|
-
| `DEBUG` | Enable debug logging | - |
|
|
478
|
-
|
|
479
|
-
## Configuration
|
|
480
|
-
|
|
481
|
-
Config files are stored in `~/.rush/`:
|
|
233
|
+
rush-ai 的状态都在 `~/.rush/`:
|
|
482
234
|
|
|
483
235
|
```
|
|
484
236
|
~/.rush/
|
|
485
|
-
├── auth.json
|
|
486
|
-
├── config.json
|
|
487
|
-
├── marketplaces/
|
|
488
|
-
│ └── <mkt-name>/ # directory: points here directly; github: shallow-cloned
|
|
237
|
+
├── auth.json # 认证凭据
|
|
238
|
+
├── config.json # profile / 全局配置
|
|
239
|
+
├── marketplaces/ # 已注册 marketplace 的本地缓存
|
|
489
240
|
└── plugins/
|
|
490
|
-
└── registry.json
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
## Development
|
|
494
|
-
|
|
495
|
-
```bash
|
|
496
|
-
# Install dependencies
|
|
497
|
-
pnpm install
|
|
498
|
-
|
|
499
|
-
# Build
|
|
500
|
-
pnpm --filter rush-ai build
|
|
501
|
-
|
|
502
|
-
# Type check
|
|
503
|
-
pnpm --filter rush-ai typecheck
|
|
504
|
-
|
|
505
|
-
# Run unit tests
|
|
506
|
-
pnpm --filter rush-ai test
|
|
507
|
-
|
|
508
|
-
# Run E2E tests (requires web + agent: pnpm dev)
|
|
509
|
-
pnpm dev &
|
|
510
|
-
pnpm --filter rush-ai test:e2e
|
|
511
|
-
|
|
512
|
-
# Run smoke tests (against deployed environment)
|
|
513
|
-
RUSH_API_BASE_URL=https://rush-test.zhenguanyu.com \
|
|
514
|
-
RUSH_AUTH_TOKEN=$TOKEN \
|
|
515
|
-
pnpm --filter rush-ai test:smoke
|
|
241
|
+
└── registry.json # 已装插件账本
|
|
516
242
|
```
|
|
517
243
|
|
|
518
244
|
## License
|