/copilot:setup [--model <id|number>] [--review-model <id|number>] [--task-model <id|number>] [--effort <level>] [--cost-warn-threshold <n>] [--enable-review-gate|--disable-review-gate]from copilot
Check whether the local Copilot CLI is ready, choose models, and manage the review gate
Ships in copilot. Installing the plugin adds it to Claude Code.
Raw slash-command arguments:
$ARGUMENTS
Before running anything, check the raw arguments for a bare model flag with no id after it — --model, --review-model, or --task-model, either as the last token or immediately followed by another --flag. The underlying script rejects a valueless flag outright (it throws Missing value for --model before any of your logic below can run), so this must be handled here first, without ever passing that bare flag through. Call the flag you found <bare-flag>; you must reuse that exact flag later, because --model sets both roles while --review-model and --task-model each set only one — substituting --model would silently change a role the user did not ask about.
--cwd <dir> if the original arguments carried one; --cwd is the only other option this subcommand takes.node "${CLAUDE_PLUGIN_ROOT}/scripts/copilot-companion.mjs" models
<bare-flag> from the arguments entirely, continue with the normal setup flow below including the install and authentication steps, and once setup reports Copilot is ready, run the models command again and resume this picker. If Copilot still is not ready, say so and stop; a model cannot be chosen without a roster.AskUserQuestion — the whole point of the table is that it lists every model, and an AskUserQuestion caps at four options.<bare-flag> will change: --review-model affects reviews only, --task-model affects rescue and transfer runs, --model affects both.<bare-flag> given that id as its value and every other original argument preserved. For example, if the user ran /copilot:setup --review-model --enable-review-gate and answered 4 on a table whose row 4 was mai-code-1-flash-picker:node "${CLAUDE_PLUGIN_ROOT}/scripts/copilot-companion.mjs" setup --json --review-model mai-code-1-flash-picker --enable-review-gate
Pass the id, not the number. A row number is an index into a catalog that can change between the moment the table was rendered and the moment setup resolves it — setup may refresh the roster itself — so a number can name a different model than the row the user read. The id is stable and cannot drift. The script does accept a row number, which is what makes --model 4 work when you run it directly from a shell straight after models, but nothing should send one across two separate invocations.
Run:
node "${CLAUDE_PLUGIN_ROOT}/scripts/copilot-companion.mjs" setup --json $ARGUMENTS
Use this JSON-mode result only to decide what to do next — it is not what you show the user (see "Final output" below).
If the result says Copilot is unavailable and npm is available:
AskUserQuestion exactly once to ask whether Claude should install Copilot now.(Recommended).Install Copilot CLI (Recommended)Skip for nownpm install -g @github/copilot.Final output:
$ARGUMENTS but WITHOUT --json:node "${CLAUDE_PLUGIN_ROOT}/scripts/copilot-companion.mjs" setup $ARGUMENTS
!copilot login.Files this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
8 commands in this plugin
/resultShow the stored final output for a finished Copilot job in this repositorynpx claudepluginhub hopchouinard/copilot-cli-plugin --plugin copilotOther plugins' commands for the same job