update Command
pakyas update downloads the latest release and replaces the running pakyas binary.
pakyas update [--check]Examples
Section titled “Examples”# Update to the latest versionpakyas update
# Only report whether an update is availablepakyas update --check| Flag | Description |
|---|---|
--check | Report the latest version without installing it |
Behavior
Section titled “Behavior”- Asks
https://api.pakyas.com/cli/latest(orAPI_URL) for the latest version. - Stops with
Already up to dateif you have it. - Downloads the archive for your platform (served from the GitHub releases) and its
.sha256file. - Verifies the SHA-256 checksum.
- Replaces the running binary. If the swap fails, the previous binary is restored.
Supported platforms are macOS and Linux on x86_64 and ARM64 (Apple Silicon, aarch64).
Background Update Checks
Section titled “Background Update Checks”Other commands check for a newer version at most once every 24 hours and print a notice on stderr after they finish. No check is made:
- for
ping,monitor,completion, andupdateitself, - when stderr is not a terminal,
- when
CIis set, - with
--no-update-checkorPAKYAS_NO_UPDATE_CHECK=1.
The notice is also suppressed for machine-readable --format output. The result of the last check is cached in cache/update.json in the config directory.
Permissions
Section titled “Permissions”If the binary is in a directory you can’t write to (for example /usr/local/bin), the command stops with Permission denied and suggests:
sudo pakyas updateExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Updated, already up to date, or (--check) an update is available |
| 1 | Error: network, permission, checksum mismatch, unsupported platform |
See Also
Section titled “See Also”- Installation - Install script and manual installation
- CLI Configuration - Environment variables