@solidgrove/claimbee_cli
v0.8.0
Published
CLI for ClaimBee automation billing workflows
Readme
@solidgrove/claimbee_cli
CLI for ClaimBee automation billing workflows.
Install
npm i -g @solidgrove/claimbee_clior run one-off:
npx @solidgrove/claimbee_cli@latest --helpConfigure API URL
export CLAIMBEE_API_URL='https://us-central1-claimed-660e4.cloudfunctions.net/api'Default if unset: https://us-central1-claimed-660e4.cloudfunctions.net/api.
Authenticate
claimbee auth login --api-key <api-key>
claimbee auth logoutBilling
claimbee billing lookup --email [email protected]
claimbee billing lookup --user-id QpJrWP3j9efP7n9IMgcLpI8MFuQ2
claimbee billing refund --payment pi_123
claimbee billing create-link --email [email protected]
claimbee billing cancel --email [email protected]
claimbee billing cancel --email [email protected] --subscription sub_123 --nowLooking an account up
--email is case-insensitive. The CLI lowercases it and the backend queries
Stripe with the normalized address, then falls back to a case-insensitive Stripe
search, so [email protected], [email protected], and
[email protected] all resolve the same customer.
--user-id takes the ClaimBee user id — the same value printed as Purchase
ID in every email the app sends. Use it when you do not know which address the
account was created under: it resolves the account first, then looks up billing
across every email and Stripe customer that account owns.
claimbee user lookup --email [email protected]
claimbee user lookup --user-id QpJrWP3j9efP7n9IMgcLpI8MFuQ2An empty result means "not found under what we searched", not "this person is
not a customer". Check claimbee user lookup for the account's other addresses
before telling a customer anything.
Cancelling
cancel cancels at period end by default, so the customer keeps the access they
already paid for. --now ends access immediately and Stripe refunds nothing —
use it only when a refund is being issued for the same period.
Before an immediate cancel the CLI looks the subscription up and prints what the flag costs:
warning: --now forfeits 27 days of paid access (through 2026-09-01).
Omit --now to cancel at period end.The warning goes to stderr and does not block the command. It is skipped when
there is nothing to lose (a past_due subscription, or a period that already
ended). Pass --subscription when the email has several subscriptions —
otherwise the CLI cannot tell which one it is about to cancel and says so.
Every cancel response reports the same numbers:
{
"accessUntil": "2026-08-05T11:02:31.000Z",
"accessUntilBefore": "2026-09-01T00:00:00.000Z",
"paidDaysForfeited": 27
}Publish
npm run publish:public