Skip to content
Managing your environment

Managing your environment

Your environment is the set of packages recorded in the nearest nem.ver. These commands add, remove, and update them.

Add a package

nem use kubectl@v1.34.1     # pin a version
nem use ripgrep             # latest available

nem use installs the package, exposes it on your PATH, and records it in nem.ver as a direct entry. Any dependencies are added as indirect entries.

Remove a package

nem unuse kubectl

This drops the direct entry. Indirect packages it pulled in are left until you tidy.

Pinning and upgrading versions

Pin a package to an exact version, or omit the version to take the latest the catalogs offer:

nem use kubectl@v1.34.1     # pinned — stays put until you change it
nem use ripgrep             # latest at install time

See what’s available before pinning:

nem package versions kubectl

Move every package to its latest version at once:

nem upgrade

To re-pin a single package, nem use it again at the new version:

nem use kubectl@v1.35.0

Refresh

nem refresh

Re-syncs the current environment with what’s declared in the project and global nem.ver — useful after editing the file by hand or switching branches.

Tidy

nem tidy

Removes indirect packages that no direct package needs anymore, and formats the nem.ver file.

Inspect

nem status

Shows the packages and environment variables active in the current directory. For the full command list, see the CLI reference.