CLI Reference

CLI Reference

Update-Watcher is a single-binary CLI tool. All functionality is accessed through the update-watcher command and its subcommands. This section provides a complete reference for every command, flag, and exit code.

Global Flags

The following flags are available on all commands:

FlagShortDefaultDescription
--config PATH-c(auto)Path to a specific configuration file. Overrides the default search paths.
--quiet-qfalseSuppress all output except errors. Useful for cron jobs.
--verbose-vfalseEnable verbose debug output. Shows each step as it executes.
--as-service-userfalseRun as the dedicated system user (update-watcher). Used internally by cron entries.
The --quiet and --verbose flags are mutually exclusive. If both are specified, --verbose takes precedence.

Commands

CommandDescription
runExecute all configured update checks and send notifications.
setupLaunch the interactive menu-driven setup wizard.
watchAdd a new update checker to the configuration.
unwatchRemove a configured update checker from the configuration.
statusDisplay the current configuration including watchers, notifiers, and settings.
validateValidate the configuration file for syntax errors and missing fields.
self-updateUpdate the Update-Watcher binary to the latest release.
install-cronInstall a cron job for daily automated update checks.
uninstall-cronRemove the Update-Watcher cron job from the user’s crontab.
versionDisplay the version, git commit hash, and build date.

Config File Resolution

When no --config flag is provided, Update-Watcher searches for a configuration file in the following locations, in order of priority:

PriorityPathUse Case
1/etc/update-watcher/config.yamlSystem-wide config (Linux server setups)
2~/.config/update-watcher/config.yamlPer-user config (macOS, desktop Linux)
3./config.yamlCurrent working directory (development, testing)

The first file found is used. On Linux servers with a dedicated system user, the system-wide path is typical. On macOS, the per-user path under ~/.config is the default.

To explicitly specify a config file:

Terminal
update-watcher run --config /path/to/config.yaml

Exit Codes

All commands return meaningful exit codes for scripting. The run command uses the full range:

CodeMeaning
0Success – no updates found.
1Updates found – at least one checker reported available updates.
2Partial failure – some checkers succeeded but at least one failed.
3Complete failure – all checkers failed.
4Configuration error – the config file is missing, malformed, or invalid.

For scripting examples using exit codes, see Exit Codes.

Next Steps