Skip to content

fix: resolve 7 init/re-init CLI bugs - #110

Merged
etylsarin merged 1 commit into
mainfrom
fix/init-reinit-bugs
Apr 20, 2026
Merged

fix: resolve 7 init/re-init CLI bugs#110
etylsarin merged 1 commit into
mainfrom
fix/init-reinit-bugs

Conversation

@etylsarin

Copy link
Copy Markdown
Collaborator

Changes

Fixes 7 bugs in the opencastle init / re-init flow:

  1. IDE switch cleanup — asks user before removing old IDE files when switching IDEs (default: keep)
  2. Re-init pre-selection — pre-selects tools from existing manifest stack (e.g. Linear stays selected)
  3. MCP server preservation — no longer deletes existing MCP configs on re-init; merge logic adds missing servers only
  4. Testing config doubling — strips existing Test frameworks/Config files sections before re-adding (idempotent)
  5. Vitest forced inclusionmergeStackIntoRepoInfo now overrides testing array from user selection
  6. MCP auth wiring — adds ${VAR_NAME} env expansion for non-VS Code IDEs; offers to append missing .env vars
  7. Claude Code MCP path — changed from .claude/mcp.json to .mcp.json per official Claude Code docs

Files changed

  • src/cli/init.ts — bugs 1, 2, 3, 6
  • src/cli/bootstrap.ts — bug 4
  • src/cli/detect.ts — bug 5
  • src/cli/mcp.ts — bugs 6, 7
  • src/cli/adapters/claude-code.ts — bug 7
  • src/cli/init.test.ts — updated 3 assertions for .mcp.json path

Testing

All 1489 tests pass (45 test files).

- Ask user before removing old IDE files on IDE switch (default: keep)
- Pre-select tools from existing manifest on re-init
- Preserve existing MCP servers instead of deleting on re-init
- Make testing-config.md population idempotent (no doubling)
- Override testing array from user selection (vitest not forced)
- Add env var wiring for non-VS Code MCP configs
- Change Claude Code MCP path to .mcp.json per official docs
@etylsarin
etylsarin merged commit 310550f into main Apr 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant