Skip to content

Command Line Tool

util.sh is the operational CLI wrapper for SafeCall installations. It calls the bundled util.ts command dispatcher through the compiled SafeCall binary.

Central Menu

Use the sidebar section Scripts -> Command Line Tool for full command docs:

Quick Command Index

AreaCommands
System lifecyclesafecall system install, safecall system setup, safecall system update, safecall system repair, safecall system uninstall, safecall system status, safecall system selftest, safecall system doctor, safecall system systemd
Configsafecall config show, safecall config edit, safecall config set, safecall config reset, safecall config regen-mobile-key
Integrationssafecall integrations server, safecall integrations monit, safecall integrations cron, `safecall integrations zabbix setup
App operations`safecall app users create
Dev tooling`safecall dev test selftest

Hidden Or Easy-To-Miss Behavior

These behaviors are implemented in the CLI, but are easy to miss if you only read short help text:

  • safecall integrations zabbix setup --dry-run prints the complete Zabbix provisioning plan and exits without API calls or changes.
  • safecall dev test full currently runs VM tests in quick mode (test-vm.sh --quick).
  • safecall integrations server --print-samples prints sample configs for Nginx/Apache/Caddy and exits.
  • safecall integrations server --non-interactive auto-picks defaults and avoids prompts.
  • safecall config set <key> <value> auto-detects scalar types (number, boolean, JSON-array-like values).
  • safecall system doctor is interactive and may offer update/repair/migration actions directly.
  • safecall system install, safecall system update, safecall system repair, and safecall system doctor can consume offline bundles via --offline-dir.
  • Legacy direct commands like safecall nginx are removed.

How util.sh Works

  • util.sh enforces root execution.
  • It resolves its real path (symlink-safe), switches to the installation directory, and executes the bundled CLI.
  • The generated systemd setup exposes /usr/local/bin/<service_name> as a symlink to this wrapper.

Source Layout

scripts/cli/
├── main.ts         Command registration
├── system.ts       System lifecycle handlers (install/setup/update/repair/uninstall/systemd/status/doctor)
├── setup.ts        Setup wizard
├── config.ts       Config handlers
├── integrations.ts Reverse proxy + monit + cron integration
├── test.ts         Dev test orchestration/cleanup
├── selftest.ts     Deployment health checks
├── user.ts         App user management handlers
├── zabbix.ts       Integrations zabbix setup/doctor/verify
└── helpers.ts      Prompt utilities