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 availablenem 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 kubectlThis 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 timeSee what’s available before pinning:
nem package versions kubectlMove every package to its latest version at once:
nem upgradeTo re-pin a single package, nem use it again at the new version:
nem use kubectl@v1.35.0Refresh
nem refreshRe-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 tidyRemoves indirect packages that no direct package needs anymore, and formats the
nem.ver file.
Inspect
nem statusShows the packages and environment variables active in the current directory. For the full command list, see the CLI reference.