rk ecp
Summary
External Control Protocol (ECP) commands for Roku devices.
Description
Query and control Roku devices via the External Control Protocol (ECP).
Usage
rk ecp <subcommand> [options]Environment 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.
query/app-ui
Summary
Query the SceneGraph UI hierarchy of the running application (alias: query-ui).
Description
Query the SceneGraph UI hierarchy of the running application (alias: query-ui).
Usage
rk ecp query/app-ui [options]Options
| Flag | Alias | Value/type | Required |
|---|---|---|---|
--json | — | boolean | no |
--device | — | string | no |
--host | — | string | no |
--password | — | string | no |
--output | -o | string | no |
--json
Output in JSON format
--device
Target device (ID, IP, or name)
--host
Connect directly to a device by IPv4 or hostname
--password
Device developer password override
--output
Save output to file
See also
query/device-info
Summary
Query device information (model, serial, software version, etc.).
Description
Query device information (model, serial, software version, etc.).
Usage
rk ecp query/device-info [options]Options
| Flag | Alias | Value/type | Required |
|---|---|---|---|
--json | — | boolean | no |
--device | — | string | no |
--host | — | string | no |
--password | — | string | no |
--output | -o | string | no |
--pretty | -p | boolean | no |
--json
Output in JSON format
--device
Target device (ID, IP, or name)
--host
Connect directly to a device by IPv4 or hostname
--password
Device developer password override
--output
Save output to file
--pretty
Human-readable key-value format
See also
keypress
Summary
Simulate pressing a remote control key.
Description
Simulate pressing a remote control key.
Usage
rk ecp keypress <KEY> [options]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| KEY | ECP remote key name. | yes | no |
Options
| Flag | Value/type | Required |
|---|---|---|
--json | boolean | no |
--device | string | no |
--host | string | no |
--password | string | no |
--json
Output in JSON format
--device
Target device (ID, IP, or name)
--host
Connect directly to a device by IPv4 or hostname
--password
Device developer password override
See also
input
Summary
Send custom launch parameters to the running app.
Description
Send custom launch parameters to the running app.
Usage
rk ecp input [<key=value>...] [options]| Argument | Description | Required | Repeatable |
|---|---|---|---|
| key=value | Launch parameter key-value pair; URL-encoded automatically. | no | yes |
Options
| Flag | Value/type | Required |
|---|---|---|
--device | string | no |
--host | string | no |
--password | string | no |
--file | string | no |
--json | string | no |
--uri | string | no |
--device
Target device (ID, IP, or name)
--host
Connect directly to a device by IPv4 or hostname
--password
Device developer password override
--file
Read input parameters from JSON file
Example:
rk ecp input --file deeplink.json--json
Input parameters as JSON string
Example:
rk ecp input --json '{"contentId":"123","mediaType":"movie"}'--uri
Pre-encoded URI query string
Example:
rk ecp input --uri "contentId=123&mediaType=movie"See also
capture-screen
Summary
Capture current device screen and save image to disk.
Description
Capture current device screen and save image to disk.
Usage
rk ecp capture-screen [options]Options
| Flag | Alias | Value/type | Allowed values | Default | Required |
|---|---|---|---|---|---|
--format | — | string | png, jpeg | png | no |
--output | -o | string | — | — | no |
--device | — | string | — | — | no |
--host | — | string | — | — | no |
--password | — | string | — | — | no |
--json | — | boolean | — | — | no |
--format
Screenshot format
--output
Output file path or directory
--device
Target device (ID, IP, or name)
--host
Connect directly to a device by IPv4 or hostname
--password
Device developer password override
--json
Output in JSON format
See also
Updated about 5 hours ago