feat(mcp): --with-output-style auto-activates the style (no manual /style needed)#39
Merged
Merged
Conversation
User feedback: "man, keeba install should take care of this honestly" after their interactive Claude Code session rejected `/output-style keeba` and `/style keeba` as Unknown commands. Diagnosis: Claude Code v2.x removed (or renamed) the per-session output-style slash command. The only stable activation surface across versions is `outputStyle: "<name>"` in ~/.claude/settings.json. Without flipping that key, --with-output-style was a UX cliff: the file landed on disk, the user had no way to activate it, and every session kept emitting the chatty default style. Fix: install now does both halves automatically. After dropping ~/.claude/output-styles/keeba.md, it sets outputStyle=keeba in ~/.claude/settings.json, preserving every other key (theme, hooks, effortLevel — critical because the install just registered the UserPromptSubmit hook in the same hooks block). Idempotent on both halves. Re-running prints "no change" for the file path, the style activation, and the MCP server registration. Tests: fresh-file creation, preserves-other-keys (with realistic hooks block), idempotent re-run, overwrites-different-style. End-to-end install against a synthetic HOME confirms settings.json picks up outputStyle=keeba while keeping theme + effortLevel + everything else. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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.
Summary
keeba mcp install --with-output-stylenow also flipsoutputStyle: \"keeba\"in~/.claude/settings.jsonso the style is active on the next Claude Code launch without the user typing any slash command. Closes the UX cliff where the install dropped the file on disk but the style was never actually used.Why
Real user report from a v2.1.126 session:
Claude Code v2.x removed (or renamed) the per-session output-style slash command. The settings.json
outputStylekey is the only stable activation surface across versions — confirmed by inspecting the binary (outputStyle:OH?.outputStylein localSettings save path).Until this PR,
--with-output-styleleft users with a file on disk and no way to activate it. The terse style we shipped in PR #35 + the inter-tool-silence rule in PR #38 did nothing for them.How
Adds
activateKeebaOutputStyle(settingsPath string) (bool, error):~/.claude/settings.json(or starts empty if missing)outputStyle: \"keeba\", preserving every other key(false, nil)if already set to "keeba"Wired into
applyClaudeCodePatchesafterinstallKeebaOutputStyleso re-running install prints "no change" cleanly when both halves are already done.Test plan
go test ./internal/cli/...— green (4 new tests: fresh-file, preserves-existing-keys-including-hooks, idempotent, overwrites-different-style)gofumpt -lclean,golangci-lint run0 issuessettings.jsonwiththeme + effortLevelkeeba mcp install --tool claude-code --with-output-styleruns{theme, effortLevel, outputStyle: \"keeba\"}— all three preservedWhat this means for users
After merge + reinstall:
No
/output-styleor/styleactivation needed. The install is the install.🤖 Generated with Claude Code