klim tool upgrade
klim tool upgrade brings installed tools to the latest version reported by
their package manager. Flag set matches klim tool install;
source precedence differs slightly so the upgrade runs through the
package manager the tool was actually installed from (see below).
Source precedence
Section titled “Source precedence”For an installed tool, klim picks the package manager in this order:
--source <pm>flag (per invocation), if it maps to a package id for this tooldefaults.preferred_sourceinconfig.yaml, if it maps to a package id- The tool’s installed package manager (detected during the PATH scan)
BestInstallSource()— last-ditch OS-priority fallback
That ordering avoids the surprise of running winget upgrade jq on a
jq that was installed via scoop. The same precedence applies to
klim tool remove.
klim tool upgrade [tool...] [flags]At least one positional tool name or --pack is required.
Behavior per target
Section titled “Behavior per target”| State | Outcome |
|---|---|
| Installed and update available | upgrade |
| Installed and already at latest | skipped (up_to_date) |
| Not installed | skipped (not_installed) — use klim tool install |
| Not in catalog | reported, skipped |
klim tool upgrade --pack <name> is therefore safe to run on machines that
have only some of the pack’s tools — missing tools are skipped, no
auto-install happens.
Same as klim tool install:
--source, --pack (repeatable), --dry-run, --yes/-y,
--refresh, --output.
Examples
Section titled “Examples”# Upgrade a single toolklim tool upgrade jq
# Upgrade everything in a packklim tool upgrade --pack go-developer
# Force a specific managerklim tool upgrade jq --source brew --yes
# Dry-run a multi-pack upgradeklim tool upgrade --pack rust-dev --pack web-dev --dry-run
# JSON for scriptsklim tool upgrade --pack go-developer --output json --yesExit codes
Section titled “Exit codes”Same as klim tool install: 0 OK, 1 runtime error, 2 usage error,
3 partial failure.
See also
Section titled “See also”klim tool installklim tool removeklim update— upgrade klim itself