Skip to main content

generate

Generate a local repository for developing a Custom Script

Description

Creates a new custom script project with boilerplate code and configuration files. Generates .sosconfig.json, platform directories, and sample implementations.

Requires: name, description, dangerLevel (low/medium/high/critical).

Usage

sos custom-script generate [options]

Options

OptionDescription
--nameCustom script name (string)
--descriptionCustom script description (string)
--danger-levelDanger level - Can be one of the following: low, medium, high, critical. It represents the danger level of the Custom Script. It should be set according to the potential impact of the Custom Script on the device. (string)
--yesSkip confirmation prompts and use provided values (boolean)

Examples

# Interactive generation
sos custom-script generate

# Non-interactive (CI/CD)
sos custom-script generate --name brightness-control --description "Device brightness" --danger-level low --yes

Since

2.2.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

See Also