Skip to content

feat(cli): add install and docker subcommands#122

Merged
polaz merged 9 commits intomainfrom
feat/#100-featcli-mcp-client-installation--docker-oauth
Jan 22, 2026
Merged

feat(cli): add install and docker subcommands#122
polaz merged 9 commits intomainfrom
feat/#100-featcli-mcp-client-installation--docker-oauth

Conversation

@polaz
Copy link
Copy Markdown
Member

@polaz polaz commented Jan 22, 2026

Summary

Implements Phase 2 (MCP Client Installation) and Phase 3 (Docker + OAuth) from #100.

  • Add gitlab-mcp install command for automated MCP client configuration
  • Add gitlab-mcp docker subcommands for container lifecycle management
  • Support 7 MCP clients: Claude Desktop, Claude Code, Cursor, VS Code Copilot, Windsurf, Cline, Roo Code

Install Command

# Interactive wizard
gitlab-mcp install

# Install to specific clients
gitlab-mcp install --claude-desktop --cursor

# Install to all detected clients
gitlab-mcp install --all

# Show config without installing
gitlab-mcp install --show

# Force overwrite existing config
gitlab-mcp install --force

Docker Command

gitlab-mcp docker status           # Show container and instances status
gitlab-mcp docker init             # Initialize Docker configuration
gitlab-mcp docker start            # Start container
gitlab-mcp docker stop             # Stop container
gitlab-mcp docker restart          # Restart container
gitlab-mcp docker upgrade          # Pull latest image and restart
gitlab-mcp docker logs [-f]        # View container logs
gitlab-mcp docker add-instance     # Add GitLab instance
gitlab-mcp docker remove-instance  # Remove GitLab instance

Test plan

  • Unit tests for install module (types, detector, backup, installers, command)
  • Unit tests for docker module (types, utils, command)
  • All 3222 tests passing
  • Lint passes
  • Build passes

Closes #100

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
Copilot AI review requested due to automatic review settings January 22, 2026 15:50
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 22, 2026

📊 Test Coverage Report

Overall Coverage: 91.19%

Coverage Details

Metric Percentage
Statements 91.19%
Branches 83.11%
Functions 80.5%
Lines 91.57%

Coverage Report: View detailed coverage report

This report was generated automatically from your PR changes.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 install subcommand with interactive wizard and CLI flags for automated MCP client configuration
  • Added docker subcommand 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

polaz added 4 commits January 22, 2026 18:05
- 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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 5 comments.

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
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.

polaz added 2 commits January 22, 2026 19:04
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.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 26 out of 26 changed files in this pull request and generated no new comments.

@polaz polaz enabled auto-merge (squash) January 22, 2026 17:13
@polaz polaz merged commit 36d38d0 into main Jan 22, 2026
14 checks passed
@polaz polaz deleted the feat/#100-featcli-mcp-client-installation--docker-oauth branch January 22, 2026 17:15
sw-release-bot bot pushed a commit that referenced this pull request Jan 22, 2026
## [6.29.0](v6.28.0...v6.29.0) (2026-01-22)

### Features

* **cli:** add install and docker subcommands ([#122](#122)) ([36d38d0](36d38d0)), closes [#100](#100)
@sw-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 6.29.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): MCP Client Installation & Docker OAuth

3 participants