feat(cli): Add reports command group for checkup reports

Summary

Add postgresai reports CLI commands and MCP tools for working with checkup reports.

CLI Commands

  • postgresai reports list — list checkup reports with filtering by project, status, pagination
  • postgresai reports files <reportId> — list files in a report (metadata)
  • postgresai reports data <reportId> — get report file content (markdown/json)

MCP Tools

  • list_reports — list reports with keyset pagination
  • list_report_files — list report files by report ID or check ID
  • get_report_data — fetch report content

Options

  • --project-id, --status, --limit, --before (keyset pagination), --all
  • --type (json/md), --check-id (e.g. H002)
  • --output <dir> / -o — save files to directory
  • --formatted — ANSI rendering for markdown
  • --json, --debug

MR

!211 (merged)


Acceptance Criteria

  • postgresai reports list command lists checkup reports with filtering by --project-id, --status, and pagination (--limit, --before)
  • postgresai reports files <reportId> command lists file metadata for a given report
  • postgresai reports data <reportId> command retrieves report file content (markdown/JSON)
  • MCP tools list_reports, list_report_files, and get_report_data are registered and functional
  • --output <dir> flag saves report files to the specified directory
  • --formatted flag renders markdown with ANSI formatting in the terminal
  • --json and --debug flags work consistently with existing command patterns
  • --type filter correctly separates JSON and markdown report files
  • --check-id filter (e.g., H002) returns only the specified check's data
  • --all flag retrieves all reports using automatic keyset pagination

Definition of Done

  • MR !211 (merged) merged and released in a new CLI version
  • Commands documented in CLI help text (postgresai reports --help)
  • MCP tools discoverable and functional in AI assistant integrations
  • All new commands follow existing CLI output formatting conventions
Edited by Nikolay Samokhvalov