Skip to content

feat(cli): add account members command#1295

Merged
thebiglabasky merged 5 commits into
mainfrom
herve/account-members
May 13, 2026
Merged

feat(cli): add account members command#1295
thebiglabasky merged 5 commits into
mainfrom
herve/account-members

Conversation

@thebiglabasky
Copy link
Copy Markdown
Contributor

@thebiglabasky thebiglabasky commented May 8, 2026

Summary

  • add checkly account members as a read-only command backed by /v1/accounts/me/members
  • render account members and invites in table/markdown, with raw JSON output preserved
  • add endpoint-backed filters: --search, --type, --role, --status, --limit, and --next-id
  • normalize --type, --role, and --status values case-insensitively before sending canonical API values
  • document the command in the embedded Checkly skill context and regenerate the public skill output

Validation

  • npx vitest --run src/commands/__tests__/account-members.spec.ts src/formatters/__tests__/account-members.spec.ts src/commands/__tests__/command-metadata.spec.ts
  • npm run lint
  • npx tsc -p tsconfig.json --noEmit --skipLibCheck
  • npm run prepare:ai-context --workspace packages/cli && npm run prepare:ai-context

Note: full npm run prepare:dist --workspace packages/cli was attempted earlier and is currently blocked by existing lru-cache declaration errors under node_modules.

@thebiglabasky thebiglabasky marked this pull request as ready for review May 12, 2026 18:45
@MichaelHogers
Copy link
Copy Markdown
Contributor

@thebiglabasky high level thinking, but I think it is worth considering now rather than later:

considering https://github.com/checkly/monorepo/pull/1730 the rich openapi schema here, what about pulling in https://api.checklyhq.com/swagger.json and using https://heyapi.dev/ to create a SDK for our CLI? we can filter the openapi spec down to only the routes we use

@thebiglabasky
Copy link
Copy Markdown
Contributor Author

@thebiglabasky high level thinking, but I think it is worth considering now rather than later:

considering checkly/monorepo#1730 the rich openapi schema here, what about pulling in https://api.checklyhq.com/swagger.json and using https://heyapi.dev/ to create a SDK for our CLI? we can filter the openapi spec down to only the routes we use

I'd like to tackle the SDK separately, mostly because of the public / private segmentation of our repos which would require publishing on npm and that felt like too much. But I agree that'd be something to do now-ish, not 6+ commands down the road.

Also noted yesterday that we have an issue with the zod API that doesn't generate proper OpenAPI spec and have a draft PR to fix that which I need to verify since I haven't looked enough yet into how it's currently done: https://github.com/checkly/monorepo/pull/1752

@MichaelHogers
Copy link
Copy Markdown
Contributor

makes sense, maybe there's a shortcut in using https://api.checklyhq.com/swagger.json directly 🤔 alright then

Copy link
Copy Markdown
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 good

@thebiglabasky thebiglabasky merged commit 7af4828 into main May 13, 2026
10 of 11 checks passed
@thebiglabasky thebiglabasky deleted the herve/account-members branch May 13, 2026 07:51
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