fix(cli): recognize --no-upload option, decouple --json from upload

Summary

  • Fix --no-upload option not being recognized in checkup command
  • Remove automatic --no-upload implication when --json is used (now independent)
  • Add comment documenting the decoupled behavior
  • Add comprehensive tests for upload flag combinations

Tests added

  • --upload and --no-upload options are recognized
  • --json does not imply --no-upload (decoupled behavior)
  • --json --upload requires API key
  • --json --no-upload disables upload
  • --upload requires API key (without config)
  • --no-upload does not require API key

Test plan

  • bun test checkup.test.ts passes (70 tests)
  • bun ./bin/postgres-ai.ts checkup --help shows both options
  • bun ./bin/postgres-ai.ts checkup postgresql://... --no-upload no longer errors with "unknown option"

Closes #100 (closed)

🤖 Generated with Claude Code

Edited by Bogdan Tsechoev

Merge request reports

Loading