Skip to content

Fix stdio CLI help and parse errors#297

Open
wowsofine wants to merge 1 commit into
supabase:mainfrom
wowsofine:codex/stdio-cli-help-flags
Open

Fix stdio CLI help and parse errors#297
wowsofine wants to merge 1 commit into
supabase:mainfrom
wowsofine:codex/stdio-cli-help-flags

Conversation

@wowsofine

Copy link
Copy Markdown

Summary

  • add --help / -h handling for the Supabase MCP stdio CLI before server startup
  • normalize unknown top-level flag parse errors to a concise stderr message and exit 1
  • add integration coverage for help output and unknown flag behavior

Closes #296.

Validation

  • Red test first: CI=1 npx --yes pnpm@10.33.2 --filter @supabase/mcp-server-supabase exec vitest run --project integration test/stdio.integration.ts failed on the new help/unknown-flag assertions before the fix
  • npx --yes pnpm@10.33.2 --filter @supabase/mcp-utils build
  • npx --yes pnpm@10.33.2 --filter @supabase/mcp-server-supabase build
  • CI=1 npx --yes pnpm@10.33.2 --filter @supabase/mcp-server-supabase test:unit
  • CI=1 npx --yes pnpm@10.33.2 --filter @supabase/mcp-server-supabase exec vitest run --project integration test/stdio.integration.ts
  • npx --yes pnpm@10.33.2 format:check
  • dist smoke: --help and -h exit 0 and print usage
  • dist smoke: --version exits 0 and prints 0.8.2
  • dist smoke: unknown flag exits 1 and does not print ERR_PARSE_ARGS_UNKNOWN_OPTION
  • git diff --check

I also ran the full package test command. Unit and integration coverage passed, while the e2e tests failed because ANTHROPIC_API_KEY is not available in my local environment.

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.

CLI --help and unknown flags print parseArgs stack trace but exit 0

1 participant