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 | — | Optional Application ID. Only supported for the node-bt runtime. |
--configuration | -c | file path | — | Path to .env format configuration file |
Runtime
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.| Flag | Type | Default | Description |
|---|---|---|---|
--image | string | None | Runtime image. If omitted, the CLI prompts you to select one. Use a Node.js runtime image for new Reactors. |
--timeout | integer | 10 | Timeout in seconds, 10 to 900 (Node.js runtime images only; maximum 30 when runtime async is disabled) |
--warm-concurrency | integer | 0 | Number of warm instances. The default quota is 0. Request a higher quota if needed. (Node.js runtime images only) |
--resources | string | standard | Resource tier: standard, large, xlarge (Node.js runtime images only) |
--package-json | file path | - | Path to a package.json file specifying dependencies (Node.js runtime images only) |
--permissions | string[] | — | Permission grants, repeatable (Node.js runtime images only) |
--[no-]async | boolean | false | Enable or disable asynchronous Reactor execution (Node.js runtime images only) |
Advanced
| Flag | Type | Default | Description |
|---|---|---|---|
--no-wait | boolean | false | Don't wait for Reactor provisioning to complete |
--async configures asynchronous Reactor execution. It is independent from --no-wait, which controls whether the CLI waits for provisioning.Required Permissions
reactor:create
Examples
Create a Reactor with the node24 runtime image:
bt reactors create \
-n "My Reactor" \
-r ./reactor.js \
--image node24 \
--package-json ./package.json \
--timeout 20 \
--permissions "token:read" \
--permissions "token:create"
Create an asynchronous Reactor with the node24 runtime image:
bt reactors create \
-n "My Async Reactor" \
-r ./reactor.js \
--image node24 \
--async \
--timeout 900
Create a Reactor with the deprecated 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 | Open the legacy log tunnel after update (deprecated) |
For configurable Node.js runtimes, enable runtime-log capture and use logs tail to follow records.
--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
Disable asynchronous execution and set a synchronous timeout:
bt reactors update 03858bf5-32d3-4a2e-b74b-daeea0883bca \
--no-async \
--timeout 30
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
Use runtime logs to troubleshoot your Reactors and inspect their execution details. Review captured logs with logs read, or follow new logs with logs tail.
The Reactor must use a supported Node.js runtime image and have logging enabled. For Reactors using the deprecated node-bt runtime, see Legacy Live Logs.
log:read permission.Read Runtime Logs
bt reactors logs read '<REACTOR_ID>'
Reads Reactor runtime logs from the last hour by default.
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | The Reactor ID to read logs from |
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--management-key | -x | string | BT_MANAGEMENT_KEY environment variable | Management API key. Required unless supplied through BT_MANAGEMENT_KEY. See CLI authentication. |
--trace-id | — | string | — | Match the BT trace ID exactly (case-sensitive). |
--level | — | string | — | Match one application-log level, such as debug, info, warn, or error. This is not a minimum-severity threshold. |
--message-search | — | string | — | Match records whose message contains all analyzed query words. See Search Runtime-Log Messages. |
--since | — | string | One hour before --until | Include logs at or after this time. See Time Formats. |
--until | — | string | Now | Include logs before this time. See Time Formats. |
--format | — | string | pretty | Output format: pretty, json, or json-pretty. See CLI output formats. |
Examples
Read the previous hour:
bt reactors logs read '<REACTOR_ID>' --since 1h
Read a fixed range using timezone-qualified timestamps:
bt reactors logs read '<REACTOR_ID>' --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z
Tail Runtime Logs
bt reactors logs tail '<REACTOR_ID>'
Follows new Reactor runtime logs. Use --since to include earlier logs when starting. Press Ctrl-C to stop.
Arguments
| Argument | Required | Description |
|---|---|---|
id | Yes | The Reactor ID to tail logs from |
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--management-key | -x | string | BT_MANAGEMENT_KEY environment variable | Management API key. Required unless supplied through BT_MANAGEMENT_KEY. See CLI authentication. |
--trace-id | — | string | — | Match the BT trace ID exactly (case-sensitive). |
--level | — | string | — | Match one application-log level, such as debug, info, warn, or error. This is not a minimum-severity threshold. |
--message-search | — | string | — | Match records whose message contains all analyzed query words. See Search Runtime-Log Messages. |
--since | — | string | New logs only | Include logs from this time before following new records. See Time Formats. |
--format | — | string | pretty | Output format: pretty, json, or json-pretty. See CLI output formats. |
Tail Renewal
Interactive sessions ask Keep tailing? every 60 minutes. Press Enter to stop or choose Yes to continue. Noninteractive sessions stop after 60 minutes.
Example
Tail with a five-minute catch-up:
bt reactors logs tail '<REACTOR_ID>' --message-search 'payment failed' --since 5m
Time Formats
--since and --until accept either format below. --until is available only with logs read.
| Time format | Examples | Details |
|---|---|---|
| Relative duration | 30m, 1h | Use s for seconds, m for minutes, h for hours, d for days, or w for weeks. |
| Timestamp | 2026-10-01T12:00:00Z | Use an ISO 8601 timestamp with a timezone. |
Retrieval Limits
Both logs read and logs tail are subject to retrieval limits. If you reach a limit, add filters or use logs read with a shorter time range.
Legacy Live Logs (Deprecated)
The legacy tunnel is deprecated but remains supported for existing workflows. For supported Node.js runtimes, enable runtime logs and use Read Runtime Logs or Tail Runtime Logs instead.
bt reactors logs [id]
This legacy command opens a local tunnel and modifies logging configuration. If the Reactor ID is omitted, the CLI interactively prompts you to select a Reactor.
Arguments
| Argument | Required | Description |
|---|---|---|
id | No | The Reactor ID to stream legacy logs from. If omitted, select a Reactor interactively. |
Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--management-key | -x | string | BT_MANAGEMENT_KEY environment variable | Management API key. |
--port | -p | integer | 8220 | Port for the local logs server. |
Required Permissions
reactor:update
The interactive menu's Logs action and the Reactor update command's --logs/-l flag also open this legacy tunnel.