# CLI utility commands

> CLI utility commands - Commands for managing and configuring the DataRobot CLI itself.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-05-06T18:17:09.547103+00:00` (UTC).

## Primary page

- [CLI utility commands](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html): Full documentation for this topic (HTML).

## Sections on this page

- [Synopsis](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#synopsis): In-page section heading.
- [Description](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#description): In-page section heading.
- [Subcommands](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#subcommands): In-page section heading.
- [completion](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#completion): In-page section heading.
- [config](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#config): In-page section heading.
- [update](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#update): In-page section heading.
- [version](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#version): In-page section heading.
- [Global flags](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#global-flags): In-page section heading.
- [Examples](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#examples): In-page section heading.
- [Update CLI to latest version](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#update-cli-to-latest-version): In-page section heading.
- [Check CLI version](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#check-cli-version): In-page section heading.
- [View current configuration](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#view-current-configuration): In-page section heading.
- [Install shell completions](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#install-shell-completions): In-page section heading.
- [Get version in JSON](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#get-version-in-json): In-page section heading.
- [See also](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/self.html#see-also): In-page section heading.

## Related documentation

- [Agentic AI](https://docs.datarobot.com/en/docs/agentic-ai/index.html): Linked from this page.
- [CLI](https://docs.datarobot.com/en/docs/agentic-ai/cli/index.html): Linked from this page.
- [Command reference](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/index.html): Linked from this page.
- [completion documentation](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/completion.html): Linked from this page.
- [Shell completions guide](https://docs.datarobot.com/en/docs/agentic-ai/cli/shell-completions.html): Linked from this page.
- [Getting started](https://docs.datarobot.com/en/docs/agentic-ai/cli/getting-started.html): Linked from this page.

## Documentation content

Commands for managing and configuring the DataRobot CLI itself.

## Synopsis

```
dr self <command>
```

## Description

The `self` command provides utility functions for managing the CLI tool itself, including updating to the latest version, checking version information, and setting up shell completion.

## Subcommands

### completion

Generate or manage shell completion scripts for command auto-completion.

```
dr self completion <shell>
```

See the [completion documentation](https://docs.datarobot.com/en/docs/agentic-ai/cli/commands/completion.html) for detailed usage.

Quick examples:

```
# Install completions interactively
dr self completion install

# Generate completions for bash
dr self completion bash > /etc/bash_completion.d/dr

# Generate completions for zsh
dr self completion zsh > "${fpath[1]}/_dr"
```

### config

Display current configuration settings from config file and environment variables.

```
dr self config
```

This command shows all configuration values currently in use by the CLI, including settings from:

- Configuration file ( ~/.config/datarobot/drconfig.yaml or custom path)
- Environment variables (prefixed with DATAROBOT_CLI_ or standard DATAROBOT_ variables)
- Command-line flags

Sensitive values like API tokens are automatically redacted for security.

Examples:

```
# Display current configuration
dr self config
```

Sample output:

```
Configuration initialized. Using config file: /Users/username/.config/datarobot/drconfig.yaml

  debug: false
  endpoint: https://app.datarobot.com/api/v2
  external_editor: vim
  token: ****
  verbose: false
```

Use cases:

- Verify which configuration file is being used
- Check that environment variables are being recognized
- Debug configuration issues
- Confirm API endpoint and settings before deployment

### update

Update the DataRobot CLI to the latest version.

```
dr self update
```

This command automatically detects your installation method and uses the appropriate update mechanism:

- Homebrew (macOS) —uses brew update && upgrade dr-cli if installed via Homebrew
- Windows —runs the PowerShell installation script
- macOS/Linux —runs the shell installation script

The update process will download and install the latest version while preserving your configuration and credentials.

Examples:

```
# Update to latest version
dr self update
```

Note: This command requires an active internet connection and appropriate permissions to install software on your system.

### version

Display version information about the CLI.

```
dr self version
```

Options:

- -f, --format —output format ( text or json )

Examples:

```
# Show version (default text format)
dr self version

# Show version in JSON format
dr self version --format json
```

## Global flags

All `dr` global flags are available:

- -v, --verbose —enable verbose output
- --debug —enable debug output
- -h, --help —show help information

## Examples

### Update CLI to latest version

```
$ dr self update
Downloading latest version...
Installing DataRobot CLI...
✓ Successfully updated to version 1.1.0
```

### Check CLI version

```
$ dr self version
DataRobot CLI version: 1.0.0
```

### View current configuration

```
$ dr self config
Configuration initialized. Using config file: /Users/username/.config/datarobot/drconfig.yaml

  debug: false
  endpoint: https://app.datarobot.com/api/v2
  external_editor: vim
  token: ****
  verbose: false
```

### Install shell completions

```
# Interactive installation
$ dr self completion install
✓ Detected shell: zsh
✓ Installing completions to: ~/.zsh/completions/_dr
✓ Completions installed successfully!

# Manual installation
$ dr self completion bash | sudo tee /etc/bash_completion.d/dr
```

### Get version in JSON

```
$ dr self version --format json
{
  "version": "1.0.0",
  "commit": "abc123",
  "buildDate": "2025-11-10T12:00:00Z"
}
```

## See also

- Shell completions guide —detailed completion setup
- Completion command —completion command reference
- Getting started —initial CLI setup
