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
| Flag | Alias | Value/type | Allowed values | Default | Required | Conflicts/requires |
|---|---|---|---|---|---|---|
--config | — | string | — | roku-config.ts found by walking upward | no | — |
--no-uglify (deprecated → --no-minify) | -nu | boolean | — | — | no | conflicts: --no-build |
--json | — | boolean | — | — | no | — |
--out-dir | -od | string | — | — | no | — |
--minify / --no-minify | — | boolean | — | — | no | conflicts: --no-build |
--uglify (deprecated → --minify) | — | boolean | — | — | no | conflicts: --no-build |
--compile-ts / --no-compile-ts | — | boolean | — | false | no | conflicts: --no-build |
--dev-blocks / --no-dev-blocks | — | boolean | — | — | no | conflicts: --no-build |
--typecheck / --no-typecheck | — | boolean | — | — | no | conflicts: --no-build |
--solid-dev-mode / --no-solid-dev-mode | — | boolean | — | — | no | conflicts: --no-build |
--solid-dev (deprecated → --solid-dev-mode) | — | boolean | — | — | no | conflicts: --no-build |
--write-ts-path / --no-write-ts-path | — | boolean | — | true | no | conflicts: --no-build |
--no-typescript (deprecated → --no-write-ts-path) | — | boolean | — | — | no | conflicts: --no-build |
--source-map / --no-source-map | — | boolean | — | true | no | conflicts: --no-build |
--drop-console / --no-drop-console | — | boolean | — | — | no | conflicts: --no-build |
--drop-debugger / --no-drop-debugger | — | boolean | — | — | no | conflicts: --no-build |
--lower-destructuring / --no-lower-destructuring | — | boolean | — | true for release builds, false for debug builds | no | conflicts: --no-build |
--disable-type-checking (deprecated → --no-typecheck) | — | boolean | — | — | no | conflicts: --no-build |
--show-copied-files | — | boolean | — | — | no | — |
--build-type | — | string | — | production for rk build, development for rk dev | no | conflicts: --no-build |
--perfetto-paths | — | string (repeatable) | — | — | no | conflicts: --no-build |
--perfetto-exclude | — | string (repeatable) | FunctionDeclaration, VariableDeclarator, FunctionExpression, ObjectMethod | — | no | conflicts: --no-build |
--perfetto-filter | — | string (repeatable) | — | — | no | conflicts: --no-build |
--release | — | boolean | — | — | no | conflicts: --no-build, --debug, --inspect, --inspect-persist |
--build / --no-build | — | boolean | — | true | no | --no-build conflicts: --no-sideload |
--build-only (deprecated → --no-sideload) | — | boolean | — | — | no | conflicts: --device, --host, --password, --start, --max-runtime, --dap-debug, --launch-params, --no-launch, --console, --auto-console-close, --no-build |
--sideload / --no-sideload | — | boolean | — | true | no | --no-sideload conflicts: --no-build |
--launch / --no-launch | — | boolean | — | true | no | --no-launch conflicts: --no-sideload |
--watch | -w | boolean | — | — | no | conflicts: --no-build |
--console | -c | boolean | — | — | no | conflicts: --no-sideload |
--auto-console-close | — | boolean | — | — | no | conflicts: --no-sideload |
--debug | -d | boolean | — | — | no | conflicts: --no-build, --release |
--inspect | — | boolean | — | — | no | conflicts: --no-build, --release |
--inspect-persist | — | boolean | — | — | no | conflicts: --no-build, --release |
--dap-debug | — | boolean | — | — | no | conflicts: --no-sideload, --start |
--bump-build | — | boolean | — | — | no | — |
--device | — | string | — | — | no | conflicts: --no-sideload |
--host | — | string | — | — | no | conflicts: --no-sideload, --start |
--password | — | string | — | — | no | conflicts: --no-sideload |
--start | — | boolean | — | — | no | conflicts: --no-sideload, --host, --dap-debug |
--max-runtime | — | string | — | the registration's value, else 3600 | no | conflicts: --no-sideload; requires: --start |
--launch-params | -lp | string | — | — | no | conflicts: --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 --consoleEnvironment variables
| Environment variable | Description |
|---|---|
RK_RCE_TOKEN | The 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_URL | Points 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_LIFECYCLE | Set 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
- startDev (
POST /api/dev) - stopDev (
DELETE /api/dev/:sessionId) - rebuildDev (
POST /api/dev/:sessionId/rebuild) - deploy_app
- stop_dev_session
Updated about 3 hours ago