Skip to main content

CLI Setup

The sos CLI is a command-line tool that is the primary interface between a developer and the signageOS platform. Using the sos CLI you can:

  • Develop applets locally or on real devices
  • Deploy applets to real devices
  • Run applet test suites
  • Develop custom scripts
  • Upload custom device firmware

What you will need

You need the following stack to get started with your development:

tip

The best way for managing the Node.js and NPM environments is nvm or fnm.

Installation

Terminal
npm install @signageos/cli -g
sos --help
info

The full documentation can be found on the signageOS Github. Once installed, you can use sos --help for quick help within the CLI.

Log in

Once installed, log in to the CLI with your signageOS Account.

Terminal
sos login

Set up default Organization

CLI allows you to manage Applets, devices and tests from multiple organizations. Choose your default one which will be used for development and testing.

If you do not have one yet, create it in signageOS Box

Terminal
sos organization set-default

Now you are all set. Continue by generating your Applet boilerplate.

Autocomplete

signageOS CLI offers tab completion for commands and options, which enhances the user experience by making it easier to discover and use available commands.

Installation

To enable autocomplete in your shell, use the following command:

sos autocomplete install

This will install a completion script in your home directory and add a source line to your shell configuration file (.zshrc, .bashrc, or .bash_profile, depending on your shell). To start using autocomplete immediately without restarting your terminal, run:

source ~/.sos-completion.sh

Usage

Once autocomplete is installed, you can use the TAB key to discover and complete commands:

sos [TAB]          # Show all top-level commands
sos applet [TAB] # Show all applet subcommands
sos applet up[TAB] # Autocomplete to "sos applet upload"

Uninstallation

If you want to disable autocomplete, use:

sos autocomplete uninstall

This will remove the completion script and the source line from your shell configuration file.