Configuration
The NeMo CLI uses a configuration file to store connection settings, credentials, and preferences. This allows you to work with multiple environments and switch between them easily.
Quick Setup
The quickest way to connect to an existing deployment is:
To configure a named context:
Configuration File
The configuration is stored in ~/.config/nmp/config.yaml. If the XDG_CONFIG_HOME environment variable is set, the file is stored in $XDG_CONFIG_HOME/nmp/config.yaml instead. You can also specify a custom location with the NMP_CONFIG_FILE environment variable.
Managing Configuration
View Configuration
Display configuration for the current context (secrets are redacted):
Display all contexts:
Switch Contexts
Inspect the currently active context and resolved references:
Or print only the current context name:
Switch to a different context:
Use a context for a single command without switching:
Modify Configuration
Set specific values:
When setting an access token, you’ll be prompted to enter it securely (input is hidden).
Environment Variables
Environment variables override configuration file settings. This is useful for CI/CD pipelines or temporary overrides.
Example:
Configuration Precedence
Settings are resolved in this order (highest priority first):
- Command-line flags -
--base-url,--context, etc. - Environment variables -
NMP_BASE_URL,NMP_CURRENT_CONTEXT, etc. - Configuration file -
~/.config/nmp/config.yaml - Defaults - Built-in default values
This means you can set defaults in your config file and override them as needed with environment variables or flags.
Shell Completion
The NeMo CLI supports tab completion for Bash, Zsh, and Fish shells. Enable it with:
This detects your current shell and installs the appropriate completion script. Restart your shell for the changes to take effect.
After installation, test that completion is working:
If completion isn’t working, make sure you’ve restarted your shell and that your shell supports programmable completion. For Bash, ensure bash-completion is installed on your system.