Skip to content

Latest commit

 

History

History
115 lines (90 loc) · 2.88 KB

File metadata and controls

115 lines (90 loc) · 2.88 KB

📦 SCRIPT MANAGEMENT

add <file> --name <name> [--tag tag1] [--description "..."]
list [--tag <tag>] [--name <name>] [--language <lang>] [-f table|json]
info <script> [-f plain|json]
rename <current-name> <new-name>
remove <script> [--force] [--keep-files] [--keep-history]
  Aliases: rm, delete, del
run <script> [args...]
run <script> --stream
run <script> --log
run py3.11 <script>              # Specify runtime version
history <script> [--limit 10] [-f plain|json]

sm script add --name [--tag ...] [--description "..."] sm script remove <script> [--force] [--keep-files] [--keep-history] sm script list [-f table|json] [--tag ...] [--name ...] [--language ...] sm script info <script> [-f plain|json] sm script rename sm script run <script> [args...] [--stream] [--log] [--runtime py3.11] sm script history <script> [--limit N] [-f plain|json]

📋 VERSIONING

version create <script> <file-path>
version list <script> [-f plain|json]
version show <script> <version>
version rollback <script> <version>

sm version add <script> [--message "..."] sm version remove <script> sm version list <script> [-f plain|json] sm version show <script> sm version rollback <script>

🏷️ TAG MANAGEMENT

tag add <script> <tag1,tag2,...>
tag remove <script> <tag1,tag2,...>
tag list <script>
tag list --all

sm tag add <script> <tag1,tag2,...> sm tag remove <script> <tag1,tag2,...> sm tag list <script> sm tag list --all

⚙️ RUNTIME MANAGEMENT

runtimes detect [--set-defaults]
runtimes list [-f plain|json]
runtimes add <language> <version> <path>
runtimes remove <language> <version>
runtimes set-default <language> <version>

sm runtime detect [--set-defaults] sm runtime list [-f plain|json] sm runtime add sm runtime remove sm runtime set-default

🧩 CHAIN EXECUTION

chain [flags] <step1> <step2> ...
  Flags:
    --continue       Continue even if a step fails
    --log             Save logs for each step

  Steps with arguments should be quoted:
    sm chain "build --release" "deploy --server prod" "notify --channel ops"

  Run workflows from a file:
    sm chain deploy.chain

sm chain run ... Flags: --continue --log

sm chain run-file # e.g. deploy.chain

⚙️ CONFIGURATION

config get <key>       # Get a config value
config set <key> <val> # Set a config value
config list            # List all configs

init                   # Initialize SM, create data directories, detect runtimes, generate default config

sm config get sm config set sm config list sm config init # initialize system, detect runtimes, etc.

🧹 MAINTENANCE

sm cleanup [--dry-run] [--keep <count>] [--older-than <days>] [--logs-older-than <days>]