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
The node-bt runtime is deprecated. Use a Node.js runtime image for new Reactors and Proxy code transforms. Migrate away from the node-bt runtime as soon as possible to avoid disruption.

Runtime Images​

The CLI supports the following runtime images:

  • node-bt (Deprecated): Legacy runtime retained for existing workflows. The --application-id option is supported only for this runtime.
  • node22: Node.js 22 with configurable runtime options.
  • node24: Node.js 24 with the same configurable runtime options.

The Node.js runtime images provide the following options for Proxy 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. The default quota is 0 for Test tenants and 1 for Production tenants. Request a higher quota if needed.
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