Skip to content

feat(cli): add checkly status-pages list + get commands [TIM-24, TIM-25]#1234

Merged
MichaelHogers merged 9 commits intomainfrom
herve/TIM-24/status-pages-list
Feb 26, 2026
Merged

feat(cli): add checkly status-pages list + get commands [TIM-24, TIM-25]#1234
MichaelHogers merged 9 commits intomainfrom
herve/TIM-24/status-pages-list

Conversation

@thebiglabasky
Copy link
Contributor

@thebiglabasky thebiglabasky commented Feb 25, 2026

Affected Components

  • CLI
  • Create CLI
  • Test
  • Docs
  • Examples
  • Other

Notes for the Reviewer

Adds checkly status-pages list and checkly status-pages list the first commands under the new status-pages topic.

What it does:

  • Lists all status pages in an account via GET /v1/status-pages
  • Default output: flat subtable with one row per service, all fields (name, url, card, service, id) repeated on every row — agent-friendly, every row is self-contained
  • --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:

  • Flat subtable over tree view: agents can grep/parse any row independently without tracking state from previous rows
  • Cursor-based pagination: the status-pages API uses cursors (not offset/page like checks), so we match the API rather than shimming
  • No --page flag: cursor pagination doesn't support random access

New files:

  • src/rest/status-pages.ts — REST module wrapping /v1/status-pages
  • src/formatters/status-pages.ts — expanded (per-service) and compact (per-page) table formatters
  • src/commands/status-pages/list.ts — the command itself
  • src/formatters/__tests__/status-pages.spec.ts — 15 tests covering both output modes + pagination helpers

Resolves TIM-24, TIM-25

thebiglabasky and others added 6 commits February 25, 2026 17:01
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>
@thebiglabasky thebiglabasky force-pushed the herve/TIM-24/status-pages-list branch from 5238cd4 to 1185791 Compare February 25, 2026 16:34
thebiglabasky and others added 2 commits February 25, 2026 18:12
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>
@thebiglabasky thebiglabasky changed the title feat(cli): add checkly status-pages list command [TIM-24] feat(cli): add checkly status-pages list + get commands [TIM-24, TIM-25] Feb 25, 2026
Comment on lines 51 to 65
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.`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should make it less likely that the agent does something unintended with the checkly cli

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, let me look into changing that now, it's easy enough

Copy link
Contributor Author

@thebiglabasky thebiglabasky Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed 👍

Copy link
Contributor

@MichaelHogers MichaelHogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing this CLI version with CC:

Tested locally against prod — both commands work well. Terminal and markdown outputs look clean.

  1. 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
MichaelHogers previously approved these changes Feb 25, 2026
Copy link
Contributor

@MichaelHogers MichaelHogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks all good and low risk, some minor comments

@thebiglabasky
Copy link
Contributor Author

Testing this CLI version with CC:

Tested locally against prod — both commands work well. Terminal and markdown outputs look clean.

  1. 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.

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!

@MichaelHogers
Copy link
Contributor

Testing this CLI version with CC:
Tested locally against prod — both commands work well. Terminal and markdown outputs look clean.

  1. 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.

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!

👍 👍

@MichaelHogers MichaelHogers merged commit 51dcdcf into main Feb 26, 2026
8 of 13 checks passed
@MichaelHogers MichaelHogers deleted the herve/TIM-24/status-pages-list branch February 26, 2026 15:24
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.

2 participants