klim upgrade
klim upgrade brings installed tools to the latest version reported by
their package manager. Flag set matches klim 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 remove.
klim 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 install |
| Not in catalog | reported, skipped |
klim 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 install:
--source, --pack (repeatable), --dry-run, --yes/-y,
--refresh, --output.
Examples
Section titled “Examples”# Upgrade a single toolklim upgrade jq
# Upgrade everything in a packklim upgrade --pack go-developer
# Force a specific managerklim upgrade jq --source brew --yes
# Dry-run a multi-pack upgradeklim upgrade --pack rust-dev --pack web-dev --dry-run
# JSON for scriptsklim upgrade --pack go-developer --output json --yesExit codes
Section titled “Exit codes”Same as klim install: 0 OK, 1 runtime error, 2 usage error,
3 partial failure.
See also
Section titled “See also”klim installklim removeklim update— upgrade klim itself