rk dev

Summary

Build a project, install it on a Roku device, and launch it.

Description

This is the development loop. By default it builds to dist-dev, sideloads the result to the active device, and launches the app. Either half can be skipped: --no-build installs an already-built app without rebuilding, and --no-sideload builds without contacting a device at all. Formerly rk start-dev, which still works as a deprecated alias.

Usage

rk dev [options]

Options

FlagAliasValue/typeAllowed valuesDefaultRequiredConflicts/requires
--config—string—roku-config.ts found by walking upwardno—
--no-uglify (deprecated → --no-minify)-nuboolean——noconflicts: --no-build
--json—boolean——no—
--out-dir-odstring——no—
--minify / --no-minify—boolean——noconflicts: --no-build
--uglify (deprecated → --minify)—boolean——noconflicts: --no-build
--compile-ts / --no-compile-ts—boolean—falsenoconflicts: --no-build
--dev-blocks / --no-dev-blocks—boolean——noconflicts: --no-build
--typecheck / --no-typecheck—boolean——noconflicts: --no-build
--solid-dev-mode / --no-solid-dev-mode—boolean——noconflicts: --no-build
--solid-dev (deprecated → --solid-dev-mode)—boolean——noconflicts: --no-build
--write-ts-path / --no-write-ts-path—boolean—truenoconflicts: --no-build
--no-typescript (deprecated → --no-write-ts-path)—boolean——noconflicts: --no-build
--source-map / --no-source-map—boolean—truenoconflicts: --no-build
--drop-console / --no-drop-console—boolean——noconflicts: --no-build
--drop-debugger / --no-drop-debugger—boolean——noconflicts: --no-build
--lower-destructuring / --no-lower-destructuring—boolean—true for release builds, false for debug buildsnoconflicts: --no-build
--disable-type-checking (deprecated → --no-typecheck)—boolean——noconflicts: --no-build
--show-copied-files—boolean——no—
--build-type—string—production for rk build, development for rk devnoconflicts: --no-build
--perfetto-paths—string (repeatable)——noconflicts: --no-build
--perfetto-exclude—string (repeatable)FunctionDeclaration, VariableDeclarator, FunctionExpression, ObjectMethod—noconflicts: --no-build
--perfetto-filter—string (repeatable)——noconflicts: --no-build
--release—boolean——noconflicts: --no-build, --debug, --inspect, --inspect-persist
--build / --no-build—boolean—trueno--no-build conflicts: --no-sideload
--build-only (deprecated → --no-sideload)—boolean——noconflicts: --device, --host, --password, --start, --max-runtime, --dap-debug, --launch-params, --no-launch, --console, --auto-console-close, --no-build
--sideload / --no-sideload—boolean—trueno--no-sideload conflicts: --no-build
--launch / --no-launch—boolean—trueno--no-launch conflicts: --no-sideload
--watch-wboolean——noconflicts: --no-build
--console-cboolean——noconflicts: --no-sideload
--auto-console-close—boolean——noconflicts: --no-sideload
--debug-dboolean——noconflicts: --no-build, --release
--inspect—boolean——noconflicts: --no-build, --release
--inspect-persist—boolean——noconflicts: --no-build, --release
--dap-debug—boolean——noconflicts: --no-sideload, --start
--bump-build—boolean——no—
--device—string——noconflicts: --no-sideload
--host—string——noconflicts: --no-sideload, --start
--password—string——noconflicts: --no-sideload
--start—boolean——noconflicts: --no-sideload, --host, --dap-debug
--max-runtime—string—the registration's value, else 3600noconflicts: --no-sideload; requires: --start
--launch-params-lpstring——noconflicts: --no-sideload

--config

path to config file

Example:

rk dev --config apps/demo/roku-config.ts

--no-uglify

[deprecated] use --no-minify

--json

Output in JSON format

--out-dir

output directory for build artifacts

--minify

enable minification (whitespace + identifiers).

--uglify

[deprecated] use --minify

--compile-ts

compile the TypeScript/JavaScript bundle to Hermes bytecode locally.

--dev-blocks

keep development-only code: sets DEV to true so if (DEV) {} blocks are kept. --no-dev-blocks sets DEV to false.

--typecheck

enable TypeScript semantic type checking.

--solid-dev-mode

use Solid's development build so Solid devtools can inspect the app (implies --no-compile-ts --no-minify)

