feat(cli): add install and docker subcommands#122
Merged
Conversation
Add MCP client installation and Docker management commands: Install subcommand (gitlab-mcp install): - Auto-detect 7 MCP clients: Claude Desktop, Claude Code, Cursor, VS Code Copilot, Windsurf, Cline, Roo Code - Interactive wizard for client selection - Automatic backup before config modification - Support for --all, --show, --force flags - Client-specific flags: --claude-desktop, --cursor, etc. Docker subcommand (gitlab-mcp docker): - status: Show container and instances status - init: Interactive Docker configuration setup - start/stop/restart: Container lifecycle management - upgrade: Pull latest image and restart - logs: View container logs with -f/--follow support - add-instance/remove-instance: GitLab instance management - Generate docker-compose.yml with OAuth support - Multi-instance configuration via instances.yaml
📊 Test Coverage ReportOverall Coverage: 91.19% Coverage Details
Coverage Report: View detailed coverage report
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Pull request overview
This PR implements Phase 2 (MCP Client Installation) and Phase 3 (Docker + OAuth) by adding gitlab-mcp install and gitlab-mcp docker subcommands to automate configuration for 7 MCP clients and manage Docker container lifecycle.
Changes:
- Added
installsubcommand with interactive wizard and CLI flags for automated MCP client configuration - Added
dockersubcommand with 9 operations (status, init, start, stop, restart, upgrade, logs, add-instance, remove-instance) - Added comprehensive unit tests for both modules (all 3222 tests passing)
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.ts | Integrated new install and docker subcommands into CLI routing |
| src/cli-utils.ts | Extended CLI argument parser to handle install and docker subcommands |
| src/cli/install/* | Complete install module with types, detector, backup, installers, and command handler |
| src/cli/docker/* | Complete docker module with types, utilities, and command handler |
| tests/unit/cli/install/* | Comprehensive unit tests for install module |
| tests/unit/cli/docker/* | Comprehensive unit tests for docker module |
| tests/unit/cli-utils.test.ts | Extended tests for new CLI arguments |
- Remove sensitive OAuth client_id logging (CodeQL security alert) - Add tests for docker command handlers (showStatus, dockerStart, etc.) - Add tests for docker utils (isDockerInstalled, getContainerInfo, etc.)
- Add containerName validation in docker-utils to prevent command injection - Replace process.exit() with return/throw in install-command and docker-command - Check mcp remove command result in installers before proceeding with add - Extract expandPath to src/cli/utils/path-utils.ts shared module - Add tests for detector, installers, and path-utils modules
Add comprehensive tests for: - All client installers (vscode-copilot, windsurf, cline, roo-code) - Config path unavailable error paths - Container status parsing (paused, restarting, created, dead) - Docker compose v1 fallback - Error handling in runComposeCommand - Instance update functionality
Add tests for runInstallCommand and runInstallWizard functions with mocked @clack/prompts for interactive CLI flows. Add tests for initDocker and dockerAddInstance functions covering Docker status checks, OAuth configuration, and container management flows.
|
🎉 This PR is included in version 6.29.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
3 tasks
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
Implements Phase 2 (MCP Client Installation) and Phase 3 (Docker + OAuth) from #100.
gitlab-mcp installcommand for automated MCP client configurationgitlab-mcp dockersubcommands for container lifecycle managementInstall Command
Docker Command
Test plan
Closes #100