Skip to main content
The Contact Button CLI wraps API v1 in one agent-friendly command. It is designed for quick operator tasks, shell automation, CI, and coding agents that need deterministic Contact Button setup without browser automation.
The CLI is an early preview. The publish-ready package is named @contactbutton/cli; registry installation becomes available when the first public package release is promoted. See Install the CLI for the current release status.

CLI or API?

The CLI does not replace the API. Its generic api command maps directly to documented API v1 methods and paths, so a request can move between CLI, curl, and application code without changing its resource model.

First-pass capabilities

  • Read API keys from CONTACTBUTTON_TOKEN, CONTACTBUTTON_API_KEY, or an owner-readable local file
  • List and retrieve accessible workspaces
  • Call every documented JSON API v1 endpoint with api <method> <path>
  • Emit compact JSON, JSON Lines, pretty JSON, or raw response bodies
  • Add repeatable query parameters and non-authentication headers
  • Read JSON request bodies inline, from a file, or from stdin
  • Generate request IDs and idempotency keys for mutations
  • Require --dry-run or --confirm before sending a mutation
  • Redact credentials and secret-like fields from dry-run and debug output
  • Override the base URL for Appdev or local testing without allowing credentials to be sent to an arbitrary absolute request URL

Safety model

--confirm means the operator or represented human has approved sending that mutation. It does not bypass API permissions or Contact Button confirmation rules. Publishing, paid actions, DNS changes, phone-number purchases, bookings, callbacks, and other consequential actions still require the approval described by their API contract. The CLI never accepts an API key as a command-line argument because shell history and process listings can expose it.

Install

Install the preview and verify the binary.

Authentication

Configure a scoped API key without exposing it to chat or shell history.

Command reference

Review commands, flags, formats, and exit codes.

Automation

Use dry runs, JSON output, and explicit confirmation with coding agents and CI.