CLI
View .mdOpen in ClaudeOpen in ChatGPT

BillerAPI CLI

Inspect resources, forward signed webhooks to localhost, and fire deterministic sandbox events without writing throwaway scripts.

Release status

The account-free demo is available in billerapi-cli@1.1.0.

Try it before signup

Terminal
npx -y billerapi-cli@1.1.0 demo

This read-only command does not create an account or write local configuration.

Local webhook loop

Terminal
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=4200

The 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.

Terminal
billerapi sandbox create

After 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.

Terminal
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.

VariableEffect
BILLERAPI_PROFILEProfile to resolve, same as --profile.
BILLERAPI_API_KEYAPI key, overriding the profile's stored key.
BILLERAPI_CLIENT_SECRETDeprecated alias of BILLERAPI_API_KEY. Warns; removed in CLI v2.
BILLERAPI_API_BASEAPI origin for every profile-backed command.
BILLERAPI_SANDBOX_API_BASEAPI origin when the profile's environment is sandbox. Wins over BILLERAPI_API_BASE.
BILLERAPI_ACCOUNT_API_BASEAccount origin for sandbox create only. Must be paired with one of the two above.
BILLERAPI_DOCS_BASEThe https docs origin for docs and open docs.
BILLERAPI_REGISTRYThe npm registry URL that version --check probes.
BILLERAPI_DEMO_CANARY_SECRETInternal uptime-canary bearer for demo; refuses a non-canonical --api-base.
Terminal
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 docs

Origins 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

Neither command resolves a profile, so neither one reads the origin variables. 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 list

Explore the catalog

billerapi links list

Inspect account links

billerapi webhooks deliveries

Debug delivery history

billerapi events tail

Follow the activity feed

billerapi env sandbox

Switch the active profile mode

Production forwarding is deliberately gated

A production profile requires --prod and confirmation before mirroring events to a laptop because payloads may contain customer data.
Was this page helpful?