sos applet generate
Generate new signageOS applet projects with boilerplate code
Description
Creates a new applet project with all necessary configuration files, dependencies, and boilerplate code. Supports both TypeScript and JavaScript, multiple bundlers (webpack/rspack), various package managers (npm/pnpm/yarn/bun), and includes git repository initialization.
Usage
sos applet generate [options]
Options
Option | Type | Description | Default |
---|---|---|---|
--name | string | Applet name. Match RegExp: /^\w(\w | \d |
--applet-version | string | Applet initial version. Use semantic version | 0.0.0 |
--target-dir | string | Directory where will be the applet generated to | |
--git | string | Init applet as git repository "no" (default) or "yes" | |
--packager | string | Use preferred package manager "npm" (default), "pnpm", "yarn" or "bun" | |
--npm-registry | string | NPM registry URL. If you have your private npm registry | |
--language | string | Generate applet with "typescript" or "javascript" source code | |
--bundler | string | Generate applet with "webpack" (default) or "rspack" |
Examples
# Interactive generation with prompts
sos applet generate
# Generate TypeScript applet with webpack
sos applet generate --name my-applet --language typescript --bundler webpack
# Generate with custom settings
sos applet generate --name my-app --target-dir ./projects --git yes --packager pnpm
# Generate with npm registry
sos applet generate --name my-applet --npm-registry https://registry.npmjs.org/ --packager npm
# Generate applet with specific configuration
sos applet generate --name my-applet --applet-version 1.0.0 --target-dir ./output --language typescript --bundler webpack --git yes
Advanced Usage
Platform Notes
Windows Users
There is an unresolved issue with NPX tool on Windows when your username contains spaces (e.g., John Doe
). To prevent this issue, run the following command in your Command Line (replace John
with your real first name). Administrator privileges may be required:
npm config set cache "C:\Users\John~1\AppData\Roaming\npm-cache" --global
For more details, see: https://stackoverflow.com/a/58354623/4609457
Development Workflow
# Complete workflow from generation to deployment
sos applet generate --name my-sample-applet --language typescript --bundler webpack --git yes
cd my-sample-applet
# Start development with hot reload
npm start
# Build for production
npm run build
# Upload to platform
npm run upload
Since
0.1.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