Reactors
Commands for managing Reactors.
List Reactors
bt reactors
Lists all Reactors in your tenant with pagination. When run interactively, selecting a Reactor provides options to view details, stream logs, or delete.
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--management-key | -x | string | BT_MANAGEMENT_KEY env var | Management API key |
--page | -p | integer | 1 | Page number to fetch |
Required Permissions
reactor:read
Example
bt reactors -p 2
Create Reactor
bt reactors create
Creates a new Reactor. When flags are omitted, the CLI will interactively prompt for required values.
Flags
Basic
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--management-key | -x | string | BT_MANAGEMENT_KEY env var | Management API key |
--name | -n | string | (prompted) | Name of the Reactor |
--code | -r | file path | (prompted) | Path to JavaScript file containing reactor code |
--application-id | -i | string | — | Application ID (required for node-bt runtime) |
--configuration | -c | file path | — | Path to .env format configuration file |
Runtime
| Flag | Type | Default | Description |
|---|---|---|---|
--image | string | node-bt | Runtime image: node-bt or node22 |
--timeout | integer | 10 | Timeout in seconds, 1–30 (node22 only) |
--warm-concurrency | integer | 0 | Warm instances, 0–1 (node22 only) |
--resources | string | standard | Resource tier: standard, large, xlarge (node22 only) |
--dependencies | file path | — | Path to JSON dependencies file (node22 only) |
--permissions | string[] | — | Permission grants, repeatable (node22 only) |
Advanced
| Flag | Type | Default | Description |
|---|---|---|---|
--async | boolean | false | Don't wait for the Reactor to be ready (node22 only) |
node-bt runtime requires --application-id. The node22 runtime does not.--async flag is only valid with the node22 runtime.Required Permissions
reactor:create
Examples
Create a Reactor with the node22 runtime:
bt reactors create \
-n "My Reactor" \
-r ./reactor.js \
--image node22 \
--dependencies ./package.json \
--timeout 20 \
--permissions "token:read" \
--permissions "token:write"
Create a Reactor with the legacy node-bt runtime:
bt reactors create \
-n "My Reactor" \
-r ./reactor.js \
-i "your-application-id" \
--image node-bt
Update Reactor
bt reactors update <id>
Updates an existing Reactor.
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | The Reactor ID to update |
Flags
All flags from Create Reactor, plus:
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--watch | -w | boolean | false | Watch code and configuration files for changes and auto-update |
--logs | -l | boolean | false | Stream logs after update |
--watch flag monitors your code and configuration files for changes, automatically redeploying when files are saved. This is useful during development.Required Permissions
reactor:update
Examples
Update and watch for file changes:
bt reactors update 03858bf5-32d3-4a2e-b74b-daeea0883bca \
-r ./reactor.js \
-w
Update and stream logs:
bt reactors update 03858bf5-32d3-4a2e-b74b-daeea0883bca \
-r ./reactor.js \
-l
Delete Reactor
bt reactors delete <id>
Deletes a Reactor. By default, the CLI will prompt for confirmation before deleting.
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | The Reactor ID to delete |
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--management-key | -x | string | BT_MANAGEMENT_KEY env var | Management API key |
--yes | -y | boolean | false | Skip confirmation prompt |
Required Permissions
reactor:delete
Example
bt reactors delete 03858bf5-32d3-4a2e-b74b-daeea0883bca -y
Reactor Logs
bt reactors logs [id]
Streams real-time logs from a Reactor. If no ID is provided, the CLI will prompt you to select a Reactor from a list.
Arguments
| Argument | Required | Description |
|---|---|---|
id | No | The Reactor ID to stream logs from |
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--management-key | -x | string | BT_MANAGEMENT_KEY env var | Management API key |
--port | -p | integer | — | Port for the local logs server |
reactor:update permission, not just reactor:read.Required Permissions
reactor:update
Example
bt reactors logs 03858bf5-32d3-4a2e-b74b-daeea0883bca -p 3000