Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@webos-tools/cli

webos-tools21.1kApache-2.03.2.1

Command Line Interface for development webOS application and service

ares-cli, webOS, webOS OSE, webOS TV, webOS CLI, webOS SDK, LG

readme

@webos-tools/cli

@webos-tools/cli is a Command-Line Interface (CLI) for webOS. It provides a collection of commands for creating, packaging, installing, and launching webOS apps or services in a command-line environment. With @webos-tools/cli, you can develop and test your app or service without using any IDE.

Announcement

We moved here from @webosose/ares-cli. In the future, we plan to develop and maintain a single webOS CLI here to support webOS.

We are releasing a single CLI that supports both webOS OSE and webOS TV through this released CLI (v3.0.0). You can switch to CLI for OSE or TV by installing one CLI and changing only the profile. For more details, see Profile Settings.

From the released CLI (v3.1.2) we integrated CLI commands for webOS APOLLO. You can switch to CLI for APOLLO by changing only the profile to apollo.

From the released CLI (v3.2.0) we integrated CLI commands for webOS SIGNAGE. You can switch to CLI for SIGNAGE by changing only the profile to signage.

Installation

[!IMPORTANT] If @webosose/ares-cli is installed globally, uninstall it before install globally @webos-tools/cli.

# Uninstall globally @webosose/ares-cli
$ npm uninstall -g @webosose/ares-cli
# Check whether uninstall @webosose/ares-cli
$ ares -V
ares: command not found

The @webos-tools/cli is installed using npm.

Note: @webos-tools/cli was tested on Node.js v14.15.1 and v16.20.2.

You can install @webos-tools/cli using the following command. We recommend installing it globally. For Linux and macOS, you might need the sudo command.

$ npm install -g @webos-tools/cli

Profile Settings

You can change the profile to tv, ose, apollo or signage. The default profile is tv (webOS TV).

$ ares-config --profile ose
profile and config data is changed to ose

You can change the profile at any time while using the CLI by using the above command.

Compatibility

The release cycle of @webos-tools/cli is independent from that of webOS OSE or webOS TV. The latest CLI is compatible with the latest webOS OSE and webOS TV. So, we recommend using the latest version of CLI.

If you want to use previous version of CLI, check the compatibility table for each platform.

Command List

The following table shows a list supported commands. For more details, refer to user guides in Documentation.

Command Description OSE TV APOLLO SIGNAGE
ares-config Configures webOS CLI. v v v v
ares Displays the help information for ares commands. v v v v
ares-generate Creates a webOS app or service from templates. v v v v
ares-package Packages the app or services into a package file. v v v v
ares-setup-device Manages the target devices. v v v v
ares-novacom Command Line Tool to control the device. | v | v
ares-install Installs the app or service on the target device. v v v v
ares-launch Launches or terminates the app. v v v v
ares-inspect Enables Web Inspector or Node's Inspector for debugging web app or JS service. v v v v
ares-server Runs the Web server for testing local app file. v v v v
ares-shell Executes shell commands in the target device. v | v
ares-push Pushes file(s) from a host machine to a target device. v | v
ares-pull Pulls file(s) from a target device to a host machine. v | v
ares-device Displays the device information. v v v
ares-log Shows or saves logs of webOS apps and services. v | v

Documentation

For ose profile:

For tv profile:

For signage profile:

Testing

You can test the @webos-tools/cli commands and their options to check their validity. Tests are performed by jasmine.

Prerequisites

  1. Turn on the webOS device.
  2. Check the IP address and SSH port number.
  3. (Only for webOS TV) Enable the developer mode. See App Testing with Developer Mode App

Performing the Test

The following table lists the default configurations for the test.

Parameter Value
profile ose
device emulator
ip 127.0.0.1
port 6622
  • Test with default configurations.

      $ jasmine

    or

      $ jasmine --profile=ose --device=emulator --ip=127.0.0.1 --port=6622
  • Test with specific configurations. (The port number can be omitted when using port 22.)

      $ jasmine --profile=ose --device=webOSOSE --ip=192.168.0.12
  • Test with specific port configurations.

      $ jasmine --profile=ose --device=webOSOSE --ip=192.168.0.12 --port=24
  • Test ares-generate command.

      $ jasmine --profile=ose --device=webOSOSE --ip=192.168.0.12 --port=24 spec/jsSpec/ares-generate.js
  • Test the tv profile. passPhrase must be entered as an input parameter. See Turning Developer Mode on.

      $ jasmine --profile=tv --device=webOSTV --ip=192.168.0.12 --port=9922 --passPhrase=AB12CD

