Skip to main content

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

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY env varManagement API key
--page-pinteger1Page 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

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY env varManagement API key
--name-nstring(prompted)Name of the Reactor
--code-rfile path(prompted)Path to JavaScript file containing reactor code
--application-id-istringApplication ID (required for node-bt runtime)
--configuration-cfile pathPath to .env format configuration file

Runtime

FlagTypeDefaultDescription
--imagestringnode-btRuntime image: node-bt or node22
--timeoutinteger10Timeout in seconds, 1–30 (node22 only)
--warm-concurrencyinteger0Warm instances, 0–1 (node22 only)
--resourcesstringstandardResource tier: standard, large, xlarge (node22 only)
--dependenciesfile pathPath to JSON dependencies file (node22 only)
--permissionsstring[]Permission grants, repeatable (node22 only)

Advanced

FlagTypeDefaultDescription
--asyncbooleanfalseDon't wait for the Reactor to be ready (node22 only)
The legacy node-bt runtime requires --application-id. The node22 runtime does not.
The --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

ArgumentRequiredDescription
idYesThe Reactor ID to update

Flags

All flags from Create Reactor, plus:

FlagShortTypeDefaultDescription
--watch-wbooleanfalseWatch code and configuration files for changes and auto-update
--logs-lbooleanfalseStream logs after update
The --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

ArgumentRequiredDescription
idYesThe Reactor ID to delete

Flags

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY env varManagement API key
--yes-ybooleanfalseSkip 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

ArgumentRequiredDescription
idNoThe Reactor ID to stream logs from

Flags

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY env varManagement API key
--port-pintegerPort for the local logs server
Streaming Reactor logs requires reactor:update permission, not just reactor:read.

Required Permissions

reactor:update

Example

bt reactors logs 03858bf5-32d3-4a2e-b74b-daeea0883bca -p 3000