CLI Installation
@webosose/ares-cli) with npm, you first need to remove it using the following command before installing webOS TV CLI.npm uninstall -g @webosose/ares-cliFollow the procedure below to install CLI.
Prepare for installation
Check if the system requirements are met before starting installation. CLI may work even if they are not met but stability is not guaranteed.
System requirements
| OS | Requirement |
|---|---|
| Windows | Windows 7 or higher (64bit only) |
| Linux | Ubuntu 16.04 or higher (64bit only) |
| macOS | macOS High Sierra (10.13) or higher (64bit only) |
Step 1. Download CLI
Download the CLI (V1.12.4) corresponding to your OS and upzip it.
Step 2. Check the environment variable
Check the LG_WEBOS_TV_SDK_HOME variable using theecho command.
echo %LG_WEBOS_TV_SDK_HOME%echo $LG_WEBOS_TV_SDK_HOMEIf environment variable LG_WEBOS_TV_SDK_HOMEalready exists, its path will be output.
Step 3. Configure the environment variables
Configure the environment variables. If environment variable LG_WEBOS_TV_SDK_HOMEalready exists, you can skip the configuration and will just replace the existing CLIdirectory with the new one.
- If environment variable LG_WEBOS_TV_SDK_HOME already exists,
- Remove the existing
CLIdirectory in the path output in Step 2. - Place the new
CLIdirectory, unzipped in Step 1, in the path output in Step 2.
- Remove the existing
- If environment variable LG_WEBOS_TV_SDK_HOME does not exist,
- Create
webOS_TV_SDKdirectory in the desired path. - Place the
CLIdirectory, unzipped in Step 1, under thewebOS_TV_SDKdirectory. - Configure the environment variables as in the following. Replace "YOUR_PATH" with the path you created the
webOS_TV_SDKdirectory.// Setting the LG_WEBOS_TV_SDK_HOME variable to the parent directory of CLI > setx /m LG_WEBOS_TV_SDK_HOME "C:\YOUR_PATH\webOS_TV_SDK" // Setting the WEBOS_CLI_TV variable to the bin directory of CLI > setx /m WEBOS_CLI_TV "%LG_WEBOS_TV_SDK_HOME%\CLI\bin" // Adding the bin directory of CLI to the PATH variable // on CMD > setx /m PATH "%PATH%;%WEBOS_CLI_TV%" // or on PowerShell > setx /m PATH "$Env:PATH;$Env:WEBOS_CLI_TV” - Restart the command window or your PC to make the changes take effect.
- Create
- If environment variable LG_WEBOS_TV_SDK_HOME already exists,
- Remove the existing
CLIdirectory in the path output in Step 2. - Place the new
CLIdirectory, unzipped in Step 1, in the path output in Step 2.
- Remove the existing
- If environment variable LG_WEBOS_TV_SDK_HOME does not exist,
- Create
webOS_TV_SDKdirectory in the desired path. - Place the
CLIdirectory, unzipped in Step 1, under thewebOS_TV_SDKdirectory. - Configure the environment variables as in the following. Replace "YOUR_PATH" with the path you created the
webOS_TV_SDKdirectory.- For Linux, add the following at
/etc/profile. - For macOS, add the following at
/etc/profileif bash is the default shell (mojave (10.14) or lower) or at/etc/zprofileif zsh is the default shell (catalina (10.15) or higher).
# Setting the LG_WEBOS_TV_SDK_HOME variable to the parent directory of CLI export LG_WEBOS_TV_SDK_HOME="/YOUR_PATH/webOS_TV_SDK" if [ -d "$LG_WEBOS_TV_SDK_HOME/CLI/bin" ]; then # Setting the WEBOS_CLI_TV variable to the bin directory of CLI export WEBOS_CLI_TV="$LG_WEBOS_TV_SDK_HOME/CLI/bin" # Adding the bin directory of CLI to the PATH variable export PATH="$PATH:$WEBOS_CLI_TV" fi - For Linux, add the following at
- Execute one of the following commands or restart the shell to make the changes take effect.
$ source /etc/profile // or $ source /etc/zprofileNoteTo use webOS TV Emulator or webOS TV VS Code Extension, restart the PC.
- Create
Step 4. Verify the installation
Verify the installation by executing the ares –V command. If the installation is successful, you will see the version of webOS TV CLI as a result.
$ ares -V
webOS TV CLI Version: 1.12.4-j27Example
The following is an example of environment variable LG_WEBOS_TV_SDK_HOME and file tree on Linux.
$ echo $LG_WEBOS_TV_SDK_HOME
/home/user/tool/webOS_TV_SDK/home/user/tool/
├── webOS_TV_SDK
│ ├── CLI
│ │ ├── bin
│ │ └── ...
│ ├── Simulator
│ │ ├── webOS_TV_23_Simulator_1.3.0
│ │ │ ├── webOS_TV_23_Simulator_1.3.0.appimage
│ │ │ └── ...