rush-ai 0.12.0 → 0.12.1
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 +19 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -237,6 +237,25 @@ rush-ai mcp uninstall octopus-cli-mcp
|
|
|
237
237
|
|
|
238
238
|
stdio MCP 写入 `claude_desktop_config.json`;http/sse MCP 写入 `configLibrary`(managed server,工具自动 allow)。安装后需重启 IDE 生效。
|
|
239
239
|
|
|
240
|
+
#### Node runtime / 非交互式调用
|
|
241
|
+
|
|
242
|
+
在 Node.js 脚本或 CI 中调用时,用 `-y` 跳过交互,`--set` 传入凭证,`--json` 获取结构化输出:
|
|
243
|
+
|
|
244
|
+
```javascript
|
|
245
|
+
const { execSync } = require('child_process');
|
|
246
|
+
const result = JSON.parse(
|
|
247
|
+
execSync(
|
|
248
|
+
'rush-ai mcp install bigdata-mcp-server -y --set refresh_token=xxx groups=basic --target claude-desktop --json'
|
|
249
|
+
).toString()
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
if (result.targets[0].status === 'ok') {
|
|
253
|
+
console.log('Installed to:', result.targets[0].configPath);
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
未验证的 MCP 在非交互模式下需要加 `--allow-unverified`,否则会报错退出。
|
|
258
|
+
|
|
240
259
|
### CI / 脚本
|
|
241
260
|
|
|
242
261
|
```bash
|