CLI Installation

Caution: webOS TV CLI Deprecation
We decided to no longer support webOS TV CLI from March, 2024. We recommend that you use the webOS CLI instead.
Important
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

Follow 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

OSRequirement
WindowsWindows 7 or higher (64bit only)
LinuxUbuntu 16.04 or higher (64bit only)
macOSmacOS 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.

Linux 64-bit

Windows 64-bit

macOS 64-bit

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_HOME

If 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,
    1. Remove the existing CLI directory in the path output in Step 2.
    2. Place the new CLI directory, unzipped in Step 1, in the path 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, unzipped in Step 1, under the webOS_TV_SDK directory.
    3. Configure the environment variables as in the following. Replace "YOUR_PATH" with the path you created the webOS_TV_SDK directory.
      // 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”
    4. Restart the command window or your PC to make the changes take effect.
  • If environment variable LG_WEBOS_TV_SDK_HOME already exists,
    1. Remove the existing CLI directory in the path output in Step 2.
    2. Place the new CLI directory, unzipped in Step 1, in the path 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, unzipped in Step 1, under thewebOS_TV_SDK directory.
    3. Configure the environment variables as in the following. Replace "YOUR_PATH" with the path you created the webOS_TV_SDK directory.
      • 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
    4. Execute one of the following commands or restart the shell to make the changes take effect.
      $ source /etc/profile
      // or
      $ source /etc/zprofile
      Note
      To use webOS TV Emulator or webOS TV VS Code Extension, restart the PC.

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-j27

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_23_Simulator_1.3.0
│   │   │   ├── webOS_TV_23_Simulator_1.3.0.appimage
│   │   │   └── ...
No Headings