Introduction
The CLI (Command Line Interface) provides a collection of commands used for creating, packaging, installing, and launching web apps in the command line environment. The CLI allows you to develop and test your app without having to use a specific IDE.
CLI Features
With the CLI, you can install your app on a target device, such as the emulator or webOS TV. Besides, you can retrieve, run, terminate, and remove the apps installed on the target device. You can use the CLI during any of the following stages of the development process:
Commands
The following shows the commands you could use:
Commands |
Descriptions |
---|---|
ares |
Provides the help menu for using the ares commands |
Creates a web app from a template. |
|
Creates and analyses an app package file. |
|
Manages the target devices. |
|
Installs an app on the target device. |
|
Runs or terminates the web app. |
|
Runs the Web Inspector for web app debugging. |
|
Runs the Web server for testing local app files. |
|
Gets a private key from webOS TV for the Developer Mode app. |
|
Retrieves a device's system information and monitors the device's resource usage. |
|
ares-extend-dev | Extends the session time of the developer mode for the Developer Mode app. |
-
Open All
-
- ares-device-info
-
Retrieves the following system information of a device.
-
Model name
-
SDK version
-
Firmware version
-
Board type
-
OTA (Over The Air) ID
Note that only retrieved information is shown if this command fails to retrieve some system information.
With the resource-monitor option, you can monitor CPU (%) and memory (KB) usage of the target device or running apps and services.
Usages
ares-device-info
ares-device-info [OPTION...]
ares-device-info [OPTION...] --resource-monitor|-r
ares-device-info --device|-d
ares-device-info --device-list|-D
ares-device-info --version|-V
ares-device-info --help|-h
Options
Option
Parameter
Description
-d, --device
TARGET_DEVICE
Specifies the target device on which the command is executed.
-r, --resource-monitor
None
Monitors resource usage of the target device.
-l, --list
None
Monitors resource usage of running apps and services. Use this option with the --resource-monitor option.
-id, --id-filter
ID
Use this option with the --resource-monitor option.
-t, --time-interval
TIME_INTERVAL
Sets the monitoring interval in seconds. Use this option with the --resource-monitor option.
-s, --save
CSV_FILE
Specifies the file name or path to save the resource usage data. Use this option with the --resource-monitor option.
--device-list
None
Lists all the available devices.
-v
None
Displays the execution log.
--version
None
Displays the version of the ares-device-info command.
-h, --help
None
Displays the help of the ares-device-info command.
Parameters
Parameter
Description
TARGET_DEVICE
Specifies the target device for retrieving information of a device.
ID
Specifies the ID of the app or service whose resource usage is displayed.
TIME_INTERVAL
Specifies the time interval for monitoring resource usage in seconds.
CSV_FILE
Specifies a file name or path to save the resource usage data. The file can be the .csv format only.
Examples
Here are some examples of CLI usages:
Listing available target devices
ares-device-info --device-list
Retrieving a device's valid system information
ares-device-info --device target
modelName: WEBOS4.0
sdkVersion: 04.00.00
firmwareVersion: 04.00.00
boardType: M16PP_ATSC_KR
otaId: HE_DTV_W18H_AFADATAADisplaying the resource usage
ares-device-info -d Device -r
Displaying the resource usage periodically and saving the data into a CSV file
ares-device-info -d DEVICE -r -s resource.csv -t 1
Displaying the resource usage by running apps and services
ares-device-info -d DEVICE -r -l
Displaying the resource usage by the specified running app every three seconds
ares-device-info -d DEVICE -r -id com.example.app -t 3
-