Skip to content

Add Cloudflare billing flags to pscale database create - #1311

Merged
nholden merged 3 commits into
mainfrom
cursor/cloudflare-billed-db-create-e787
Aug 4, 2026
Merged

Add Cloudflare billing flags to pscale database create#1311
nholden merged 3 commits into
mainfrom
cursor/cloudflare-billed-db-create-e787

Conversation

@nholden

@nholden nholden commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

Extends pscale database create so agents can create Cloudflare-billed databases by passing a Cloudflare-minted HMAC billing proof.

pscale database create <database> --org <org> --format json \
  --cloudflare-account-id <id> \
  --cloudflare-timestamp <unix> \
  --cloudflare-signature <hex>

All three flags are required together. The CLI does not mint the signature — Cloudflare must provide it (same HMAC as the browser entry URL).

The flags are marked hidden (MarkHidden) so they do not appear in --help for end users, but remain fully functional when passed.

Test plan

  • go test ./internal/cmd/database/ ./internal/planetscale/
  • End-to-end with a valid Cloudflare HMAC grant
  • Assert Cloudflare flags are Hidden in help
Open in Web Open in Cursor 

cursoragent and others added 2 commits July 27, 2026 14:45
Allow agents to create Cloudflare-billed databases by passing
--cloudflare-account-id, --cloudflare-timestamp, and --cloudflare-signature
together on `pscale database create`.

Co-authored-by: nick.holden <nick.holden@planetscale.com>
Co-authored-by: nick.holden <nick.holden@planetscale.com>
@nholden nholden self-assigned this Aug 4, 2026
@nholden
nholden marked this pull request as ready for review August 4, 2026 00:49
@nholden
nholden requested a review from a team as a code owner August 4, 2026 00:49
Mark --cloudflare-account-id, --cloudflare-timestamp, and
--cloudflare-signature as hidden so they stay available for
Cloudflare automation without appearing in --help for end users.

Co-authored-by: Nick Holden <nick.r.holden@gmail.com>
@nholden
nholden merged commit 855a317 into main Aug 4, 2026
4 checks passed
@nholden
nholden deleted the cursor/cloudflare-billed-db-create-e787 branch August 4, 2026 01:34
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.

3 participants