New Setup Wizard: init and remove Commands#40
Open
HarshCasper wants to merge 2 commits into
Open
Conversation
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.
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
npx -y @localstack/localstack-mcp-server initconfigures the MCP server in Cursor, Claude Code, Claude Desktop, VS Code, Codex, OpenCode, and Amazon Q/Kiro CLI;removeuninstalls it--method,--client,--token,--config,--force,--yes) for scripts and dotfileslocalstack@clack/prompts+jsonc-parservia esbuild intodist/cli.js— no new runtime dependenciesNote
The Docker install method references the
localstack/localstack-mcp-serverimage, so this should merge after #36 lands and the image is on Docker Hub.