--solid-dev

[deprecated] use --solid-dev-mode

--write-ts-path

add the TypeScript entry point (ts_path) to the manifest. --no-write-ts-path is for BrightScript-only apps and DCLs (also skips type checking).

--no-typescript

[deprecated] use --no-write-ts-path

--source-map

generate source maps.

--drop-console

drop console.* calls. Console calls cost milliseconds each on a device, so release builds drop them.

--drop-debugger

drop debugger statements.

--lower-destructuring

rewrite const [a, b] = createSignal() and similar Solid calls to indexed reads for smaller bytecode.

--disable-type-checking

[deprecated] use --no-typecheck

--show-copied-files

show individual file copy operations (verbose mode)

--build-type

Label passed to getBuildType().

--perfetto-paths

Folder path prefix for Perfetto auto-instrumentation (repeatable; comma-separated values per flag also supported)

Example:

rk dev --perfetto-paths src/screens,src/components --perfetto-paths src/data

--perfetto-exclude

Babel visitor shapes to skip during Perfetto auto-instrumentation (repeatable; comma-separated values per flag also supported)

Example:

rk dev --perfetto-paths src --perfetto-exclude FunctionExpression,ObjectMethod

--perfetto-filter

Trace name substrings to include during Perfetto auto-instrumentation (repeatable; comma-separated values per flag also supported)

Example:

rk dev --perfetto-paths src --perfetto-filter render,fetch

--release

release build preset: --minify --typecheck --no-dev-blocks --drop-console --drop-debugger. Leaves compile-ts at its default (off).

--build

build the app. --no-build sideloads the existing build and rejects any option that affects the build output.

--build-only

[deprecated] use --no-sideload

--sideload

sideload the build to the device. --no-sideload builds without contacting a device and rejects device options.

--launch

launch the app after sideloading. --no-launch only installs it.

--watch

watch for changes and rebuild

--console

connect to device console (port 8085) and stream output

--auto-console-close

auto-close console connection after completion (Pilot integration)

--debug

run in debug mode

--inspect

enable inspect mode (implies --debug; merges into launchParams.inspect)

--inspect-persist

persist inspect mode on device (requires FW 16.0+; implies --debug; all subsequent launches wait for debugger until reinstalled without this flag)

--dap-debug

sideload with remotedebug fields so the device opens the BrightScript debug protocol port (8081). Requires protocol >=3.2 on the device (checked via ECP before any build starts).

--bump-build

force a different build_version on this sideload (ephemeral, in-memory only -- no persisted version.json, unlike build --archive's --bump-build). Guards against the device's identical-package trap, where a byte-identical redeploy reports Install Success but does not relaunch, silently leaving the previous instance running.

--device

target device to use (id | ip | name, or rce:<name>); overrides config.device and default

Example:

rk dev --device rce:living-room

--host

connect directly to a device by IPv4 or hostname

--password

device developer password override

--start

start a stopped Roku Cloud Emulator device, building while it boots. It keeps running afterwards (stop it with rk device stop), unless --watch, or --console without --auto-console-close, holds rk dev open: then it stops when rk dev exits

--max-runtime

with --start: the longest the device may run, in seconds

Example:

rk dev --device rce:living-room --start --max-runtime 1800

--launch-params

launch parameters in JSON format (e.g., '{"contentId":"123","mediaType":"movie"}')

Example:

rk dev --launch-params '{"contentId":"123","mediaType":"movie"}'

Examples

rk dev --no-sideload
rk dev --watch --console
rk dev --release --device living-room
rk dev --no-build --device 192.168.1.20 --console

Environment variables

Environment variableDescription
RK_RCE_TOKENThe Roku Cloud Emulator (RCE) token. When set, it takes precedence over the token saved by rk device set-rce-token. That suits CI, where the token comes from a masked variable.
RK_RCE_API_URLPoints rk at another RCE Core API (an https host under rce.roku.com, or 127.0.0.1, [::1] or localhost on any port, for testing). The default is https://api.rce.roku.com/api/v1. A value that is not a URL is reported by the variable's name, without echoing it.
RK_RCE_NO_LIFECYCLESet to 1 by rk server in the processes it spawns: they use running RCE devices but never start or stop one. Not meant to be set by hand.

All documented variables are listed on rk environment variables.

See also


Did this page help you?