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-istring—Optional Application ID. Only supported for the node-bt runtime.
--configuration-cfile path—Path to .env format configuration file

Runtime​

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.
FlagTypeDefaultDescription
--imagestringNoneRuntime image. If omitted, the CLI prompts you to select one. Use a Node.js runtime image for new Reactors.
--timeoutinteger10Timeout in seconds, 10 to 900 (Node.js runtime images only; maximum 30 when runtime async is disabled)
--warm-concurrencyinteger0Number of warm instances. The default quota is 0. Request a higher quota if needed. (Node.js runtime images only)
--resourcesstringstandardResource tier: standard, large, xlarge (Node.js runtime images only)
--package-jsonfile path-Path to a package.json file specifying dependencies (Node.js runtime images only)
--permissionsstring[]—Permission grants, repeatable (Node.js runtime images only)
--[no-]asyncbooleanfalseEnable or disable asynchronous Reactor execution (Node.js runtime images only)

Advanced​

FlagTypeDefaultDescription
--no-waitbooleanfalseDon'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​

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-lbooleanfalseOpen the legacy log tunnel after update (deprecated)

For configurable Node.js runtimes, enable runtime-log capture and use logs tail to follow records.

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

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​

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​

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.

Use a Management API key with the log:read permission.

Read Runtime Logs​

Read Reactor Logs
bt reactors logs read '<REACTOR_ID>'

Reads Reactor runtime logs from the last hour by default.

Arguments​

ArgumentRequiredDescription
idYesThe Reactor ID to read logs from

Flags​

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY environment variableManagement 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—stringOne hour before --untilInclude logs at or after this time. See Time Formats.
--until—stringNowInclude logs before this time. See Time Formats.
--format—stringprettyOutput format: pretty, json, or json-pretty. See CLI output formats.

Examples​

Read the previous hour:

Read Reactor Logs
bt reactors logs read '<REACTOR_ID>' --since 1h

Read a fixed range using timezone-qualified timestamps:

Read Reactor Logs for a Fixed Range
bt reactors logs read '<REACTOR_ID>' --since 2026-10-01T10:00:00Z --until 2026-10-01T10:15:00Z

Tail Runtime Logs​

Tail Reactor 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​

ArgumentRequiredDescription
idYesThe Reactor ID to tail logs from

Flags​

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY environment variableManagement 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—stringNew logs onlyInclude logs from this time before following new records. See Time Formats.
--format—stringprettyOutput 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:

Tail Reactor Logs
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 formatExamplesDetails
Relative duration30m, 1hUse s for seconds, m for minutes, h for hours, d for days, or w for weeks.
Timestamp2026-10-01T12:00:00ZUse 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​

ArgumentRequiredDescription
idNoThe Reactor ID to stream legacy logs from. If omitted, select a Reactor interactively.

Flags​

FlagShortTypeDefaultDescription
--management-key-xstringBT_MANAGEMENT_KEY environment variableManagement API key.
--port-pinteger8220Port 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.