Skip to content

[Bug] init always writes project-local .mcp.json / .vscode/mcp.json, even with --no-editor-setup #1117

Description

@alex-systellar

Describe the Bug

repowise init always merges a repowise entry into the repo-root .mcp.json and writes .vscode/mcp.json, with no way to opt out. --index-only, all --no-* flags, REPOWISE_SKIP_EDITOR_SETUP=1, and even the new --no-editor-setup (#1086) don't stop it — that flag only gates the machine-wide register_editor_clients path, while write_editor_project_files() still runs unconditionally in init_cmd/command.py.

This breaks running init as an automated setup step (e.g. on git worktree creation): every run leaves a dirty working tree, and repos that commit a hand-maintained .mcp.json get an unwanted diff each time.

Steps to Reproduce

  1. In a clean repo, export REPOWISE_SKIP_EDITOR_SETUP=1
  2. Run repowise init --index-only --no-workspace --no-claude-md --no-agents --no-codex --no-distill-hook --yes
  3. Run git status

Expected Behavior

With --index-only plus the opt-out flags/env, init writes only .repowise/ and leaves the working tree untouched.

Actual Behavior

Repo-root .mcp.json is modified (a repowise entry merged into mcpServers) and .vscode/mcp.json is created. Nothing prevents it.

Environment

  • OS: macOS 26.4 (25E246)
  • Python version: 3.12.13
  • Repowise version: 0.36.0
  • Installation method: pip (--user)

Additional Context

I think with worktrees it's important to have a clean non-interactive init flag for setup bash scripts to init repowise

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions