Skip to main content
The Kibble CLI has two non-interactive modes designed for scripting, CI pipelines, and agent-driven workflows. The --yes flag creates a payment link entirely from environment variables and writes JSON to stdout. The --stdin flag accepts a JSON invoice payload via stdin and returns a JSON response — no prompts, no browser, no human in the loop. Pass --yes to create a payment link without any prompts. All configuration comes from environment variables. The CLI writes a single JSON object to stdout and exits.

Required environment variables

string
required
Your merchant email address. Used for payment confirmation notifications.
string
required
The charge amount in USDC. Must be a positive number with at most two decimal places (e.g. 49.00, 1000).

Optional environment variables

string
default:"byo"
Wallet type. Accepts privy (Kibble-provisioned) or byo (bring your own). Defaults to byo.
string
Your Base-compatible EVM wallet address. Required when KIBBLE_WALLET_TYPE is byo or unset.
string
default:"My Business"
Business name that appears on the payment page. Defaults to "My Business".

JSON output

The --yes flag prints a single JSON object to stdout. Use jq or any JSON parser to extract individual fields.

Shell examples


--stdin flag: programmatic invoice creation

Pipe a JSON invoice payload to stdin to create an invoice without any prompts. The CLI validates the payload, calls the Kibble API, and writes the response JSON to stdout.

Payload schema

The payload must be valid JSON conforming to the CreateInvoiceSchema. All fields below correspond directly to what you’d enter in the interactive flow.
string
required
Your merchant email address.
string
required
Your business name. Appears in the invoice header.
string
required
Your business address. Appears in the invoice “From” section.
string
required
Name of the person or company you’re billing.
string
required
Email address where the PDF invoice is sent immediately on creation.
string
Optional. Vendor address that appears on the invoice.
object[]
required
Array of line items. Minimum 1, maximum 30.
string
required
Payment due date in YYYY-MM-DD format (e.g. "2026-06-30").
string
Optional. Invoice issue date in YYYY-MM-DD format. Defaults to today if omitted.
string
Optional. Free-text notes that appear at the bottom of the invoice.
string
required
privy for a Kibble-provisioned wallet, or byo if you supply your own address.
string
Your Base EVM wallet address. Required when wallet_type is byo.
string
Optional. URL that receives a POST request when payment is confirmed on-chain.
boolean
When true, the invoice email is sent to the vendor immediately. Defaults to true.

Complete example

JSON response


--stdin --dry-run: validate without sending

Add --dry-run alongside --stdin to validate your JSON payload without hitting the API. The CLI parses and validates the payload, then echoes the normalized JSON back to stdout without creating an invoice or sending any emails.
This is useful for:
  • Testing pipeline JSON generation before deploying to production
  • Catching schema errors in CI before they reach the API
  • Verifying that field values (amounts, dates, emails) pass validation
If the payload is valid, the CLI prints the parsed JSON and exits with code 0. If the payload is invalid, it prints an error JSON object to stderr and exits with code 1.

KIBBLE_BASE_URL: non-production environments

Point the CLI at a different API endpoint by setting KIBBLE_BASE_URL. This works with all three modes: interactive, --yes, and --stdin.
Use KIBBLE_BASE_URL during local development or staging to avoid creating real payment links and sending live emails.

DO_NOT_TRACK=1: disable analytics

The CLI collects anonymous usage data to help improve the product. No personally identifiable information is sent. To opt out entirely:
This works in all modes. EU users are also asked for consent at the start of each interactive session regardless of this setting.

Environment variable reference