Skip to content

feat(cli): add checks delete command#1347

Merged
thebiglabasky merged 1 commit into
mainfrom
martzoukos/checks-delete-id
Jun 10, 2026
Merged

feat(cli): add checks delete command#1347
thebiglabasky merged 1 commit into
mainfrom
martzoukos/checks-delete-id

Conversation

@martzoukos

Copy link
Copy Markdown
Contributor

Summary

Adds checkly checks delete <id> (Linear AI-364), following the members delete precedent from #1329:

  • New delete(id) method on the Checks REST class (DELETE /v1/checks/:id).
  • New checks delete command: destructive/idempotent metadata, required id arg, --force and --dry-run flags, and the standard confirmOrAbort preview (interactive confirmation, agent-mode exit 2 without --force).
  • The check is fetched first so the confirmation names what's being deleted; a 404 produces a friendly Check "<id>" not found. It may have already been deleted. message and exit 1.
  • Since the checks API exposes no project-membership field, both the help text and the confirmation preview carry an unconditional warning that checks managed by a CLI project are recreated on the next checkly deploy and should be removed from project code instead.

Test plan

  • Unit tests in checks-delete.spec.ts: exit 2 without --force in agent mode, execution with --force, --dry-run preview, not-found handling, delete failure exit code, metadata.
  • Full suite green (1203 passed, 88 files), lint clean, build succeeds, skills/checkly/SKILL.md in sync.
  • Manual smoke test against a real account: --dry-run resolves the check and prints the preview envelope.

🤖 Generated with Claude Code

Adds `checkly checks delete <id>` following the members delete
precedent: destructive metadata, confirmation preview with --force
and --dry-run, and a friendly NotFoundError message on double-delete.
The confirmation and help text warn that project-managed checks are
recreated on the next deploy, since the API exposes no way to detect
project membership.

Closes AI-364

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@martzoukos

Copy link
Copy Markdown
Contributor Author

Faced this shortcoming in my prompt-onboarding agent flow, so figured it might be good to be added.

@martzoukos martzoukos requested a review from thebiglabasky June 10, 2026 16:35
@thebiglabasky thebiglabasky enabled auto-merge (squash) June 10, 2026 20:51
@thebiglabasky thebiglabasky merged commit 92841b3 into main Jun 10, 2026
14 of 15 checks passed
@thebiglabasky thebiglabasky deleted the martzoukos/checks-delete-id branch June 10, 2026 20: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