rush-ai 0.3.0 → 0.4.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 +175 -80
- package/dist/chunk-MG4HY2PD.js +0 -0
- package/dist/chunk-UJLVFMWM.js +0 -0
- package/dist/client-NTECGN3O.js +0 -0
- package/dist/index.js +810 -130
- package/dist/index.js.map +1 -1
- package/dist/plugin-assets/commands/rush-deploy.md +36 -0
- package/dist/plugin-assets/rules/rush-deploy.md +68 -0
- package/dist/server-MRWAFK5G.js +0 -0
- package/package.json +27 -16
package/README.md
CHANGED
|
@@ -1,135 +1,230 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# rush-ai
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
**Command-line interface for the Rush AI platform**
|
|
6
|
+
|
|
7
|
+
*Create tasks, manage agents, stream results, and integrate IDE plugins — all from the terminal*
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/rush-ai)
|
|
10
|
+
[](https://opensource.org/licenses/MIT)
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
---
|
|
4
15
|
|
|
5
16
|
## Quick Start
|
|
6
17
|
|
|
7
18
|
```bash
|
|
8
|
-
|
|
9
|
-
|
|
19
|
+
npm install -g rush-ai
|
|
20
|
+
|
|
21
|
+
rush-ai auth login
|
|
22
|
+
rush-ai agent list
|
|
23
|
+
rush-ai task create -a <agent> -p "Build a landing page"
|
|
24
|
+
rush-ai task watch <task-id>
|
|
10
25
|
```
|
|
11
26
|
|
|
12
|
-
##
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- **Task lifecycle** — Create, watch (SSE streaming), cancel, and download artifacts
|
|
30
|
+
- **Agent management** — Browse agents, inspect skills and MCP servers
|
|
31
|
+
- **MCP integration** — Discover MCP servers, list tools, run as MCP stdio server
|
|
32
|
+
- **IDE plugins** — Install, update, diagnose plugins for Claude Code and Cursor
|
|
33
|
+
- **Multi-profile** — Switch between environments (test, production, custom)
|
|
34
|
+
- **Shell completion** — Bash, Zsh, and Fish auto-completion
|
|
35
|
+
- **CI-friendly** — `--json` output, `--ci` mode, non-zero exit codes on failure
|
|
13
36
|
|
|
14
|
-
|
|
37
|
+
## Installation
|
|
15
38
|
|
|
16
|
-
|
|
39
|
+
**Requirements:** Node.js >= 18.0.0
|
|
17
40
|
|
|
18
|
-
|
|
41
|
+
```bash
|
|
42
|
+
npm install -g rush-ai # Global install
|
|
43
|
+
npx rush-ai <command> # Or use npx directly
|
|
44
|
+
```
|
|
19
45
|
|
|
20
|
-
|
|
46
|
+
## Commands
|
|
47
|
+
|
|
48
|
+
| Command | Alias | Description |
|
|
49
|
+
|---------|-------|-------------|
|
|
50
|
+
| `auth login` | - | Log in via browser (PKCE) or API key |
|
|
51
|
+
| `auth status` | - | Show current authentication status |
|
|
52
|
+
| `auth logout` | - | Log out and clear credentials |
|
|
53
|
+
| `agent list` | `agent ls` | List available agents |
|
|
54
|
+
| `agent info <name>` | - | Show agent details, skills, and MCP servers |
|
|
55
|
+
| `task create` | - | Create a task for an agent |
|
|
56
|
+
| `task send <id>` | - | Send a follow-up message to a task |
|
|
57
|
+
| `task status <id>` | - | Check task status |
|
|
58
|
+
| `task result <id>` | - | Get task result and file summary |
|
|
59
|
+
| `task files <id>` | - | List and download task artifacts |
|
|
60
|
+
| `task list` | `task ls` | List tasks |
|
|
61
|
+
| `task watch <id>` | - | Stream task execution in real-time (SSE) |
|
|
62
|
+
| `task cancel <id>` | - | Cancel a running task |
|
|
63
|
+
| `mcp serve` | - | Start MCP stdio server |
|
|
64
|
+
| `mcp list` | `mcp ls` | List available MCP servers |
|
|
65
|
+
| `mcp list-tools <id>` | - | List tools provided by an MCP server |
|
|
66
|
+
| `plugin install <name>` | - | Install an IDE plugin |
|
|
67
|
+
| `plugin update <name>` | - | Update an installed plugin |
|
|
68
|
+
| `plugin uninstall <name>` | - | Remove a plugin |
|
|
69
|
+
| `plugin list` | `plugin ls` | List available and installed plugins |
|
|
70
|
+
| `plugin status <name>` | - | Show plugin installation status |
|
|
71
|
+
| `plugin doctor [name]` | - | Diagnose plugin issues |
|
|
72
|
+
| `config show` | - | Show current configuration |
|
|
73
|
+
| `config set <key> <value>` | - | Set a config value (`api`, `collectMetrics`, `currentTeam`) |
|
|
74
|
+
| `config use <profile>` | - | Switch active profile |
|
|
75
|
+
| `config create <profile>` | - | Create a new profile |
|
|
76
|
+
| `config delete <profile>` | - | Delete a profile |
|
|
77
|
+
| `config list` | `config ls` | List all profiles |
|
|
78
|
+
| `completion install` | - | Auto-install shell completion |
|
|
79
|
+
| `completion bash\|zsh\|fish` | - | Print completion script |
|
|
80
|
+
| `doctor` | - | Run environment, auth, and connectivity diagnostics |
|
|
81
|
+
|
|
82
|
+
### Global Options
|
|
83
|
+
|
|
84
|
+
| Option | Description |
|
|
85
|
+
|--------|-------------|
|
|
86
|
+
| `--json` | Output as JSON (machine-readable) |
|
|
87
|
+
| `--ci` | CI mode: JSON output, no interactive prompts, strict exit codes |
|
|
88
|
+
| `--verbose` | Show detailed output including HTTP requests |
|
|
89
|
+
| `--debug` | Debug-level output (implies `--verbose`) |
|
|
90
|
+
| `--no-color` | Disable color output |
|
|
91
|
+
| `-f, --format <type>` | Output format: `table`, `json`, `csv` |
|
|
21
92
|
|
|
22
|
-
|
|
23
|
-
- 输出格式化(table / `--json` / `--stream`)
|
|
24
|
-
- 配置管理(`~/.rush/` 读写、token 存取)
|
|
25
|
-
- 错误处理(未认证提示、网络错误、API 错误码映射)
|
|
26
|
-
- stdin 管道输入解析
|
|
93
|
+
## Usage
|
|
27
94
|
|
|
28
|
-
|
|
95
|
+
### Authentication
|
|
29
96
|
|
|
30
97
|
```bash
|
|
31
|
-
|
|
98
|
+
# Browser login (PKCE flow — opens browser)
|
|
99
|
+
rush-ai auth login
|
|
100
|
+
|
|
101
|
+
# API key login
|
|
102
|
+
rush-ai auth login --api-key <key>
|
|
103
|
+
|
|
104
|
+
# Check status
|
|
105
|
+
rush-ai auth status --verify
|
|
32
106
|
```
|
|
33
107
|
|
|
34
|
-
###
|
|
108
|
+
### Working with Tasks
|
|
35
109
|
|
|
36
|
-
|
|
110
|
+
```bash
|
|
111
|
+
# Create a task
|
|
112
|
+
rush-ai task create -a rush -p "Add a contact form to the homepage"
|
|
37
113
|
|
|
38
|
-
|
|
114
|
+
# Stream output in real-time
|
|
115
|
+
rush-ai task watch <task-id>
|
|
39
116
|
|
|
40
|
-
|
|
41
|
-
-
|
|
117
|
+
# Get result and download files
|
|
118
|
+
rush-ai task result <task-id>
|
|
119
|
+
rush-ai task files <task-id> --download-all -o ./output
|
|
42
120
|
|
|
43
|
-
|
|
121
|
+
# Send follow-up message
|
|
122
|
+
rush-ai task send <task-id> -p "Change the button color to blue"
|
|
44
123
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- `task create` + `task status` + `task result` 异步链路
|
|
48
|
-
- SSE 流式输出(`task watch`)
|
|
124
|
+
# Pipe prompt from stdin
|
|
125
|
+
echo "Refactor the auth module" | rush-ai task create -a rush
|
|
49
126
|
|
|
50
|
-
|
|
127
|
+
# List recent tasks
|
|
128
|
+
rush-ai task list -l 10 -s completed
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Discovering Agents and MCP Servers
|
|
51
132
|
|
|
52
133
|
```bash
|
|
53
|
-
#
|
|
54
|
-
|
|
134
|
+
# Browse agents
|
|
135
|
+
rush-ai agent list
|
|
136
|
+
rush-ai agent info rush
|
|
55
137
|
|
|
56
|
-
|
|
138
|
+
# Browse MCP servers and their tools
|
|
139
|
+
rush-ai mcp list --search "database"
|
|
140
|
+
rush-ai mcp list-tools <server-id>
|
|
57
141
|
```
|
|
58
142
|
|
|
59
|
-
###
|
|
60
|
-
|
|
61
|
-
对真实环境做最终确认,验证完整 CLI 链路:`auth → agent list → task create → task result → task files → task list`。
|
|
143
|
+
### IDE Plugin Management
|
|
62
144
|
|
|
63
|
-
|
|
145
|
+
```bash
|
|
146
|
+
# Install plugin for Claude Code
|
|
147
|
+
rush-ai plugin install claude-code
|
|
64
148
|
|
|
65
|
-
|
|
66
|
-
-
|
|
149
|
+
# Check plugin health
|
|
150
|
+
rush-ai plugin doctor claude-code
|
|
67
151
|
|
|
68
|
-
|
|
152
|
+
# Update plugin
|
|
153
|
+
rush-ai plugin update claude-code --force
|
|
154
|
+
```
|
|
69
155
|
|
|
70
|
-
-
|
|
71
|
-
- 网络 / 鉴权 / 代理等环境相关的集成验证
|
|
72
|
-
- production build 模式下的 API 行为
|
|
156
|
+
### Multi-Profile Configuration
|
|
73
157
|
|
|
74
158
|
```bash
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
159
|
+
# Create profiles for different environments
|
|
160
|
+
rush-ai config create production --api https://rush.example.com
|
|
161
|
+
rush-ai config create staging --api https://rush-test.example.com
|
|
162
|
+
|
|
163
|
+
# Switch between profiles
|
|
164
|
+
rush-ai config use production
|
|
165
|
+
rush-ai config list
|
|
78
166
|
```
|
|
79
167
|
|
|
80
|
-
|
|
168
|
+
### CI/CD Integration
|
|
81
169
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
170
|
+
```bash
|
|
171
|
+
# Non-interactive auth via API key
|
|
172
|
+
RUSH_API_KEY=$KEY rush-ai task create -a rush -p "Run tests" --ci
|
|
173
|
+
|
|
174
|
+
# Script-friendly JSON output
|
|
175
|
+
rush-ai task status <id> --json | jq '.status'
|
|
176
|
+
|
|
177
|
+
# Pipe results
|
|
178
|
+
rush-ai task result <id> --json | jq -r '.result'
|
|
179
|
+
```
|
|
91
180
|
|
|
92
181
|
## Environment Variables
|
|
93
182
|
|
|
94
183
|
| Variable | Description | Default |
|
|
95
184
|
|----------|-------------|---------|
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `
|
|
185
|
+
| `RUSH_API_KEY` | API key for non-interactive auth (skips browser login) | - |
|
|
186
|
+
| `RUSH_API_URL` | API base URL override | `https://rush.zhenguanyu.com` |
|
|
187
|
+
| `RUSH_PROFILE` | Override active profile | - |
|
|
188
|
+
| `NO_COLOR` | Disable colored output | - |
|
|
189
|
+
| `DEBUG` | Enable debug logging | - |
|
|
99
190
|
|
|
100
|
-
##
|
|
191
|
+
## Configuration
|
|
101
192
|
|
|
102
|
-
|
|
193
|
+
Config files are stored in `~/.rush/`:
|
|
103
194
|
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
195
|
+
```
|
|
196
|
+
~/.rush/
|
|
197
|
+
├── auth.json # Credentials (token, refresh token, expiry)
|
|
198
|
+
├── config.json # Global settings (profiles, metrics, team)
|
|
199
|
+
└── plugins/
|
|
200
|
+
└── installed.json # Plugin manifest
|
|
108
201
|
```
|
|
109
202
|
|
|
110
|
-
|
|
203
|
+
## Development
|
|
111
204
|
|
|
112
205
|
```bash
|
|
113
|
-
|
|
114
|
-
|
|
206
|
+
# Install dependencies
|
|
207
|
+
pnpm install
|
|
115
208
|
|
|
116
|
-
|
|
209
|
+
# Build
|
|
210
|
+
pnpm --filter rush-ai build
|
|
117
211
|
|
|
118
|
-
|
|
119
|
-
pnpm --filter rush-ai
|
|
120
|
-
```
|
|
212
|
+
# Type check
|
|
213
|
+
pnpm --filter rush-ai typecheck
|
|
121
214
|
|
|
122
|
-
|
|
215
|
+
# Run unit tests
|
|
216
|
+
pnpm --filter rush-ai test
|
|
123
217
|
|
|
218
|
+
# Run E2E tests (requires web + agent: pnpm dev)
|
|
219
|
+
pnpm dev &
|
|
220
|
+
pnpm --filter rush-ai test:e2e
|
|
221
|
+
|
|
222
|
+
# Run smoke tests (against deployed environment)
|
|
223
|
+
RUSH_API_BASE_URL=https://rush-test.zhenguanyu.com \
|
|
224
|
+
RUSH_AUTH_TOKEN=$TOKEN \
|
|
225
|
+
pnpm --filter rush-ai test:smoke
|
|
124
226
|
```
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
│ ├── output/ # Output formatting (table, json, stream)
|
|
130
|
-
│ └── util/ # Shared utilities (client, config, auth, errors)
|
|
131
|
-
├── vitest.config.ts # L1 unit test config
|
|
132
|
-
├── vitest.e2e.config.ts # L2 e2e test config
|
|
133
|
-
├── vitest.smoke.config.ts # L3 smoke test config
|
|
134
|
-
└── package.json
|
|
135
|
-
```
|
|
227
|
+
|
|
228
|
+
## License
|
|
229
|
+
|
|
230
|
+
MIT
|
package/dist/chunk-MG4HY2PD.js
CHANGED
|
File without changes
|
package/dist/chunk-UJLVFMWM.js
CHANGED
|
File without changes
|
package/dist/client-NTECGN3O.js
CHANGED
|
File without changes
|