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. Proxy transforms and synchronous Reactors support 10 to 30; asynchronous Reactors support 10 to 900.
warm-concurrencyinteger0Number of warm instances (0–1)
resourcesstringstandardResource tier: standard, large, or xlarge
package-jsonfile path-Path to a package.json file specifying npm dependencies
permissionsstring[]Permission grants (repeatable)
asyncbooleanfalseEnable or disable asynchronous Reactor execution (Reactors only)
no-waitbooleanfalseDon't wait for Reactor or Proxy provisioning to complete
--async configures asynchronous Reactor execution. Use --no-wait when you don't want the CLI to wait for Reactor or Proxy provisioning.
In earlier CLI versions, --async skipped provisioning waits. Use --no-wait for that behavior.

Getting Help

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

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