rush-ai 0.6.0 → 0.9.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/AGENTS.md +37 -0
- package/README.md +206 -7
- package/dist/{chunk-UJLVFMWM.js → chunk-SZO6LEQX.js} +285 -101
- package/dist/chunk-SZO6LEQX.js.map +1 -0
- package/dist/index.js +7701 -1334
- package/dist/index.js.map +1 -1
- package/dist/plugin-assets/SKILL.md +66 -59
- package/dist/{server-MRWAFK5G.js → server-KFDYSF4T.js} +3 -5
- package/dist/{server-MRWAFK5G.js.map → server-KFDYSF4T.js.map} +1 -1
- package/dist/skills/README.md +48 -0
- package/dist/skills/agent-shelf.md +102 -0
- package/dist/skills/hand-off.md +163 -0
- package/package.json +4 -1
- package/skills/README.md +48 -0
- package/skills/agent-shelf.md +102 -0
- package/skills/hand-off.md +163 -0
- package/dist/chunk-MG4HY2PD.js +0 -136
- package/dist/chunk-MG4HY2PD.js.map +0 -1
- package/dist/chunk-UJLVFMWM.js.map +0 -1
- package/dist/client-NTECGN3O.js +0 -10
- package/dist/client-NTECGN3O.js.map +0 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# AGENTS.md — for AI agents using rush-ai
|
|
2
|
+
|
|
3
|
+
If you are an AI agent (Cursor, Claude Code, or another IDE-resident assistant) and you landed in this package, read this file first.
|
|
4
|
+
|
|
5
|
+
## What rush-ai is for
|
|
6
|
+
|
|
7
|
+
`rush-ai` is how a local agent hands off work to the Rush platform — without asking the user to re-state anything. Two situations you'll use it in:
|
|
8
|
+
|
|
9
|
+
1. **Hand-off** — the conversation you're in produces work that belongs on Rush (a live website, a task for a specialist). Relay the context you already have. → read [`skills/hand-off.md`](./skills/hand-off.md).
|
|
10
|
+
2. **Sub-agent in your workflow** — you're composing a multi-step plan and a step needs a specialist from Rush's agent shelf. → read [`skills/agent-shelf.md`](./skills/agent-shelf.md).
|
|
11
|
+
|
|
12
|
+
## Getting usage on demand
|
|
13
|
+
|
|
14
|
+
From inside any shell (the one you already have a Bash tool for), these three commands give you everything you need:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npx rush-ai skill # prints the index — start here
|
|
18
|
+
npx rush-ai skill hand-off # full hand-off playbook
|
|
19
|
+
npx rush-ai skill agent-shelf # full agent-shelf playbook
|
|
20
|
+
npx rush-ai agent list # see the live list of available agents
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Every command also supports `--help` with a "When to use" section and example flows.
|
|
24
|
+
|
|
25
|
+
## Defaults that save you a round-trip
|
|
26
|
+
|
|
27
|
+
- Recommended invocation: **`npx rush-ai`** (always latest, zero install).
|
|
28
|
+
- Default agent: **`rush`** — `-a` defaults to `rush` when omitted. Pass `-a web-builder` for site-building tasks.
|
|
29
|
+
- Always pass **`--json`** when the result will be parsed.
|
|
30
|
+
- Iterate with **`task send <id>`**, not a new `task create`.
|
|
31
|
+
|
|
32
|
+
## What NOT to do
|
|
33
|
+
|
|
34
|
+
- Don't ask the user to summarize requirements they already told you — relay them.
|
|
35
|
+
- Don't invent agent names; always confirm via `agent list`.
|
|
36
|
+
- Don't run `npx rush-ai auth login` for the user (it's interactive / opens a browser). Ask them to.
|
|
37
|
+
- Don't silently retry a failed task. Surface the error and ask what to do.
|
package/README.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# rush-ai
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**一条命令,装一次,Claude Code / Codex / Cursor 三家都能用。**
|
|
6
|
+
|
|
7
|
+
_Install once. Run anywhere. Hand off your context, not your prompt._
|
|
6
8
|
|
|
7
9
|
[](https://www.npmjs.com/package/rush-ai)
|
|
8
10
|
[](https://opensource.org/licenses/MIT)
|
|
@@ -13,6 +15,24 @@
|
|
|
13
15
|
|
|
14
16
|
## Why rush-ai
|
|
15
17
|
|
|
18
|
+
### One command, three agents — `rush-ai plugin install`
|
|
19
|
+
|
|
20
|
+
`rush-ai plugin install <name>` is a **CLI equivalent** of each IDE's built-in
|
|
21
|
+
`/plugin install`. It writes plugin files (commands / skills / rules / hooks /
|
|
22
|
+
MCP servers) straight to each agent's on-disk layout:
|
|
23
|
+
|
|
24
|
+
- **Claude Code** — native plugin at `~/.claude/plugins/cache/<mkt>/<name>/<ver>/`,
|
|
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`).
|
|
32
|
+
|
|
33
|
+
Because we write the files each IDE already reads, no daemons, no background
|
|
34
|
+
watchers — once written, plugins load the same way as if the IDE installed them.
|
|
35
|
+
|
|
16
36
|
### Hand off your context, not your prompt
|
|
17
37
|
|
|
18
38
|
You're already deep in a conversation with your local agent — Cursor, Claude Code, or your own. It knows the codebase, the constraints, what you've already tried. When part of that work belongs on the Rush platform (building a site, asking a specialist agent), you don't want to summarize everything again.
|
|
@@ -52,16 +72,28 @@ npx rush-ai task status lodig8oknq0r
|
|
|
52
72
|
## Quick Start
|
|
53
73
|
|
|
54
74
|
```bash
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
75
|
+
# 1. Install the CLI
|
|
76
|
+
npm install -g rush-ai
|
|
77
|
+
|
|
78
|
+
# 2. Install Rush plugin to every agent you have
|
|
79
|
+
rush-ai marketplace add github:kanyun-inc/rush-marketplace
|
|
80
|
+
rush-ai plugin install rush
|
|
81
|
+
|
|
82
|
+
# 3. Use Rush as a task executor
|
|
83
|
+
rush-ai auth login
|
|
84
|
+
rush-ai agent list
|
|
85
|
+
rush-ai task create -a rush -p "Add a contact form to the homepage"
|
|
86
|
+
rush-ai task watch <task-id>
|
|
59
87
|
```
|
|
60
88
|
|
|
61
89
|
`rush` is the default general-purpose agent. Swap `-a` for any agent from `agent list` to call a specialist instead.
|
|
62
90
|
|
|
63
91
|
## Features
|
|
64
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
|
|
65
97
|
- **Task lifecycle** — Create, watch (SSE streaming), send follow-ups, cancel, and download artifacts
|
|
66
98
|
- **Agent shelf** — Browse agents, inspect skills and MCP servers, plug any agent into your own workflow as a sub-agent
|
|
67
99
|
- **MCP integration** — Discover MCP servers, list tools, run as an MCP stdio server
|
|
@@ -83,6 +115,27 @@ npm install -g rush-ai
|
|
|
83
115
|
|
|
84
116
|
## Commands
|
|
85
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
|
+
|
|
86
139
|
| Command | Alias | Description |
|
|
87
140
|
|---------|-------|-------------|
|
|
88
141
|
| `auth login` | - | Log in via browser (PKCE) or API key |
|
|
@@ -99,6 +152,10 @@ npm install -g rush-ai
|
|
|
99
152
|
| `task list` | `task ls` | List tasks |
|
|
100
153
|
| `task watch <id>` | - | Stream task execution in real-time (SSE) |
|
|
101
154
|
| `task cancel <id>` | - | Cancel a running task |
|
|
155
|
+
| `task push` | - | Push a local project to the Rush platform (previously `task deploy` with no id) |
|
|
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) |
|
|
102
159
|
| `mcp serve` | - | Start MCP stdio server |
|
|
103
160
|
| `mcp list` | `mcp ls` | List available MCP servers |
|
|
104
161
|
| `mcp list-tools <id>` | - | List tools provided by an MCP server |
|
|
@@ -168,6 +225,105 @@ rush-ai task messages <task-id> --json
|
|
|
168
225
|
rush-ai task list -l 10 -s completed
|
|
169
226
|
```
|
|
170
227
|
|
|
228
|
+
### Deploying a web-builder task
|
|
229
|
+
|
|
230
|
+
Once a `web-builder` task has built at least one version (you've sent it a
|
|
231
|
+
message and it produced a commit), the CLI can take that version from the
|
|
232
|
+
preview URL to a real production deploy — mirroring the Web UI's **Deploy**
|
|
233
|
+
button, entirely in the terminal.
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
# 1. See which versions are buildable and which are already deployed
|
|
237
|
+
rush-ai task versions <task-id>
|
|
238
|
+
# # Version Commit Created Test Production
|
|
239
|
+
# 1 1 abc12345 2026-05-01 14:20 ✓
|
|
240
|
+
# 2 2 def67890 2026-05-03 11:05 ✓
|
|
241
|
+
|
|
242
|
+
# 2. (Optional) Check a custom domain prefix for availability before deploying
|
|
243
|
+
# This does NOT reserve the prefix — a TOCTOU-safe reservation only happens
|
|
244
|
+
# inside `task deploy`.
|
|
245
|
+
rush-ai task domain check my-app --task <task-id>
|
|
246
|
+
# Success! Prefix available: https://my-app.<suffix>
|
|
247
|
+
|
|
248
|
+
# 3. Deploy — picks the latest buildable version by default
|
|
249
|
+
rush-ai task deploy <task-id> --domain my-app --yes
|
|
250
|
+
# Success! Deployed!
|
|
251
|
+
# URL: https://my-app.rush.zhenguanyu.com
|
|
252
|
+
# Version: abc12345
|
|
253
|
+
# Env: production
|
|
254
|
+
# Domain: my-app
|
|
255
|
+
|
|
256
|
+
# 4. Pin a specific commit instead of `--version latest`
|
|
257
|
+
rush-ai task deploy <task-id> --version def67890 --domain my-app --yes
|
|
258
|
+
|
|
259
|
+
# 5. Non-prod environment (non-Next.js templates only — Next.js is prod-only)
|
|
260
|
+
rush-ai task deploy <task-id> --env test --yes
|
|
261
|
+
|
|
262
|
+
# 6. CI / scripted use
|
|
263
|
+
RUSH_API_KEY=$KEY rush-ai task deploy <task-id> --domain my-app --ci
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
Notes:
|
|
267
|
+
- `task deploy <id>` only works for tasks whose agent is `web-builder` and
|
|
268
|
+
whose template is non-empty; everything else errors out early (before any
|
|
269
|
+
publish side effect).
|
|
270
|
+
- The Next.js template (`nextjs-fullstack`) deploys to a pod and streams
|
|
271
|
+
progress via SSE; the static template deploys to OSS and writes a
|
|
272
|
+
best-effort DB record afterward.
|
|
273
|
+
- Domain prefixes must match `^[a-z0-9][a-z0-9-]{0,28}[a-z0-9]$|^[a-z0-9]$`
|
|
274
|
+
— the CLI validates the prefix locally before hitting the API.
|
|
275
|
+
|
|
276
|
+
#### Migrating from `task deploy` (≤ 0.8.x)
|
|
277
|
+
|
|
278
|
+
In 0.8.x and earlier, `rush-ai task deploy` with **no id** was "push the
|
|
279
|
+
current directory to Rush and create a new task." That behaviour is now
|
|
280
|
+
`rush-ai task push`. The `task deploy` name has been reassigned to the new
|
|
281
|
+
production-deploy flow described above (it requires a task id).
|
|
282
|
+
|
|
283
|
+
| Old CLI (≤ 0.8.x) | New CLI (0.9+) |
|
|
284
|
+
|---|---|
|
|
285
|
+
| `rush-ai task deploy -n my-app` | `rush-ai task push -n my-app` |
|
|
286
|
+
| `rush-ai task deploy -p ./site` | `rush-ai task push -p ./site` |
|
|
287
|
+
| _(not supported)_ | `rush-ai task deploy <id> --domain my-app` |
|
|
288
|
+
|
|
289
|
+
The legacy `task deploy` (no id) invocation still works for one more minor
|
|
290
|
+
release — it prints a deprecation warning and forwards to `task push`. Plan
|
|
291
|
+
to update scripts and CI pipelines before the shim is removed.
|
|
292
|
+
|
|
293
|
+
### Managing plugins
|
|
294
|
+
|
|
295
|
+
```bash
|
|
296
|
+
# Register a marketplace (GitHub repo or a local directory)
|
|
297
|
+
rush-ai marketplace add github:kanyun-inc/rush-marketplace
|
|
298
|
+
rush-ai marketplace add directory:/path/to/local-marketplace --as my-mkt
|
|
299
|
+
|
|
300
|
+
# Install a plugin to every detected IDE
|
|
301
|
+
rush-ai plugin install rush
|
|
302
|
+
# ✓ Installed to Claude Code (commands + skills + rules + MCP)
|
|
303
|
+
# ✓ Installed to Codex (skills + MCP) [commands/rules/hooks 跳过: Codex 不支持]
|
|
304
|
+
# ✓ Installed to Cursor (skills + rules + MCP) [commands/hooks 跳过: Cursor 不支持]
|
|
305
|
+
|
|
306
|
+
# Target a single IDE
|
|
307
|
+
rush-ai plugin install rush --target claude-code
|
|
308
|
+
|
|
309
|
+
# Preview without touching disk
|
|
310
|
+
rush-ai plugin install rush --dry-run
|
|
311
|
+
|
|
312
|
+
# List installed plugins across all targets
|
|
313
|
+
rush-ai plugin list
|
|
314
|
+
|
|
315
|
+
# Update installed plugins to the latest marketplace version
|
|
316
|
+
rush-ai plugin update
|
|
317
|
+
|
|
318
|
+
# Remove a plugin (symmetric across all targets)
|
|
319
|
+
rush-ai plugin uninstall rush
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Capability-level skips (commands/rules/hooks on an IDE that doesn't support
|
|
323
|
+
them) do **not** downgrade the line-level status — the row stays `✓` and the
|
|
324
|
+
trailing bracket simply lists the skipped capabilities. A `✗` only appears
|
|
325
|
+
when an installer genuinely failed (and rolled back its own writes).
|
|
326
|
+
|
|
171
327
|
### Discovering Agents and MCP Servers
|
|
172
328
|
|
|
173
329
|
```bash
|
|
@@ -205,6 +361,44 @@ rush-ai task status <id> --json | jq '.status'
|
|
|
205
361
|
rush-ai task result <id> --json | jq -r '.result'
|
|
206
362
|
```
|
|
207
363
|
|
|
364
|
+
## How plugin install works
|
|
365
|
+
|
|
366
|
+
`rush-ai plugin install <name>` is **not** a daemon or a runtime shim — it is
|
|
367
|
+
the CLI equivalent of each IDE's built-in `/plugin install`. Writing the
|
|
368
|
+
plugin files to disk is exactly what the IDE would do internally, so loading
|
|
369
|
+
behaviour is identical.
|
|
370
|
+
|
|
371
|
+
| IDE | Layout written | Registered in |
|
|
372
|
+
|-----|----------------|---------------|
|
|
373
|
+
| 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` |
|
|
374
|
+
| 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>`) |
|
|
375
|
+
| 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) |
|
|
376
|
+
|
|
377
|
+
Every rush-ai-generated rule/bridge carries a `<!-- rush-ai:auto-generated -->`
|
|
378
|
+
marker so uninstall can safely remove only files rush-ai created.
|
|
379
|
+
|
|
380
|
+
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.
|
|
381
|
+
|
|
382
|
+
## Upgrading from 0.7.x (Breaking)
|
|
383
|
+
|
|
384
|
+
**0.8.0 changes what `rush-ai plugin install` writes to disk.** If you used
|
|
385
|
+
0.7.x in the past, `rush-ai` will migrate your install on the next
|
|
386
|
+
`plugin install` call, following a strict **install-new → verify → cleanup-old**
|
|
387
|
+
order (your old install keeps working until the new one is verified):
|
|
388
|
+
|
|
389
|
+
1. Installs the new native-format plugin into `~/.claude/plugins/cache/`, updates
|
|
390
|
+
`installed_plugins.json` / `settings.json.enabledPlugins`.
|
|
391
|
+
2. Verifies the new install (reads the manifest back, checks the cache dir).
|
|
392
|
+
3. On success: removes the legacy `~/.rush/plugins/claude-code/` asset tree,
|
|
393
|
+
unlinks `~/.claude/skills/rush-task`, removes `mcpServers.rush` from
|
|
394
|
+
`~/.claude/settings.json`.
|
|
395
|
+
4. On verification failure: leaves both installs in place, appends to
|
|
396
|
+
`~/.rush/plugins/migration-failed.log`, exits 0 so your install still
|
|
397
|
+
succeeds.
|
|
398
|
+
|
|
399
|
+
Opt out by setting `RUSH_SKIP_MIGRATION=1` — useful if you want to hold your
|
|
400
|
+
legacy install for an extra release cycle or audit the new format first.
|
|
401
|
+
|
|
208
402
|
## Environment Variables
|
|
209
403
|
|
|
210
404
|
| Variable | Description | Default |
|
|
@@ -212,6 +406,7 @@ rush-ai task result <id> --json | jq -r '.result'
|
|
|
212
406
|
| `RUSH_API_KEY` | API key for non-interactive auth (skips browser login) | - |
|
|
213
407
|
| `RUSH_API_URL` | API base URL override | `https://rush.zhenguanyu.com` |
|
|
214
408
|
| `RUSH_PROFILE` | Override active profile | - |
|
|
409
|
+
| `RUSH_SKIP_MIGRATION` | Skip 0.7.x legacy plugin migration on `plugin install` | - |
|
|
215
410
|
| `NO_COLOR` | Disable colored output | - |
|
|
216
411
|
| `DEBUG` | Enable debug logging | - |
|
|
217
412
|
|
|
@@ -221,8 +416,12 @@ Config files are stored in `~/.rush/`:
|
|
|
221
416
|
|
|
222
417
|
```
|
|
223
418
|
~/.rush/
|
|
224
|
-
├── auth.json
|
|
225
|
-
|
|
419
|
+
├── auth.json # Credentials (token, refresh token, expiry)
|
|
420
|
+
├── config.json # Global settings (profiles, metrics, team)
|
|
421
|
+
├── marketplaces/ # Local cache of registered marketplaces
|
|
422
|
+
│ └── <mkt-name>/ # directory: points here directly; github: shallow-cloned
|
|
423
|
+
└── plugins/
|
|
424
|
+
└── registry.json # Installed-plugin ledger (per-IDE files + mcpKeys + migrations)
|
|
226
425
|
```
|
|
227
426
|
|
|
228
427
|
## Development
|