---
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

title: "Configuration"
description: "Reference for NeMo CLI configuration fields, precedence, telemetry, and shell completion."
---
The NeMo CLI uses a configuration file to store connection settings, credentials, and preferences for one or more contexts.

## Prerequisites

- Install the NeMo CLI as described in [Setup](/documentation/get-started).
- To create connections or switch contexts, follow [Connect the CLI to Deployments](/documentation/reference/cli-reference/connect-to-deployments).

## 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.

## Manage configuration

### View configuration

Display configuration for the current context (secrets are redacted):

```bash
nemo config view
```

Display all contexts:

```bash
nemo config view --all-contexts --output-format json
```

The full view includes every saved context, cluster, and user. JSON output is useful for scripts and configuration audits; omit `--output-format json` for the default table view.

### Modify configuration

Set specific values:

```bash
nemo config set --base-url https://nmp.example.com
nemo config set --workspace my-workspace
nemo config set --access-token -
```

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.

| Variable | Description |
|----------|-------------|
| `NMP_CONFIG_FILE` | Path to configuration file |
| `NMP_CURRENT_CONTEXT` | Override current context |
| `NMP_BASE_URL` | API base URL |
| `NMP_ACCESS_TOKEN` | Access token for authentication |
| `NMP_WORKSPACE` | Default workspace |
| `NMP_OUTPUT_FORMAT` | Output format (table, json, yaml, csv, markdown) |
| `NMP_TIMESTAMP_FORMAT` | Timestamp format (relative, iso8601) |
| `NMP_COLOR_OUTPUT` | Enable/disable colored output (true/false) |
| `NEMO_TELEMETRY_ENABLED` | Enable CLI telemetry only when set to `true`; any other explicit value disables it |

Example:

```bash
# Use a different context for this command
NMP_CURRENT_CONTEXT=production nemo workspaces list

# Override base URL
NMP_BASE_URL=https://nmp.example.com nemo models list
```

## Configuration precedence

Settings are resolved in this order (highest priority first):

1. **Command-line flags** - `--base-url`, `--context`, etc.
2. **Environment variables** - `NMP_BASE_URL`, `NMP_CURRENT_CONTEXT`, etc.
3. **Configuration file** - `~/.config/nmp/config.yaml`
4. **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.

## CLI Telemetry

The NeMo CLI sends anonymous usage telemetry by default to help improve setup, command reliability, and product workflows. The first CLI invocation with telemetry enabled prints a notice to stderr and creates a `telemetry-notice-shown` marker next to the CLI config file. Stdout is not changed, so scripts that parse command output remain stable.

Telemetry events include the command or workflow category, task status, duration, client version, a random session ID that rotates every 30 days, deployment type, and whether the command appears to be running in CI. Telemetry does not include prompts, model inputs or outputs, datasets, secrets, access tokens, configuration file contents, file contents, local paths, usernames, email addresses, or hostnames.

To disable telemetry for a single command or shell session:

```bash
NEMO_TELEMETRY_ENABLED=false nemo models list
export NEMO_TELEMETRY_ENABLED=false
```

To disable telemetry persistently, add this top-level field to your CLI config file:

```yaml
telemetry_enabled: false
```

If `NEMO_TELEMETRY_ENABLED` is set, only `true` keeps the environment layer enabled. Any other explicit value disables telemetry for that process. A persisted `telemetry_enabled: false` value disables telemetry even when the environment variable is set to `true`.

## Shell Completion

The NeMo CLI supports tab completion for Bash, Zsh, and Fish shells. Enable it with:

```bash
nemo --install-completion
```

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:

```bash
nemo <Tab>
nemo models <Tab>
```

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.

## Telemetry

NeMo Platform collects anonymous usage data to improve the product. On your first run, the CLI prints a notice to standard error explaining what data is collected and how to opt out.

For the full product disclosure, including bundled library telemetry and third-party endpoint notes, see [Telemetry and Privacy](/documentation/reference/telemetry-and-privacy).

### What Data Is Collected

The CLI and bundled plugins emit anonymous usage events. No prompts, user data, personal information, or file contents leave your machine.

Collected data includes:

- Command and job names you invoke
- Completion status and duration of commands and jobs
- Plugin and tool names you use
- Provider type, bucketed model discovery counts, and whether job model data was reported
- Input and output token counts per job (where available)
- Package version and CPU architecture

The events are batched and sent to NVIDIA's telemetry endpoint with no user identifiers, device fingerprints, hostnames, or machine-derived identifiers attached.

The only linking value is a random session identifier stored in local platform state. It carries no user or device identity and is automatically rotated every 30 days; if the local state file is missing a creation date, NeMo Platform replaces it with a new identifier.

### What Data Is Not Collected

- User data, prompts, or model outputs
- File contents or references
- Usernames, email addresses, IP addresses, or hostnames
- Machine fingerprints or unique identifiers

### Opting Out

Disable telemetry using any of these three methods (they all work):

#### 1. Environment Variable

```bash
export NEMO_TELEMETRY_ENABLED=false
```

Then run any `nemo` command. This disables telemetry for the CLI and bundled plugins for the current shell session and child processes. To persist it for future shell sessions, add the export to your shell startup configuration.

#### 2. Configuration File

Add this to your configuration file at `~/.config/nmp/config.yaml`:

```yaml
telemetry_enabled: false
```

#### 3. Per-Command Flag

```bash
nemo --no-telemetry workspaces list
```

The `--no-telemetry` flag disables telemetry for a single command only.

<Note>

These three layers are independent. NeMo Platform sends telemetry only when you have not disabled it in any of them. Setting any one layer to off disables telemetry, and no layer turns it back on. For example, if you leave the environment variable unset but set `telemetry_enabled: false` in your config file, telemetry stays off.

</Note>

### Bundled Plugins

NeMo Platform ships with plugins that emit their own anonymous usage telemetry. The `NEMO_TELEMETRY_ENABLED` environment variable is the recommended single off switch: set it to `false` to disable telemetry for the CLI and for NeMo tools that share this telemetry system. The config file setting and the `--no-telemetry` flag apply to the CLI.

### First-Run Notice

On your first run, the CLI writes this notice to standard error:

> NeMo Platform collects anonymous usage data to improve the product. No prompts, data, or personal information leave your machine. Turn it off at any time with NEMO_TELEMETRY_ENABLED=false.

The notice appears only once, and you can opt out at any time using one of the methods above.

## Next Steps

- [Connect the CLI to one or more deployments](/documentation/reference/cli-reference/connect-to-deployments).
- See the [full CLI reference](/documentation/reference/cli-reference/full-cli-reference) for every command and option.
- Use [CLI troubleshooting](/documentation/reference/cli-reference/troubleshooting) if configuration does not resolve as expected.
