CLI Reference

Update Commands

CLI commands for checking and installing updates

Update Commands

The update command group manages CLI version updates.

update check

Check if a newer version of the CLI is available.

nextpay update check

Example output:

{
  "current_version": "0.3.1",
  "latest_version": "0.4.0",
  "update_available": true,
  "download_url": "https://github.com/kapitolph/nextpay-cli/releases/tag/v0.4.0"
}

update install

Download and install the latest version of the CLI, replacing the current binary.

nextpay update install

This command:

  1. Checks for the latest release on GitHub.
  2. Downloads the appropriate binary for your platform.
  3. Replaces the current nextpay binary in place.
  4. Prints the new version number.

If the CLI is installed in a system directory (e.g., /usr/local/bin/), you may need to run this with sudo:

sudo nextpay update install

For containerized environments, it is generally better to update the version in your Dockerfile rather than using the self-update mechanism, to ensure reproducible builds.