Installation

Follow the procedure below to install CLI.

Step 1. Download CLI

Download the CLI corresponding to your OS and upzip it.

Step 2. Check the environment variable

Check the LG_WEBOS_TV_SDK_HOME variable using the following command.

For Windows,

> echo %LG_WEBOS_TV_SDK_HOME%

For Linux or macOS,

$ echo $LG_WEBOS_TV_SDK_HOME

If environment variable LG_WEBOS_TV_SDK_HOME already exists, the path where the SDK is installed will be output.

Step 3. Configure the environment variables

If environment variable LG_WEBOS_TV_SDK_HOME already exists,

  1. Remove the existing CLI directory in the path where the SDK is installed, which is output in Step 2.

  2. Place the CLI directory unzipped in Step 1 in the path where the SDK is installed, which is output in Step 2.

If environment variable LG_WEBOS_TV_SDK_HOME does not exist,

  1. Create webOS_TV_SDK directory in the desired path.

  2. Place the CLI directory under the webOS_TV_SDK directory.

  3. Configure the environment variables as in the following.

For Windows,

// 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
> setx /m PATH "%PATH%;%WEBOS_CLI_TV%"

Replace "YOUR_PATH" with the path you install the CLI.

For Linux or macOS,

  • For Linux, add the following at /etc/profile.
  • For macOS, add the following at /etc/profile if bash is the default shell (mojave (10.14) or lower) or at /etc/zprofile if 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

To make the changes take effect, you must execute the following command or restart the shell.

$ source /etc/profile
or
$ source /etc/zprofile

  • Before using webOS TV Emulator and webOS TV VS Code Extension, reboot the PC after configuring the environment variable.

  • If you have installed webOS OSE CLI (@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-cli

Step 4. Verify the installation

 If the installation is successful, you can see the version of webOS TV CLI by executing the ares –V command.

$ ares -V
webOS TV CLI Version: 1.12.0-j41-k

If an error, such as "command not found", occurs, try configuring the environment variable in Step 3 again. 

 

Example

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_22_Simulator_1.0.0
│   │   │   ├── webOS_TV_22_Simulator_1.0.0.appimage
│   │   │   └── ...

 


 

Navigation