Skip to main content

CLI

Basis Theory CLI

basistheory-cli

The Basis Theory CLI (bt) enables you to manage Applications, Proxies, and Reactors from the command line.

Installation

npm install -g @basis-theory-labs/cli

Authentication

All CLI commands require a Management Application key for authentication. You can provide it in two ways:

Environment variable (recommended):

export BT_MANAGEMENT_KEY="your-management-key"

Flag (per-command):

bt applications -x "your-management-key"
Your Management Application must have the appropriate permissions for each command. See the individual command pages for required permissions.

Configuration

By default, the CLI targets the Basis Theory production API. To override the API base URL (e.g., for testing), set the BT_API_BASE_URL environment variable:

export BT_API_BASE_URL="https://api.test.basistheory.com"

Commands

CommandDescription
bt applicationsManage Applications
bt proxiesManage Pre-Configured Proxies
bt reactorsManage Reactors

Node22 Runtime

Proxies and Reactors support two runtime images:

  • node-bt (legacy) — The original runtime. Requires --application-id for transforms.
  • node22 — The modern runtime with additional configuration options.

The node22 runtime supports these additional options (available on Proxies transforms and Reactors):

OptionTypeDefaultDescription
timeoutinteger10Execution timeout in seconds (1–30)
warm-concurrencyinteger0Number of warm instances (0–1)
resourcesstringstandardResource tier: standard, large, or xlarge
dependenciesfile pathPath to a JSON file specifying npm dependencies
permissionsstring[]Permission grants (repeatable)
The --async flag is only available with the node22 runtime. It allows non-blocking creation so you don't have to wait for the resource to be ready.

Getting Help

Use the --help flag with any command to see available options:

bt --help
bt applications --help
bt proxies create --help