Contributing

You can contribute your source codes to our repository.

The step-by-step guide is as follows:

  1. Fork the @webos-tools/cli repository. Make sure that you fork the whole repository.
  2. Create a new branch from the develop branch.
  3. Implement the source codes and git push the changes to the new branch.
  4. Create a pull request. When you write the description for the pull request, make sure you follow Pull Request Description Guidelines.
  5. Submit the pull request to the owner.

Pull Request Description Guide

The following is an example of the pull reqeust description

Change ares-device-info to ares-device  

:Release Notes: 
Expand the scope of ares-device-info command by changing its name

:Detailed Notes:
For now, the scope of the ares-device-info command seems to narrow,
so it is hard to add other options to the command (such as capture)
- Rename ares-device-info.js to ares-device.js
- Add --system-info and --session-info options
- Update ares-device TC

:Testing Performed:
1. All unit test passed
2. ESLint done
3. Check the below commands
   $ ares-device
   $ ares-device --system-info
   $ ares-device --session-info

:Issues Addressed:
[ISSUE-1] Change ares-device-info to ares-device
  • Summary: Describe the summary of this pull request. Make sure you capitalize the first letter of the summary.
  • Release Notes: Describe what this pull request implements.
  • Detailed Notes: Describe the problems of this pull request and how to fix them.
  • Testing Performed: Describe tests you performed.
    • Unit test: Run CLI unit test via jasmine on the target device or emulator and write the result. All unit tests must be passed.
    • ESlint: Run eslint on @webos-tools/cli root directory and write the result. No warning or error would be allowed.
    • Detailed test steps for changes: Write commands that can test your changes. Make sure that maintainers can verify your changes using these steps.
  • Issues Addressed: Write issue numbers and those summary.

Unless otherwise specified, all content, including all source code files and documentation files in this repository are:

Copyright (c) 2020-2024 LG Electronics, Inc.

All content, including all source code files and documentation files in this repository except otherwise noted are:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0

changelog

3.2.1 (April 2, 2025)

ares-package

  • Fixed a bug related to the use of the sign and certificate options in tv profile.

3.2.0 (December 24, 2024)

ares-config

  • Added support for the signage profile with the -p option.

ares-package

  • Introduced a new option: --remainPlainIPK. This option is only available for the signage profile and must be used with the --encrypt option. This option will generate an additional unencrypted IPK file in the same folder as the encrypted IPK file. The unencrypted file has the same name as the encrypted file but with the .ipk_plain extension.
  • Introduced new options: --sign, and --certificate. These options are only available for the signage profile.
  • Added support for exclusion by file path using the --app-exclude option.

ares-setup-device

  • Added a passphrase column to the device list table printed on the console.
  • Modified the device list table to display devices in the order they were added. The newest device is now displayed at the top.
  • Updated the guide for enabling Developer Mode, which is shown after adding a new device.

ares-install

  • Fixed an error that occurred while connecting to a device. It now displays the original error message instead of “Callback was already called.”

ares-novacom

  • Added support for signage profile.

3.1.3 (October 14, 2024)

ares-generate

  • Added "native_service" template for apollo platform.

ares-setup-device

  • Fixed a bug that device name can not be added with "-".

3.1.2 (August 07, 2024)

ares-config

  • Added a new apollo profile for apollo platform.

common

  • Integrated CLI commands for apollo platform.

3.1.1 (July 15, 2024)

ares-inspect

  • Fixed a bug that ares-inspect --service display error message on webOS TV 4.5 or lower

3.1.0 (July 12, 2024)

ares-generate

  • Fixed a bug that can not generate without --template option

ares-setup-device

  • Enhance usability of --add option.
  • Enhance emulator remove usability
  • Change default device information of TV profile (user: prisoner, port:9922)
  • Change device name validation logic that accepts all characters except "$" & "%"

common

  • Upgrade node modules: shelljs(v0.8.5), async(v3.2.5), ssh2(v1.15.0), tar(v6.2.0).

