BillerAPI CLI
Inspect resources, forward signed webhooks to localhost, and fire deterministic sandbox events without writing throwaway scripts.
Release status
billerapi-cli@1.1.0.Try it before signup
npx -y billerapi-cli@1.1.0 demoThis read-only command does not create an account or write local configuration.
Local webhook loop
npm install -g billerapi-cli
billerapi login
billerapi doctor
billerapi samples create node-express
billerapi listen --forward-to http://localhost:3000/webhook
# In another terminal
billerapi trigger bill.created --link_id=lnk_1 --amount=4200The listener reconnects with exponential backoff and falls back to delivery polling after repeated stream failures. The sandbox host has no event stream, so there the listener polls /v1/webhook-deliveries straight away; a host that serves neither transport makes listen exit non-zero with a pointer to POST /v1/webhook-endpoints/{id}/test and billerapi trigger instead of retrying forever. Forwarded requests use the production-compatible signature scheme.
Create now, claim later
Create an immediate sandbox profile without signup or prompts. The receipt contains a sensitive, one-shot claim_url; give it only to the intended human who will attach the sandbox and accept the current legal documents later on the web. Production is the default; use --environment to select canonical local, staging, or production API Gateway and sandbox-data hosts together.
billerapi sandbox createAfter claim, Developer → API keys shows a durable, secret-free handoff receipt for that exact client. The pre-claim agent key keeps its 24-hour grace period by default. When the handoff is complete, the account owner can choose Retire previous key now to invalidate it immediately; retries are safe.
Configure your coding agents
After installing the verified published CLI, preview the detected Claude Code, Cursor, and Codex changes, review the secret-free receipt, then apply only that exact bundle. Supported runtimes are macOS on Apple silicon (darwin-arm64) and Linux on x86-64 (linux-x64); other runtimes fail before download or mutation. Existing configuration must parse before the command will touch it.
billerapi agent setup --dry-run
billerapi agent setup --expected-bundle-sha256 <reviewed_bundle_sha256>The command installs the BillerAPI MCP entry and public skills with compare-and-swap publication, then prints a secret-free receipt of every change. If publication is interrupted, later setup runs fail closed without changing either copy. Restore the intended private backup manually. Preserve the other copy for review, then run a fresh dry-run. Production is the default; pass --environment local, --environment staging, or --environment production to use that environment's canonical MCP and skills-catalog hosts. Preview and apply must use the same environment because it is bound into the approval digest.
Pointing the CLI at another environment
Origin selection is environment-only: the profile-backed commands have no --api-base flag, so these variables are the entire mechanism. Running billerapi --help prints the same list.
| Variable | Effect |
|---|---|
BILLERAPI_PROFILE | Profile to resolve, same as --profile. |
BILLERAPI_API_KEY | API key, overriding the profile's stored key. |
BILLERAPI_CLIENT_SECRET | Deprecated alias of BILLERAPI_API_KEY. Warns; removed in CLI v2. |
BILLERAPI_API_BASE | API origin for every profile-backed command. |
BILLERAPI_SANDBOX_API_BASE | API origin when the profile's environment is sandbox. Wins over BILLERAPI_API_BASE. |
BILLERAPI_ACCOUNT_API_BASE | Account origin for sandbox create only. Must be paired with one of the two above. |
BILLERAPI_DOCS_BASE | The https docs origin for docs and open docs. |
BILLERAPI_REGISTRY | The npm registry URL that version --check probes. |
BILLERAPI_DEMO_CANARY_SECRET | Internal uptime-canary bearer for demo; refuses a non-canonical --api-base. |
BILLERAPI_API_BASE=https://api.staging.billerapi.com billerapi doctor
BILLERAPI_SANDBOX_API_BASE=https://sandbox.api.staging.billerapi.com billerapi doctor
BILLERAPI_DOCS_BASE=https://docs.staging.billerapi.com billerapi docsOrigins are validated rather than trusted: a generated BillerAPI origin of the right kind, or a loopback origin for local stacks. Anything else exits 2 with UNTRUSTED_API_ORIGIN. The approved set follows the profile's environment rather than the value you supply, so a sandbox profile needs BILLERAPI_SANDBOX_API_BASE, and an account host passed through BILLERAPI_API_BASE is rejected instead of honoured.
`demo` and `prime` ignore these
demo takes its own --api-base and prime always verifies the canonical public sandbox origin and includes that exact origin in its output.Useful commands
billerapi bills list --link-id <id>Query bill resources for one account link
billerapi billers listExplore the catalog
billerapi links listInspect account links
billerapi webhooks deliveriesDebug delivery history
billerapi events tailFollow the activity feed
billerapi env sandboxSwitch the active profile mode
Production forwarding is deliberately gated
--prod and confirmation before mirroring events to a laptop because payloads may contain customer data.