Skip to content

feat: add checks list command using versioned API#1216

Draft
thebiglabasky wants to merge 1 commit intomainfrom
herve/TIM-17/api-versioning-exploration
Draft

feat: add checks list command using versioned API#1216
thebiglabasky wants to merge 1 commit intomainfrom
herve/TIM-17/api-versioning-exploration

Conversation

@thebiglabasky
Copy link
Contributor

Summary

  • Adds checkly checks list CLI command using the new versioned /api/checks endpoint
  • Adds REST client with auto-pagination support and X-Checkly-API-Version header
  • Supports filtering by check type, tag, muted, and activated status

Companion PR

Note

This is an exploration/discussion PR — not intended for merge as-is.

Test plan

  • Run npx checkly checks list against a test account
  • Verify filtering flags work (--check-type, --tag, --activated, --muted)
  • Verify --json output format

🤖 Generated with Claude Code

Adds a new `checks list` CLI command that uses the /api/checks endpoint
with cursor pagination, DTO types, and the X-Checkly-API-Version header.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MichaelHogers
Copy link

@thebiglabasky hey hey, i would personally go for:

  • publish contract from backend upon merge into main, public npm package for our CLI (because our CLI is a public repo)
  • import this contract into CLI, so we don't hardcode any types/paths/wahtever here, all should just be a single source of truth coming from backend

we should nail this tomorrow, Javier did this alrdy but next step is to move to https://trpc.io/ and allow to create domain specific sdks (@kiroushi)

@thebiglabasky
Copy link
Contributor Author

Absolutely. For now I went with a quick n' dirty path to try out the API versioning path but don't expect this to be mergeable. I had the exact same thought about having shared types across repos to ensure consistency. That's tied to versioning too so good to get right

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