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
Option | Type | Description | Default |
---|---|---|---|
--applet-path | string | Path to the applet file or the project folder depending on the entry file. Relative to the command or absolute. | |
--entry-file-path | string | Path to the applet entry file. Relative to the command or absolute. | |
--no-default-organization | boolean | Prevent using the defaultOrganizationUid from ~/.sosrc | |
--organization-uid | string | Organization UID | |
--applet-uid | string | Applet UID | |
--update-package-config | boolean | Force updating package.json with sos.appletUid value of created applet. It's useful when appletUid is passed using SOS_APPLET_UID environment variable. | |
--yes | boolean | Allow to upload new applet or override existing version without confirmation step | |
--verbose | boolean | Outputs 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 (overridessos.appletUid
in package.json)SOS_APPLET_VERSION
: Specify applet version to upload (overridesversion
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
undersos.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:
Option | Alias | Description |
---|---|---|
--help | -h | Display help information for any command |
--version | -v | Display the installed version of the CLI |
--api-url | -u | Override the API URL for REST requests |
--profile | Use 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