Skip to content

update Command

pakyas update downloads the latest release and replaces the running pakyas binary.

Terminal window
pakyas update [--check]
Terminal window
# Update to the latest version
pakyas update
# Only report whether an update is available
pakyas update --check
FlagDescription
--checkReport the latest version without installing it
  1. Asks https://api.pakyas.com/cli/latest (or API_URL) for the latest version.
  2. Stops with Already up to date if you have it.
  3. Downloads the archive for your platform (served from the GitHub releases) and its .sha256 file.
  4. Verifies the SHA-256 checksum.
  5. 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).

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, and update itself,
  • when stderr is not a terminal,
  • when CI is set,
  • with --no-update-check or PAKYAS_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.

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:

Terminal window
sudo pakyas update
CodeMeaning
0Updated, already up to date, or (--check) an update is available
1Error: network, permission, checksum mismatch, unsupported platform