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
Acceptance Criteria
-
postgresai reports listcommand 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, andget_report_dataare registered and functional -
--output <dir>flag saves report files to the specified directory -
--formattedflag renders markdown with ANSI formatting in the terminal -
--jsonand--debugflags work consistently with existing command patterns -
--typefilter correctly separates JSON and markdown report files -
--check-idfilter (e.g., H002) returns only the specified check's data -
--allflag 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