@cg3/equip 0.2.8 → 0.2.9
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 +43 -2
- package/bin/equip.js +26 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,17 +6,35 @@ Equip handles the hard part of distributing your MCP tool: detecting which AI co
|
|
|
6
6
|
|
|
7
7
|
## Supported Platforms
|
|
8
8
|
|
|
9
|
+
Equip supports **11 platforms** across two tiers, depending on whether the platform has a writable location for behavioral rules.
|
|
10
|
+
|
|
11
|
+
### Full Support — MCP + Behavioral Rules
|
|
12
|
+
|
|
13
|
+
These platforms get both MCP server config *and* auto-installed behavioral rules. Rules teach agents *when* to use your tool (e.g., "search before debugging") and are versioned for idempotent updates.
|
|
14
|
+
|
|
9
15
|
| Platform | MCP Config | Rules |
|
|
10
16
|
|---|---|---|
|
|
11
17
|
| Claude Code | `~/.claude.json` (JSON, `mcpServers`) | `~/.claude/CLAUDE.md` (append) |
|
|
12
|
-
| Cursor | `~/.cursor/mcp.json` (JSON, `mcpServers`) | Clipboard (no writable global path) |
|
|
13
18
|
| Windsurf | `~/.codeium/windsurf/mcp_config.json` (JSON, `mcpServers`) | `global_rules.md` (append) |
|
|
14
|
-
| VS Code | `Code/User/mcp.json` (JSON, `servers`, `type: "http"`) | Clipboard |
|
|
15
19
|
| Cline | `globalStorage/.../cline_mcp_settings.json` (JSON, `mcpServers`) | `~/Documents/Cline/Rules/` (standalone file) |
|
|
16
20
|
| Roo Code | `globalStorage/.../cline_mcp_settings.json` (JSON, `mcpServers`) | `~/.roo/rules/` (standalone file) |
|
|
17
21
|
| Codex | `~/.codex/config.toml` (TOML, `mcp_servers`) | `~/.codex/AGENTS.md` (append) |
|
|
18
22
|
| Gemini CLI | `~/.gemini/settings.json` (JSON, `mcpServers`, `httpUrl`) | `~/.gemini/GEMINI.md` (append) |
|
|
19
23
|
|
|
24
|
+
### MCP Only — No Writable Rules Path
|
|
25
|
+
|
|
26
|
+
These platforms get MCP server config but don't have a writable global rules file (`rulesPath: null`). The MCP tools work fine — but equip can't auto-install behavioral rules.
|
|
27
|
+
|
|
28
|
+
| Platform | MCP Config |
|
|
29
|
+
|---|---|
|
|
30
|
+
| Cursor | `~/.cursor/mcp.json` (JSON, `mcpServers`) |
|
|
31
|
+
| VS Code | `Code/User/mcp.json` (JSON, `servers`, `type: "http"`) |
|
|
32
|
+
| Junie (JetBrains) | `~/.junie/mcp/mcp.json` (JSON, `mcpServers`) |
|
|
33
|
+
| Copilot (JetBrains) | `~/.config/github-copilot/intellij/mcp.json` (JSON, `mcpServers`) |
|
|
34
|
+
| Copilot CLI | `~/.copilot/mcp-config.json` (JSON, `mcpServers`) |
|
|
35
|
+
|
|
36
|
+
For these platforms, `installRules()` returns `{ action: "clipboard" }` if the platform is in the configurable `clipboardPlatforms` list (default: `["cursor", "vscode"]`), or `{ action: "skipped" }` otherwise. It's up to the consumer to decide how to handle this — e.g., copying rules to the clipboard, printing instructions, or skipping silently.
|
|
37
|
+
|
|
20
38
|
## Quick Start
|
|
21
39
|
|
|
22
40
|
```bash
|
|
@@ -25,6 +43,28 @@ npx @cg3/equip prior
|
|
|
25
43
|
|
|
26
44
|
That's it. Detects your platforms, authenticates, installs MCP + rules, and verifies — all in one command. Pass `--dry-run` to preview without writing files.
|
|
27
45
|
|
|
46
|
+
## CLI Usage
|
|
47
|
+
|
|
48
|
+
You can invoke any npm package that has an equip-based setup command:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Full package name + command
|
|
52
|
+
npx @cg3/equip @cg3/prior-node setup
|
|
53
|
+
|
|
54
|
+
# Shorthand (if registered)
|
|
55
|
+
npx @cg3/equip prior
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The CLI runs `npx -y <package>@latest <command>` with any extra args forwarded (e.g. `--dry-run`, `--platform codex`).
|
|
59
|
+
|
|
60
|
+
### Shorthand Registry
|
|
61
|
+
|
|
62
|
+
Registered shorthands save typing. Open a PR to `bin/equip.js` to add yours:
|
|
63
|
+
|
|
64
|
+
| Shorthand | Expands to |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `prior` | `@cg3/prior-node setup` |
|
|
67
|
+
|
|
28
68
|
## Programmatic Usage
|
|
29
69
|
|
|
30
70
|
```js
|
|
@@ -94,6 +134,7 @@ const { detectPlatforms, installMcpJson, installRules, createManualPlatform, pla
|
|
|
94
134
|
## Key Features
|
|
95
135
|
|
|
96
136
|
- **Zero dependencies** — Pure Node.js, works with Node 18+
|
|
137
|
+
- **11 platforms** — Covers ~80% of active AI coding tool users
|
|
97
138
|
- **Platform-aware** — Handles each platform's config quirks (JSON vs TOML, root keys, URL fields, type requirements)
|
|
98
139
|
- **Non-destructive** — Merges into existing configs, creates backups, preserves other servers
|
|
99
140
|
- **Versioned rules** — Marker-based blocks enable idempotent updates without clobbering user content
|
package/bin/equip.js
CHANGED
|
@@ -36,10 +36,33 @@ if (!alias || alias === "--help" || alias === "-h") {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
const entry = TOOLS[alias];
|
|
39
|
+
|
|
40
|
+
// No registry match — treat as a package name (e.g. "@scope/pkg setup")
|
|
39
41
|
if (!entry) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
const pkg = alias;
|
|
43
|
+
const command = extraArgs.shift(); // first extra arg is the command
|
|
44
|
+
if (!command) {
|
|
45
|
+
console.error(`Usage: npx @cg3/equip <package> <command> [options]`);
|
|
46
|
+
console.error(` or: npx @cg3/equip <shorthand> [options]`);
|
|
47
|
+
console.error("");
|
|
48
|
+
console.error("Registered shorthands:");
|
|
49
|
+
for (const [name, info] of Object.entries(TOOLS)) {
|
|
50
|
+
console.log(` ${name} → ${info.package} ${info.command}`);
|
|
51
|
+
}
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
const npxCmd = process.platform === "win32" ? "npx.cmd" : "npx";
|
|
55
|
+
const child = spawn(npxCmd, ["-y", `${pkg}@latest`, command, ...extraArgs], {
|
|
56
|
+
stdio: "inherit",
|
|
57
|
+
shell: process.platform === "win32",
|
|
58
|
+
env: { ...process.env, EQUIP_VERSION },
|
|
59
|
+
});
|
|
60
|
+
child.on("close", (code) => process.exit(code || 0));
|
|
61
|
+
child.on("error", (err) => {
|
|
62
|
+
console.error(`Failed to run ${pkg}: ${err.message}`);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
});
|
|
65
|
+
return;
|
|
43
66
|
}
|
|
44
67
|
|
|
45
68
|
// Spawn: npx -y <package> <command> [...extraArgs]
|