Skip to main content

sos applet upload

Uploads current applet version

Description

Uploads the current applet version to the signageOS platform, making it available for deployment to devices. The command supports both single-file and multi-file applets, with automatic version management and conflict detection.

The upload process validates package.json requirements, creates or updates applet versions, and handles file packaging according to .sosignore, .npmignore, and .gitignore rules.

Usage

sos applet upload [options]

Options

OptionTypeDescriptionDefault
--applet-pathstringPath to the applet file or the project folder depending on the entry file. Relative to the command or absolute.
--entry-file-pathstringPath to the applet entry file. Relative to the command or absolute.
--no-default-organizationbooleanPrevent using the defaultOrganizationUid from ~/.sosrc
--organization-uidstringOrganization UID
--applet-uidstringApplet UID
--update-package-configbooleanForce updating package.json with sos.appletUid value of created applet. It's useful when appletUid is passed using SOS_APPLET_UID environment variable.
--yesbooleanAllow to upload new applet or override existing version without confirmation step
--verbosebooleanOutputs all files to upload

Examples

# Upload applet from current directory
sos applet upload

# Upload with specific applet path
sos applet upload --applet-path ./dist

# Upload with custom entry file
sos applet upload --entry-file-path src/main.js

# Upload with organization override
sos applet upload --organization-uid abc123def456

# Skip confirmation prompts
sos applet upload --yes

# Verbose output with detailed file information
sos applet upload --verbose

# Update package.json with new applet UID
sos applet upload --update-package-config

Advanced Usage

Environment Variables

You can override certain values using environment variables:

  • SOS_APPLET_UID: Specify applet UID to upload to (overrides sos.appletUid in package.json)
  • SOS_APPLET_VERSION: Specify applet version to upload (overrides version in package.json)
# Upload to specific applet using environment variable
SOS_APPLET_UID=abc123def456 sos applet upload

# Upload with specific version
SOS_APPLET_VERSION=1.2.3 sos applet upload

File Handling

  • Applet Creation: If applet doesn't exist, it will be created automatically
  • Version Management: Applet version is read from package.json
  • Applet UID Storage: Generated applet UID is stored in package.json under sos.appletUid
  • Ignore Files: File exclusion priority (top to bottom): .sosignore > .npmignore > .gitignore
  • Single Ignore File: Only one ignore file is used, or none

Alternative Upload Methods

# Upload using npm script (recommended)
npm run upload

# Upload all files in applet directory (deprecated method)
sos applet upload --applet-path=dist/index.html
# Note: This will upload only the specified file and remove others from servers

Since

0.4.0

Global Options

All commands support the following global options:

OptionAliasDescription
--help-hDisplay help information for any command
--version-vDisplay the installed version of the CLI
--api-url-uOverride the API URL for REST requests
--profileUse a specific profile from ~/.sosrc config

Examples

# Show version
sos --version

# Get help for any command
sos applet --help
sos applet upload --help

# Use custom API endpoint
sos --api-url https://api.example.com applet upload

# Use specific profile
sos --profile production organization list