CLI
The Basis Theory CLI (bt) enables you to manage Applications, Proxies, and Reactors from the command line.
Installation
- npm
- yarn
npm install -g @basis-theory-labs/cli
yarn global add @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
| Command | Description |
|---|---|
bt applications | Manage Applications |
bt proxies | Manage Pre-Configured Proxies |
bt reactors | Manage Reactors |
Node22 Runtime
Proxies and Reactors support two runtime images:
node-bt(legacy) — The original runtime. Requires--application-idfor transforms.node22— The modern runtime with additional configuration options.
The node22 runtime supports these additional options (available on Proxies transforms and Reactors):
| Option | Type | Default | Description |
|---|---|---|---|
timeout | integer | 10 | Execution timeout in seconds (1–30) |
warm-concurrency | integer | 0 | Number of warm instances (0–1) |
resources | string | standard | Resource tier: standard, large, or xlarge |
dependencies | file path | — | Path to a JSON file specifying npm dependencies |
permissions | string[] | — | 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