Skip to content
Development
Command

/setup

One-shot setup wizard — detects CLIs, configures Exa + Context7 MCPs on each

From plugin
cc-multi-cli-plugin
8811 skills11 agents11 commands
Install
$ npx -y skills add greenpolo/cc-multi-cli-plugin --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/setup

Context preview

What this command does when you run it.

One-shot setup wizard — detects CLIs, configures Exa + Context7 MCPs on each

Command definition

setup.md
description: One-shot setup wizard — detects CLIs, configures Exa + Context7 MCPs on each
argument-hint: "[--dry-run] [--enable-review-gate|--disable-review-gate]"
allowed-tools: Read, Edit, Write, Bash, AskUserQuestion

Review-gate toggle (short-circuit)

If `$ARGUMENTS` contains `--enable-review-gate` or `--disable-review-gate`, this is a review-gate toggle, NOT a full setup run. Do ONLY this, then stop:

node "${CLAUDE_PLUGIN_ROOT}/scripts/multi-cli-companion.mjs" setup --json $ARGUMENTS

Present the resulting status (it reflects the new review-gate state) and do not run any of the wizard steps below.

---

You are running the setup wizard for cc-multi-cli-plugin. Work through these steps in order, using your native tools. Do NOT invoke subagents. Do NOT run the plugin's companion scripts (except the review-gate short-circuit above and the Antigravity detection probe noted in Step 1).

If the user passed `--dry-run` anywhere in $ARGUMENTS, enumerate changes but make NO writes.

Step 1 — Detect installed CLIs

This plugin supports four CLIs: **Codex**, **Cursor**, **Antigravity**, and **OpenCode**.

Run each probe via Bash:

  • `codex --version`
  • Cursor: the binary is named `agent` (not `cursor-agent`). Try `agent --version` first. On Windows the installer does NOT add it to PATH — always fall back to `$LOCALAPPDATA/cursor-agent/agent.cmd --version` (a.k.a. `C:/Users/<name>/AppData/Local/cursor-agent/agent.cmd`). Remember whichever path works; use it throughout the rest of setup.
  • Antigravity: the binary is `agy` (Google's Antigravity CLI). Try `agy --version`. On Windows the installer drops it at `$LOCALAPPDATA/agy/bin/agy.exe` and may not add it to PATH. The companion's setup probe (`node "${CLAUDE_PLUGIN_ROOT}/scripts/multi-cli-companion.mjs" setup --json`) reports whether `agy` is detected. (EXPERIMENTAL; read-only research/explore only.)
  • OpenCode: the binary is `opencode`. Try `opencode --version`. On Windows, npm installs a `.cmd` shim; a stale bun `opencode.exe` in PATH may shadow it — the adapter resolves only the `.cmd` shim, never the `.exe`. Install via `npm install -g opencode-ai`.

Tabulate which succeed. For each failure, tell the user the install command:

  • Codex: `npm install -g @openai/codex`
  • Cursor: `curl https://cursor.com/install -fsS | bash` (Unix) or `irm 'https://cursor.com/install?win32=true' | iex` (Windows PowerShell). After install, the binary lives at `$LOCALAPPDATA/cursor-agent/agent.cmd` on Windows and is not on PATH.
  • Antigravity: install the **`agy` CLI** from https://antigravity.google, then run `agy` once interactively to sign in with your Google account. The desktop app is not required.
  • OpenCode: `npm install -g opencode-ai`.

Continue only with the CLIs that are installed. Do not block on missing ones.

**No CLIs detected:** if none of Codex, Cursor, `agy`, or `opencode` is installed, ABORT setup before any further step. Do not prompt for API keys, do not install plugins, do not configure MCPs. Print:

> *"None of Codex, Cursor, Antigravity, or OpenCode is available. Install at least one (commands above) and re-run `/multi:setup`. Nothing was changed."*

Then exit. The wizard has no productive work without at least one CLI to configure.

Step 1.5 — Ensure the CLI-specific plugins are installed (idempotent)

For each detected CLI, check the current install state FIRST, then act:

1. **Check what's already installed** via Bash:

   claude plugin list 2>&1 | grep "@cc-multi-cli-plugin" || true

The `|| true` is required: `grep` exits 1 when the marketplace has no plugins installed yet (clean first run), and an exit-1 in a piped command can torpedo subsequent commands or be misread as an error. Treat the (possibly empty) stdout as a state signal, not as an error.

2. **For each detected CLI whose plugin is NOT yet installed**, and ONLY for those, use `AskUserQuestion` to ask whether to install it. Skip the prompt entirely if the plugin is already installed — don't ask the user about plugins they already have.

3. **Install only the plugins the user accepted.** Read the actual command list from `marketplace.json` plus the live filesystem (`ls plugins/<cli>/commands/*.md`) — do NOT hardcode a list here, since the customize skill and `multi-cli-anything` skill add commands routinely. As of v3.0.0 defaults, the shipped commands are:

  • Codex → `claude plugin install codex@cc-multi-cli-plugin` (adds `/codex:execute`, `/codex:rescue`, `/codex:review`, `/codex:adversarial-review`)
  • Cursor → `claude plugin install cursor@cc-multi-cli-plugin` (adds `/cursor:delegate`, `/cursor:research`, `/cursor:explore`)
  • Antigravity → `claude plugin install antigravity@cc-multi-cli-plugin` (adds `/antigravity:research`, `/antigravity:explore`)
  • OpenCode → `claude plugin install opencode@cc-multi-cli-plugin` (adds `/opencode:delegate`, `/opencode:research`, `/opencode:explore`)

When announcing what each install will provide, list the actual `commands/*.md` files in that plugin directory rather than the static list above (which can drift).

4. **Report** at the end of Step 1.5:

  • `✓ <cli>: already installed` for plugins that were already there (no action taken)
  • `✓ <cli>: installed` for plugins the user accepted and just installed
  • `⚠ <cli>: skipped` for plugins the user declined
  • `✗ <cli>: install failed — <error>` for any failures (continue regardless)

**Why this matters:** `claude plugin install` is destructive — it re-fetches and overwrites the cache even for already-installed plugins. Running installs on things already present wastes time and can disrupt active development setups. Guarding with the initial check makes `/multi:setup` safely re-runnable.

Step 1.7 — Offer to add CLI binaries to the user's PATH (optional)

**Purpose:** Pure UX. The plugin works regardless — each adapter resolves binaries via absolute path. This step is for users who want to type `agent` / `codex` / `

Read more
Ships withcc-multi-cli-plugin

If you have access to multiple AI coding CLIs (Codex, Cursor, Antigravity, and OpenCode), this plugin lets Claude Code delegate to whichever one is best for the task — without you having to switch tools or run them yourself.

Get the whole plugin, auto-invoked
Stats
88
Stars
0
Views
7
Forks
Active
Maintenance
JavaScript
Language
Apache-2.0
License
4d ago
Last commit
4mo ago
Created

Repo: greenpolo/cc-multi-cli-plugin