Skip to content

New Setup Wizard: init and remove Commands#40

Open
HarshCasper wants to merge 2 commits into
mainfrom
feat/setup-wizard
Open

New Setup Wizard: init and remove Commands#40
HarshCasper wants to merge 2 commits into
mainfrom
feat/setup-wizard

Conversation

@HarshCasper

@HarshCasper HarshCasper commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

  • add an interactive setup wizard: npx -y @localstack/localstack-mcp-server init configures the MCP server in Cursor, Claude Code, Claude Desktop, VS Code, Codex, OpenCode, and Amazon Q/Kiro CLI; remove uninstalls it
  • guide the user through install method (npx or Docker image), prerequisite checks, auth token, optional LocalStack config vars, and client selection with auto-detection
  • support a non-interactive flags mode (--method, --client, --token, --config, --force, --yes) for scripts and dotfiles
  • keep existing setups untouched: no-arg invocation still starts the stdio server (guarded by a new CI handshake test), and the wizard only manages the MCP entry named localstack
  • bundle @clack/prompts + jsonc-parser via esbuild into dist/cli.js — no new runtime dependencies
  • add unit tests for all wizard logic and client adapters, extend MCP direct tests, update README

Note

The Docker install method references the localstack/localstack-mcp-server image, so this should merge after #36 lands and the image is on Docker Hub.

Interactive installer shipped inside the package (npx -y @localstack/localstack-mcp-server init):
- npx or Docker install method, prereq checks (warn-and-continue), masked token prompt with env fallback
- extra LocalStack config vars (KEY=value,KEY2=value2) forwarded via the env block
- detects and configures Cursor, Claude Code, Claude Desktop, VS Code, Codex, OpenCode, Amazon Q/Kiro CLI
- server entry named 'localstack'; legacy 'localstack-mcp-server' entries are migrated on install and cleaned by remove
- conflict detection with confirm-overwrite (--force to skip), full non-interactive flags mode (--method/--client/--token/--config/--yes)
- launcher dispatch keeps zero regression: no-arg invocation starts the MCP stdio server exactly as before (bin now dist/cli.js)
- built with @clack/prompts + jsonc-parser bundled via esbuild (no new runtime dependencies)
- unit tests for all pure logic + CI tests incl. an MCP-handshake passthrough regression guard
… deepen tests

Behavior (deliberate decision change): the wizard now manages ONLY the
'localstack' MCP entry. Pre-existing 'localstack-mcp-server' entries (docs-era
or manual) are left untouched by install and remove; users clean those up
themselves. Removed LEGACY_SERVER_NAMES and the migration logic.

Performance:
- prereq probes run in parallel (docker --version + docker info + localstack CLI)
  with tighter 5s timeouts (was 20s serial)
- client detection starts as soon as the method is known, overlapping the token
  and config prompts; --client limits detection to the selected clients
- remove discovery inspects all clients concurrently

Code quality & UX:
- resolveDockerOptions rewritten without nested ternaries; installIntoClients
  outcome handling deduplicated into helpers
- cancel messages now context-aware ('nothing was written' vs 'nothing was removed')
- CLI-managed clients (Claude Code, Codex) report their config file paths in
  summaries; new codexConfigPath() honors CODEX_HOME
- clearer first-run copy for prompts, warnings, and the remove flow

Tests: new direct suites for the file-client adapter factory and the Claude
Code/Codex CLI adapters (0600 fresh files, invalid-JSON protection, scoped
claude commands, token redaction, Windows cmd /c wrapping); 94 tests total.
@HarshCasper HarshCasper requested a review from remotesynth June 11, 2026 18:57
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