Skip to content

feat: add githits init command for MCP server setup - #5

Merged
nathanBurg merged 1 commit into
mainfrom
jlitola/init-command
Apr 16, 2026
Merged

feat: add githits init command for MCP server setup#5
nathanBurg merged 1 commit into
mainfrom
jlitola/init-command

Conversation

@jlitola

@jlitola jlitola commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds interactive githits init command that scans for installed coding agents (Claude Code, Cursor, Windsurf, Claude Desktop, Codex CLI), lets users select which to configure, and sets up GitHits MCP server for each with confirmation
  • Uses CLI-based setup for agents with native commands (claude, codex) and atomic config file writes (temp + rename) for others to prevent corruption
  • Full DI with ExecService, PromptService, FileSystemService for safe testing — config file operations are extensively tested with edge cases (BOM, malformed JSON, permissions, idempotency)
  • Does not require auth — creates lightweight deps independently of createContainer()

Test plan

  • 312 tests pass (8 new test files covering agent definitions, setup handlers, and orchestrator)
  • TypeScript typecheck clean
  • Platform-specific tests for Claude Desktop paths (darwin, linux, win32, APPDATA fallback)
  • Manual end-to-end test on at least one agent before merge

🤖 Generated with Claude Code

Interactive command that scans for installed coding agents (Claude Code,
Cursor, Windsurf, Claude Desktop, Codex CLI), lets users select which to
configure, and sets up each with confirmation.

Key design decisions:
- CLI-based setup for agents with native commands (claude, codex)
- Atomic config file writes (temp + rename) for others to prevent corruption
- Full DI with ExecService, PromptService, FileSystemService for safe testing
- Pure mergeServerConfig() for JSON operations, extensively tested
- Does not require auth — uses lightweight deps, not createContainer()
- Only catches ExitPromptError (Ctrl+C), rethrows unexpected errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@nathanBurg
nathanBurg merged commit c76f017 into main Apr 16, 2026
5 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.

2 participants