Update Command¶
The update command updates the tool to the latest or specified version.
Usage¶
Description¶
Downloads and installs the latest version of the tool. After replacing the binary, it runs the new binary's init --ci --skip-key on each existing configuration directory to refresh the config; under --ci and off a terminal, init skips every credential wizard, so no profile's skip flag is needed.
When the running binary is already the latest release (or is a development build and --force was not given), nothing is replaced and the command says so: already running the current version; nothing to update, exit 0, and --output json reports "updated": false. "Update complete" is printed only when the file on disk was replaced.
Flags¶
--force, -f: Force update to the latest version even if already up to date.--version, -v string: Specific version to update to (format:v0.0.0).--from-file string: Path to a local.tar.gzrelease archive for offline installation. Mutually exclusive with--version.
Downgrade behaviour¶
If the release source reports a "latest" version that is older than the
running binary (a stale or rolled-back release listing), the implicit
update refuses to install it and exits non-zero, signature and checksum
verification authenticate an artefact, not its recency, so an implicit
downgrade is treated as a potential rollback attack. To downgrade
intentionally, either:
- pin the target explicitly:
mytool update --version v1.1.0(an explicit version is sufficient intent on its own), or - force the implicit path:
mytool update --force.