Skip to content

vix upgrade

vix upgrade upgrades the Vix CLI or a globally installed package.

Use it when you want to update Vix itself, check for a newer CLI release, or upgrade one package installed globally.

Usage

bash
vix upgrade
vix upgrade vX.Y.Z
vix upgrade --check
vix upgrade --dry-run
vix upgrade --json
vix upgrade -g [@]namespace/name[@version]

What it does

ModeCommandPurpose
CLI modevix upgradeUpgrade the Vix CLI from GitHub releases
Global package modevix upgrade -g <pkg>Upgrade a globally installed package

Basic usage

bash
vix upgrade               # latest version
vix upgrade v2.0.1        # specific version
vix upgrade --check       # check without installing
vix upgrade --dry-run     # simulate
vix upgrade --json        # machine-readable output

Upgrade a global package

bash
vix upgrade -g gk/jwt
vix upgrade -g gk/jwt@1.0.0
vix upgrade -g @gk/jwt

Override the CLI release repository

bash
VIX_REPO=vixcpp/vix vix upgrade --check

Difference between vix upgrade and vix update

CommandPurpose
vix upgradeUpgrade the Vix CLI or a global package
vix updateUpdate project dependencies and rewrite vix.lock

Options

OptionDescription
-g, --globalUpgrade a globally installed package.
--checkShow target version and download info without installing.
--dry-runSimulate the upgrade without installing.
--jsonPrint machine-readable JSON output.
-h, --helpShow command help.

Environment variables

VariableDescription
VIX_REPOOverride repository for CLI upgrades. Default is vixcpp/vix.
bash
vix upgrade --check
vix upgrade --dry-run
vix upgrade
vix --version
vix doctor

Common mistakes

Using vix upgrade for project dependencies

bash
# Wrong for project packages
vix upgrade

# Correct
vix update --install

Forgetting -g for global package upgrade

bash
# Upgrades the CLI, not a package
vix upgrade gk/jwt

# Correct
vix upgrade -g gk/jwt

Passing a version without the v prefix

bash
vix upgrade v2.0.1   # correct
vix upgrade 2.0.1    # wrong
CommandPurpose
vix doctor --onlineCheck environment and latest release information
vix infoShow Vix paths and local state
vix updateUpdate project dependencies
vix install -gInstall a global package
vix list -gList global packages
vix uninstall -gRemove a global package
vix --versionShow installed Vix version

Next step

Continue with uninstalling Vix or global packages.

Open the vix uninstall guide

Released under the MIT License.