Skip to content

Handle CLI metadata flags before server auth#257

Open
None-Feeling wants to merge 1 commit into
firecrawl:mainfrom
None-Feeling:codex/cli-info-flags-before-auth
Open

Handle CLI metadata flags before server auth#257
None-Feeling wants to merge 1 commit into
firecrawl:mainfrom
None-Feeling:codex/cli-info-flags-before-auth

Conversation

@None-Feeling

Copy link
Copy Markdown

Summary

  • handle --help / -h and --version / -v before starting the MCP server
  • return a concise unknown-option error for unsupported top-level flags before auth/config validation
  • keep normal server startup behavior unchanged when no metadata flag is provided

Fixes #256.

Validation

  • npm run build
  • node dist/index.js --help exits 0 and prints usage
  • node dist/index.js --version exits 0 and prints 3.20.2
  • node dist/index.js -h exits 0 and prints usage
  • node dist/index.js -v exits 0 and prints 3.20.2
  • node dist/index.js --definitely-not-a-real-flag exits 1 with an unknown-option error
  • node dist/index.js still exits 1 with the existing FIRECRAWL_API_KEY / FIRECRAWL_API_URL validation when env vars are unset
  • git diff --check

Not run: npm run lint because the current package install does not provide an eslint executable.

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 metadata flags require FIRECRAWL_API_KEY instead of printing help/version

1 participant