feat(cli): rename map setup to setup agents; write OpenCode config too - #3619
Merged
Merged
Conversation
…g too Two corrections to the command added in #3618. ## The name has to avoid the literal token `mcp` #3618 shipped `wheels map setup`, chosen because LuCLI owns the `mcp` verb at the runtime level. That was right but incomplete: the runtime intercepts the bare token `mcp` in ANY argument position, not just argv[1]. Verified live: wheels setup mcp -> mcp: missing module name. Usage: wheels mcp <module> wheels info mcp -> same wheels setup ai -> Usage: ai [-hV] [COMMAND] (`ai` is reserved too) wheels setup bogus -> my handler ("Unknown setup target: bogus") So no argument may be spelled `mcp`, which rules out `setup mcp` entirely. The target is now `agents`: reads as "set this app up for AI agents", and avoids the token. `wheels map setup` keeps working as a thin forwarder — that spelling is in snapshot 2499 — and both entry points stay in mcpHiddenTools() (an assistant provisioning its own config is a side-effecting setup step, not a query, so tools/list stays at 19). ## It now writes both client configs The wrapper's own `wheels mcp` help has always promised that setup generates `.mcp.json` (Claude Code) AND `.opencode.json` (OpenCode), and #3618 only did the first. Both are written now, in each client's own shape — Claude Code takes `mcpServers` with separate `command`/`args`; OpenCode takes an `mcp` key, `type: "local"`, and command+args as ONE array. Every file is validated BEFORE any is written, so a malformed `.opencode.json` cannot leave a half-applied setup with `.mcp.json` already rewritten. `$mcpEntryMatches()` compares only the fields setup owns, so a hand-added `environment` (or any other client key) on the wheels entry does not make setup consider it wrong and rewrite on every run. CLI suite: 1385 pass, 0 error, 0 real failures. Complexity gate: PASS. Consumer-docs check: OK. Signed-off-by: Peter Amiri <peter@alurium.com>
bpamiri
added a commit
to wheels-dev/homebrew-wheels
that referenced
this pull request
Sep 15, 2026
…up` (#587) Follow-up to #585, which renamed the Other: entry to `map`. Two problems. 1. `wheels map setup` is now `wheels setup agents` (wheels-dev/wheels#3619). The reason is worth recording: LuCLI intercepts the literal token `mcp` in ANY argument position, not just argv[1], so `wheels setup mcp` cannot work no matter how it is spelled — and neither can `wheels info mcp`. The target is `agents` to avoid the token entirely. 2. The `mcp` help block claimed a `setup` action: Usage: wheels mcp [setup|wheels] setup Generate .mcp.json (Claude Code) and .opencode.json in cwd That was never routable: `wheels mcp setup` is resolved as "run module setup" and answers "mcp: module not found: 'setup'". It is the specific text that sent a user to a dead command. The block now documents what `mcp` actually does and points at `wheels setup agents`. Help text only; the auto-update workflows sed just the version/sha lines, so this survives future bumps. Both formulas, `ruby -c` clean. Signed-off-by: Peter Amiri <peter@alurium.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two corrections to the command added in #3618.
The name has to avoid the literal token
mcp#3618 shipped
wheels map setupbecause LuCLI owns themcpverb. That was right but incomplete: the runtime intercepts the bare tokenmcpin ANY argument position, not justargv[1]. Verified live:wheels setup mcpmcp: missing module name. Usage: wheels mcp <module>wheels info mcpargv[1]-onlywheels setup aiUsage: ai [-hV] [COMMAND]—aiis reserved toowheels setup bogusUnknown setup target: bogusSo no argument may be spelled
mcp, which rules outsetup mcpentirely. The target is nowagents— reads as "set this app up for AI agents" and avoids the token.wheels map setupkeeps working as a thin forwarder (that spelling is in snapshot 2499). Both entry points stay inmcpHiddenTools()— an assistant provisioning its own config is a side-effecting setup step, not a query — sotools/liststays at 19.It now writes both client configs
The wrapper's own
wheels mcphelp has always promised setup generates.mcp.json(Claude Code) and.opencode.json(OpenCode); #3618 only did the first. Both are written now, each in its client's own shape — Claude Code takesmcpServerswith separatecommand/args, OpenCode takes anmcpkey,type: "local", and command+args as one array.Safety properties, each tested:
.opencode.jsoncannot leave a half-applied setup with.mcp.jsonalready rewrittenpostgres,sqlite, a customthemekey all survived)$mcpEntryMatches()compares only the fields setup owns, so a hand-addedenvironmenton the wheels entry doesn't trigger a rewrite every runCLI suite: 1385 pass, 0 error, 0 real failures. Complexity gate: PASS. Consumer-docs check: OK.