CLI commands
Every command supports --help for its full flags and examples. Commands that
act on an environment accept --global / -g to target the global
~/.nem/nem.ver instead of the nearest project nem.ver.
Environment
| Command | Description |
|---|---|
nem use <package>[@<version>] ... | Install and record package(s) in the current environment |
nem unuse <package> ... | Remove package(s) from the current environment |
nem upgrade | Upgrade active package(s) to their latest versions |
nem refresh | Sync the current environment with global and project nem.ver |
nem tidy | Clean up and format nem.ver |
nem set-env KEY=VALUE ... | Set environment variable(s) in nem.ver |
nem unset-env KEY ... | Remove environment variable(s) from nem.ver |
Inspection
| Command | Description |
|---|---|
nem status | Show active packages and environment variables |
nem search <query> | Search for packages across all catalogs |
nem package info <package> | Show information about a package |
nem package versions <package> | List versions of a package available in catalogs |
nem doctor | Diagnose common nem misconfiguration |
nem version | Print the nem version |
Shell integration
| Command | Description |
|---|---|
nem activate [bash|zsh|fish] | Install nem shell integration |
nem deactivate [bash|zsh|fish] | Remove nem shell integration from your shell rc file |
nem shell-env | Output PATH and env exports for packages in nem.ver |
nem completion <shell> | Output a shell completion script |
Catalogs
| Command | Description |
|---|---|
nem catalog add git <name> <url> | Add or update a remote git repository as a catalog |
nem catalog add local-dir <name> <path> | Add or update a local directory as a catalog |
nem catalog add oci <name> <ref> | Add or update an OCI registry as a catalog |
nem catalog list | List configured catalogs |
nem catalog info <name> | Show detailed information about a catalog |
nem catalog reorder <name> [name...] | Set the lookup order of explicit catalogs |
nem catalog update [name] | Update one or all catalogs from their source |
nem catalog remove <name> | Remove a catalog by name |
The name official is reserved for the official catalog. nem catalog add rejects
it with an error; nem catalog reorder and nem catalog remove cannot act on it
either — disable the official catalog with use-official-catalog: false or
NEM_USE_OFFICIAL_CATALOG=0 instead.
Packages & maintenance
| Command | Description |
|---|---|
nem package list | List installed packages (alias ls) |
nem package install <package>@<version> ... | Install package(s) and their dependencies |
nem package uninstall <package>@<version> ... | Uninstall package(s) |
nem package reinstall <package>@<version> ... | Reinstall package(s) |
nem clean | Uninstall package(s) not used recently |
Authoring
| Command | Description |
|---|---|
nem author lint [path] | Validate pkg.yaml manifests before publishing |
nem author publish <registry-base> [catalog-dir] | Publish a catalog directory to an OCI registry |
nem author mirror <registry-base> [catalog-dir] | Mirror package archives/sources into an OCI registry |