Update
Checking for Updates
valsb update
This command:
- Checks the latest versions of both
valsbandsing-boxfrom GitHub Releases - Compares with the currently installed versions
- Shows a diff if updates are available
- Asks for confirmation before proceeding
[ok] Version check complete
valsb 0.0.9 → 0.1.0
sing-box 1.13.7 → 1.13.8
? Proceed with update? yes
Atomic Update Process
The update process is designed to minimize downtime:
- Download first — all new binaries are downloaded to temporary files before any changes
- Replace binaries — only after successful download, the old binaries are atomically replaced
- Restart service — if sing-box was running, it is restarted with the new binary
On Unix systems, the running valsb binary is replaced by unlinking the old file first, then copying the new one. This avoids the "Text file busy" error.
Non-interactive Mode
valsb update --yes
Skips the confirmation prompt. Useful for automation and cron jobs.
JSON Output
valsb update --json
Returns structured JSON with version information and update results.