Skip to content

fix: add stdio cli help handling#299

Open
Viodmian wants to merge 1 commit into
supabase:mainfrom
Viodmian:fix-stdio-cli-help-errors
Open

fix: add stdio cli help handling#299
Viodmian wants to merge 1 commit into
supabase:mainfrom
Viodmian:fix-stdio-cli-help-errors

Conversation

@Viodmian

@Viodmian Viodmian commented Jun 8, 2026

Copy link
Copy Markdown

Summary

  • Add explicit --help / -h handling for the Supabase stdio CLI.
  • Keep --version behavior while moving CLI metadata parsing into a small helper.
  • Normalize unknown top-level options into a concise non-zero CLI error instead of printing a raw parseArgs stack trace and exiting 0.

Fixes #296.

Verification

  • From packages/mcp-utils: .\node_modules\.bin\tsup.cmd --config tsup.config.ts
  • With CI=1, from packages/mcp-server-supabase: .\node_modules\.bin\vitest.cmd run --project unit src/transports/stdio-cli.test.ts
  • From packages/mcp-server-supabase: .\node_modules\.bin\tsc.cmd --noEmit
  • From packages/mcp-server-supabase: .\node_modules\.bin\tsup.cmd --config tsup.config.ts
  • From repo root: .\node_modules\.bin\biome.cmd check packages/mcp-server-supabase/src/transports/stdio.ts packages/mcp-server-supabase/src/transports/stdio-cli.ts packages/mcp-server-supabase/src/transports/stdio-cli.test.ts
  • git diff --check
  • node dist\transports\stdio.js --help
  • node dist\transports\stdio.js --version
  • node dist\transports\stdio.js --definitely-not-real
  • node dist\transports\stdio.js still requires a Supabase PAT for normal server startup.

Note: corepack pnpm install --frozen-lockfile mostly installed dependencies but exited non-zero locally because pnpm 11 blocked dependency build scripts and could not create the supabase binary. The package tests/builds above were run directly from the installed local package binaries after install.

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