feat(cli): add checkly status-pages list + get commands [TIM-24, TIM-25]#1234
feat(cli): add checkly status-pages list + get commands [TIM-24, TIM-25]#1234MichaelHogers merged 9 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…list Default output now renders one row per service with all fields (name, url, card, service, id) repeated on every row. This is agent-friendly — every row is self-contained, no state tracking needed. --compact shows one row per status page with card counts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
5238cd4 to
1185791
Compare
Add `checkly status-pages get <id>` with detail/json/md output formats. Shows page metadata, cards, and services with linked check IDs. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
| expect(stdout).toContain(`ADDITIONAL COMMANDS | ||
| checks List and inspect checks in your Checkly account. | ||
| destroy Destroy your project with all its related resources. | ||
| env Manage Checkly environment variables. | ||
| help Display help for checkly. | ||
| import Import existing resources from your Checkly account to your | ||
| project. | ||
| login Login to your Checkly account or create a new one. | ||
| logout Log out and clear any local credentials. | ||
| rules Generate a rules file to use with AI IDEs and Copilots. | ||
| runtimes List all supported runtimes and dependencies. | ||
| status-pages List and manage status pages in your Checkly account. | ||
| switch Switch user account. | ||
| sync-playwright Copy Playwright config into the Checkly config file. | ||
| whoami See your currently logged in account and user.`) |
There was a problem hiding this comment.
should we group these "data commands" separately
we have CORE, ADDITIONAL COMMANDS
maybe we group them separately
XYZ COMMANDS + possible a [PREVIEW/BETA] in the title to make clear these might break
this would help for agents as well, as in, CORE commands create things XYZ commands get things and allow to inspect data...
There was a problem hiding this comment.
should make it less likely that the agent does something unintended with the checkly cli
There was a problem hiding this comment.
True, let me look into changing that now, it's easy enough
There was a problem hiding this comment.
Actually didn't go with a change, and believe that'd be probably better to do it once we have a bunch more so we don't churn this too often, and clean it up once.
wdyt?
MichaelHogers
left a comment
There was a problem hiding this comment.
Testing this CLI version with CC:
Tested locally against prod — both commands work well. Terminal and markdown outputs look clean.
- Repeated IDs in list: The flat card/service rows mean the same status page ID appears many times (e.g. 13 rows for one page with 13 services). An agent needs to deduplicate to understand "3 status pages" vs 20 rows. Not sure if there's a better way to structure this.
MichaelHogers
left a comment
There was a problem hiding this comment.
looks all good and low risk, some minor comments
I had a similar question and so we have a --compact which won't repeat lines. I actually asked CC to tell me what format would work best for an agent and he told me to repeat so it would easily awk into it, which I figured was smart. Open to another way though! |
👍 👍 |
Affected Components
Notes for the Reviewer
Adds
checkly status-pages listandcheckly status-pages listthe first commands under the newstatus-pagestopic.What it does:
GET /v1/status-pages--compact: one row per status page with card counts--output json|md: JSON returns full API response, markdown renders a table--cursor/--limit: cursor-based pagination (matching the backend's newer pagination pattern, unlike the offset-based pattern used by checks)Key design decisions:
--pageflag: cursor pagination doesn't support random accessNew files:
src/rest/status-pages.ts— REST module wrapping/v1/status-pagessrc/formatters/status-pages.ts— expanded (per-service) and compact (per-page) table formatterssrc/commands/status-pages/list.ts— the command itselfsrc/formatters/__tests__/status-pages.spec.ts— 15 tests covering both output modes + pagination helpers