3.0.6 (April 04, 2024)

ares-log

  • Fixed a bug that invalid json format

3.0.5 (April 01, 2024)

Common

  • Fixed a bug that can not install on window by CMD or Powershell

3.0.4 (March 30, 2024)

Common

  • Fixed a bug that always requires sudo permission when exec ares commands

3.0.3 (March 29, 2024)

ares-setup-device

  • Fixed a bug that the ares-setup-device of existing TV CLI is not working, after adding new target from CLI v3.0.2. If error is occurs again, please reset device list via "ares-setup-device -R" and add it again.
  • Allow localhost as ip address to add target and add port validation(1-65535)

ares-generate

  • Update TV template to apply webOSTVjs v1.2.10 in ares-generate

Common

  • Update webOSTV.js to v1.2.10
  • Fixed a bug that profile change is not working after installing with root on mac/linux

3.0.0 (March 4, 2024)

ares-config

  • Added as a new command for showing or changing the profile of CLI.

ares-launch

  • Supports to live reloading using --hosted option.

ares-novacom

  • Added as a new command for controlling TV devices.(This is written based on differences compared to v2.4.0.)
  • Supported only when using the TV profile.

ares-pacakge

  • Fixed to minify by default for js files in service directory.

Common

  • Moved repository from @webosose/ares-cli to @webos-tools/cli.
  • Integrated with the webOS TV CLI. In the future, we plan to support multiple webOS platforms with a single CLI.
  • Added the profile for changing support platform, default profile is tv. The commands, options, help, and templates supported for each profile are different.
  • Supports Node v16.20.2.
  • Supports unit test to verify tv profile.

Meta files

  • Updated the README file.

2.4.0 (February 16, 2023)

ares-device

  • Supports to show node version usage using --system-info option.
  • Fixed a bug that js service is not listed-up when ares-device --resource-monitor --list option.

ares-inspect

  • Updated displayed guide text during js service inspection using --service option.

Common

  • Supports features of below commands as APIs(total 10s) : ares-generate, ares-inspect, ares-install, ares-launch, ares-package, ares-pull, ares-push, ares-server, ares-setup-device, ares-shell
  • Added unit test to verify APIs

2.3.0 (February 7, 2022)

ares-log

  • Supports to show logs of pmlogd and added options to support related features.
  • Added option to check(--current-daemon) and select(--select-daemon) log daemon.
  • Supports to print the help message by selected log daemon.

ares-device

  • Supports to monitor resource usage using --resouce-monitor option and provides related features through the options of --time-interval, --list, --id and --save.
  • Fixed a bug related to the directory permission when using capture-screen option.

ares-pacakge

  • Supports to analyze the pacakge file(.ipk) using --info and --info-detail options.
  • Fixed a bug related to the callback function error.

ares-inspect

  • Fixed a bug that prevented opening the browser specified in the environment variables when using --open option.

Common

  • Updated the minimum supported node version from v8.12.0 to v10.24.1.
  • Added a feature to print information of the connected target device.
  • Added a feature to print the progress when the command takes a long time to execute.
  • Cleaned up all log levels of all source code and supports to show level-applied logs using --level option of each command.
  • Added a feature to manually set time interval when running unit tests.

Meta files

  • Updated the README file.

2.2.0 (June 21, 2021)

ares-log

  • Added as a new command for showing or saving logs of webOS apps and services.

ares-setup-device

  • Updated the naming rule for the DEVICE_NAME parameter.

ares-install

  • Enhanced the readability of the results of the --listfull option.

Common

  • Categorized error messages and added user tips according to each error message.

Meta files

  • Updated the README file.

2.1.0 (April 2, 2021)

ares-device

  • Supports screen capture using the --capture-screen option.

ares-generate

  • Updated the template of appinfo.json to apply new ACG groups. Template files generated by CLI v2.0.3 or older are not compatible with the latest webOS OSE.
  • Added '/' to config method in js_service templates.

ares-shell

  • Fixed an issue that environment variables using the ares-shell -r command were different from environment variables of the target device.

2.0.3 (January 22, 2021)

ares

  • Updated help message.

Meta files

  • Updated the README file.

2.0.2 (December 29, 2020)

  • Supports Node v14.15.1.

2.0.0 (December 11, 2020)

  • Initial github release.