Repository navigation
docs(cli): document account spending-cap commands - #871
ejanusevicius wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
hlenke
left a comment
There was a problem hiding this comment.
Needs changes · The commands shipped in CLI 10.3.0 today, so the merge condition in the description is met: add an "Available since CLI v10.3.0" note to the new section and this is ready to merge.
The content holds up. I checked every claim against the CLI source on checkly-cli main (c58d58c1, which is exactly the 10.3.0 tag) and found nothing wrong. The flags, the 0 to 10000 range with at most 2 decimals, the billing:read/billing:update permissions, the API key and plan errors, exit codes 2 and 3, the dry_run/confirmation_required envelope and its confirmCommand, the output fields, and the spending-cap skills resource all match the source.
Not about specific lines
- CI passes, and the PR is mergeable.
- Release. CLI 10.3.0, published 2026-11-23, lists checkly/checkly-cli#1613. The compare
10.3.0...c58d58c1comes backidentical. The inline comment has the note text. - Overlap with #853. It adds a new
## Overagesection toadmin/usage.mdx, right above the Usage emails paragraph this PR extends. A sentence about stopping overage at a chosen amount belongs in that section more than in the paragraph about emails. Whichever PR lands second should move the spending-cap sentence (line 72 here) to the end of## Overage. The two PRs touch neighboring lines, so expect a small conflict. - Overlap with #774. That sentence-case sweep already conflicts with
mainand also touchescli/checkly-account.mdx.### Spending Cap Examplesmatches its sibling### Plan Examples, so keep it as it is. If #774 lands first, rename it to### Spending cap exampleswith the rest.
Inline: 1 important, 2 wording (optional).
What I checked
- Files read: the full diff from merge base
f948c1feforcli/checkly-account.mdx,cli/checkly-skills.mdxandadmin/usage.mdx, plus the whole PR version ofcli/checkly-account.mdx(page structure and sibling sections).mainhas not changed these files since the merge base. - CI and merge state:
gh pr checks(all pass) andgh pr view(MERGEABLE, CLEAN). I checked open PRs on the same files and found #853 and #774. - CLI source (
checkly-cliorigin/mainc58d58c1 = tag10.3.0):- The
account/spending-cap.ts,spending-cap/set.tsandspending-cap/remove.tscommands: flags, read-only/destructive classification, and which permission each error names. helpers/spending-cap.ts: the dollar parsing (^\d+(\.\d{1,2})?$, max 10000), the preview warnings, and the 401/403/409 messages.helpers/invalid-input-error.ts: invalid input exits 2.commands/authCommand.ts(confirmOrAbort, exit 3) andhelpers/command-preview.ts(envelope fields and order,confirmCommanddrops--output/--force/--dry-run).helpers/cli-mode.ts(interactive/agent/CI detection),helpers/flags.ts(-o,-f),formatters/spending-cap.ts(labels,Measured atformat), andai-context/context.ts(themanage-spending-capresource).
- The
- Release:
gh release view 10.3.0and thecompare/10.3.0...c58d58c1API. - Backend (checkly monorepo
main2c87c611c9): the public spending-cap routes require self-serve plan management. Setting a cap on a plan that cannot hold one returns 409. The API caps the amount at 1,000,000 cents, which matches the CLI's $10000. The permissions page onmainlistsbilling:readandbilling:update. - End-to-end: not run. The local app did not come up within 5 minutes, so I stopped it and verified against source instead. The dry-run envelope and exit codes come from the source, backed by the CLI's unit tests for exit 2 and for
--dry-runexiting 0. None of it comes from a live run. - Could not verify: that Status appears only when a cap is set. The formatter shows it whenever the API returns a limit for the account, and I did not trace when the backend does that.
|
|
||
| ## `checkly account spending-cap` | ||
|
|
||
| Show the overage spending cap: the most your account may spend on check runs beyond what your plan includes. When the overage reaches the cap, checks stop running. |
There was a problem hiding this comment.
Important · The spending-cap commands first shipped in CLI 10.3.0, but the only version note on this page says v7.7.0. Someone on 10.2 who follows this section gets an unknown-command error. CLI command pages start a newly added command with an "Available since" note.
| Show the overage spending cap: the most your account may spend on check runs beyond what your plan includes. When the overage reaches the cap, checks stop running. | |
| <Note>Available since CLI v10.3.0.</Note> | |
| Show the overage spending cap: the most your account may spend on check runs beyond what your plan includes. When the overage reaches the cap, checks stop running. |
|
|
||
| The default view shows: | ||
|
|
||
| - **Spending cap**: the cap in US dollars, or `No cap`. |
There was a problem hiding this comment.
Wording (optional) · A cap of 0 prints $0.00 (no overage allowed) (formatters/spending-cap.ts). That is worth showing, since the set section tells readers 0 is a valid cap.
| - **Spending cap**: the cap in US dollars, or `No cap`. | |
| - **Spending cap**: the cap in US dollars, `$0.00 (no overage allowed)` for a cap of `0`, or `No cap`. |
| - **Spending cap**: the cap in US dollars, or `No cap`. | ||
| - **Overage so far**: the overage measured so far. It shows `Not measured` when the runs are not measured yet or the plan has no overage. This does not mean $0.00 of overage. | ||
| - **Status**: `Under the cap`, `Close to the cap (from $X)`, or `Cap reached`. It is only shown when a cap is set. | ||
| - **Checks stopped**: `Yes` when the cap is reached. |
There was a problem hiding this comment.
Wording (optional) · The CLI prints Yes, the spending cap is reached here, not just Yes (formatters/spending-cap.ts). Quote the full value so readers who search the output find it.
| - **Checks stopped**: `Yes` when the cap is reached. | |
| - **Checks stopped**: `No`, or `Yes, the spending cap is reached`. |
What
Documents the
checkly account spending-capcommands added in checkly/checkly-cli#1613 (TREE-1269):cli/checkly-account.mdx: newcheckly account spending-capsection (show,set <dollars>,remove), with output fields, amount rules, plan/permission/API key requirements, the confirmation flow (--force,--dry-run,confirmation_requiredwith exit 3) and examples. Subcommand table and page description updated.cli/checkly-skills.mdx: adds thespending-capresource to theskills managetable.admin/usage.mdx: one-sentence cross-link from the overage emails paragraph.Example output is taken from the CLI test evidence captured against a local backend.
Merge timing
Merge only after a CLI release includes checkly/checkly-cli#1613. It is merged on
mainbut not yet released (latest is 10.2.0). Consider adding an "Available since CLI vX" note once the version is known.Validation
npm run check:links: no broken internal linksnpm run check:anchors: OKpython3 .github/scripts/check_frontmatter.py: passednpx mint broken-links: no broken links found🤖 Generated with Claude Code