Skip to content

Getting started with DataRobot CLI

This guide will help you install and start using the DataRobot CLI (dr) for managing custom applications.

Prerequisites

Before you begin, ensure you have:

  • DataRobot account—access to a DataRobot instance (cloud or self-managed). If you don't have an account, sign up at DataRobot or contact your organization's DataRobot administrator.
  • Git—for cloning templates (version 2.0+). Install Git from git-scm.com if not already installed. Verify installation: git --version
  • Task—for running tasks. Install Task from taskfile.dev if not already installed. Verify installation: task --version
  • Terminal—command-line interface access.
  • macOS/Linux: Use Terminal, iTerm2, or your preferred terminal emulator.
  • Windows: Use PowerShell, Command Prompt, or Windows Terminal.

Installation

Install the latest version with a single command:

macOS/Linux

curl https://cli.datarobot.com/install | sh

Windows (PowerShell)

irm https://cli.datarobot.com/winstall | iex

For alternative installation methods (Homebrew, download binary, specific version, or build from source), see the sections below.

Install via Homebrew / Linuxbrew

brew install datarobot-oss/taps/dr-cli

Download binary

Download the latest release for your operating system:

macOS

# Intel Macs
curl -LO https://github.com/datarobot-oss/cli/releases/latest/download/dr-darwin-amd64
chmod +x dr-darwin-amd64
sudo mv dr-darwin-amd64 /usr/local/bin/dr

# Apple Silicon (M1/M2)
curl -LO https://github.com/datarobot-oss/cli/releases/latest/download/dr-darwin-arm64
chmod +x dr-darwin-arm64
sudo mv dr-darwin-arm64 /usr/local/bin/dr

Linux

# x86_64
curl -LO https://github.com/datarobot-oss/cli/releases/latest/download/dr-linux-amd64
chmod +x dr-linux-amd64
sudo mv dr-linux-amd64 /usr/local/bin/dr

# ARM64
curl -LO https://github.com/datarobot-oss/cli/releases/latest/download/dr-linux-arm64
chmod +x dr-linux-arm64
sudo mv dr-linux-arm64 /usr/local/bin/dr

Windows

Download dr-windows-amd64.exe from the releases page and add it to your PATH.

Install a specific version

To install a specific version, pass the version number to the installer:

macOS/Linux

curl https://cli.datarobot.com/install | sh -s -- v0.2.38

Windows (PowerShell)

$env:VERSION = "v0.2.38"; irm https://cli.datarobot.com/winstall | iex

Build from source

If you have Go 1.25.6 or later installed:

# Clone the repository
git clone https://github.com/datarobot-oss/cli.git
cd cli

# Install Task (if not already installed)
go install github.com/go-task/task/v3/cmd/task@latest

# Build
task build

# The binary will be at ./dist/dr
sudo mv ./dist/dr /usr/local/bin/dr

Verify installation

dr --version

You should see output similar to:

DataRobot CLI version: v0.2.38

Updating the CLI

To update to the latest version of the DataRobot CLI, use the built-in update command:

dr self update

This command will automatically:

  • Detect your installation method (Homebrew, manual installation, etc.)
  • Download the latest version
  • Install it using the appropriate method for your system
  • Preserve your existing configuration and credentials

The update process supports:

  • Homebrew (macOS)—automatically upgrades via brew upgrade --cask dr-cli
  • Windows—runs the latest PowerShell installation script
  • macOS/Linux—runs the latest shell installation script

After updating, verify the new version:

dr self version

You can also check the installed version with dr --version at any time.

Uninstalling the CLI

How you uninstall depends on how you installed:

Installed via install script (curl/irm):

  • macOS/Linux: Remove the binary (e.g., sudo rm /usr/local/bin/dr if that is where it was installed). Alternatively, run the uninstall script from the CLI repository if you have it cloned.
  • Windows: Remove the dr executable from your PATH (the install script typically places it in a user directory).

Installed via Homebrew:

brew uninstall dr-cli

Optional: remove configuration and state

  • User config: Delete ~/.config/datarobot/ (Linux/macOS) or %USERPROFILE%\.config\datarobot\ (Windows) to remove drconfig.yaml and stored credentials.
  • Template state: In any cloned template directory, you can remove .datarobot/cli/state.yaml to clear local state for that template.

Initial setup

1. Configure DataRobot URL

First, configure your DataRobot credentials by setting your DataRobot URL. For steps to locate your DataRobot URL (API endpoint) and manage API keys, see the DataRobot documentation.

Set your DataRobot instance URL:

dr auth set-url

You'll be prompted to enter your DataRobot URL. You can use shortcuts for cloud instances:

  • Enter 1 for https://app.datarobot.com
  • Enter 2 for https://app.eu.datarobot.com
  • Enter 3 for https://app.jp.datarobot.com
  • Or enter your custom URL (e.g., https://your-instance.datarobot.com)

Alternatively, set the URL directly:

dr auth set-url https://app.datarobot.com

2. Authenticate

Log in to DataRobot using OAuth:

dr auth login

This will: 1. Open your default web browser. 2. Redirect you to the DataRobot login page. 3. Request authorization. 4. Automatically save your credentials.

Your API key will be securely stored in ~/.config/datarobot/drconfig.yaml.

3. Verify authentication

Check that you're logged in:

dr templates list

This should display a list of available templates from your DataRobot instance.

Your first template

Now that you're set up, let's create your first application from a template.

Using the setup wizard (recommended)

The easiest way to get started:

dr templates setup

This interactive wizard will: 1. Display available templates. 2. Help you select and clone a template. 3. Guide you through environment configuration. 4. Set up all required variables.

Follow the on-screen prompts to complete the setup.

Manual setup

If you prefer manual control:

# 1. List available templates.
dr templates list

# 2. Set up a template (this clones and configures it).
dr templates setup

# 3. Navigate to the template directory.
cd TEMPLATE_NAME

# 4. Configure environment variables (if not done during setup).
dr dotenv setup

Running your application

Once your template is set up, you have several options to run it:

Quick start (recommended)

Use the start command for automated initialization:

dr start

This command will:

  • Check prerequisites and validate your environment.
  • Verify your CLI version meets the template's minimum requirements.
  • Check if you're in a DataRobot repository (if not, launches template setup).
  • Execute a start command in this order:
  • task start from the Taskfile (if available)
  • A quickstart script from .datarobot/cli/bin/ (if available)
  • Fall back to the setup wizard if neither exists.

For non-interactive mode (useful in scripts or CI/CD):

dr start --yes

Running specific tasks

For more control, execute individual tasks:

# List available tasks
dr task list

# Run the development server
dr run dev

# Or execute specific tasks
dr run build
dr run test

Next steps

Common issues

"dr: command not found"

Why it happens: The CLI binary isn't in your system's PATH, so your shell can't find it.

How to fix:

# Check if dr is in PATH
which dr

# If not found, verify the binary location
ls -l /usr/local/bin/dr

# Add it to your PATH (for current session)
export PATH="/usr/local/bin:$PATH"

# For permanent fix, add to your shell config file:
# Bash: echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
# Zsh:  echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.zshrc

How to prevent: Re-run the installation script or ensure the binary is installed to a directory in your PATH.

"Failed to read config file"

Why it happens: The configuration file doesn't exist yet or is in an unexpected location. This typically occurs on first use before authentication.

How to fix:

# Set your DataRobot URL (creates config file if missing)
dr auth set-url https://app.datarobot.com

# Authenticate (saves credentials to config file)
dr auth login

How to prevent: Run dr auth set-url and dr auth login as part of your initial setup. The config file is automatically created at ~/.config/datarobot/drconfig.yaml.

"Authentication failed"

Why it happens: Your API token may have expired, been revoked, or the DataRobot URL may have changed. This can also occur if the config file is corrupted.

How to fix:

# Clear existing credentials
dr auth logout

# Re-authenticate
dr auth login

# If issues persist, verify your DataRobot URL
dr auth set-url https://app.datarobot.com  # or your instance URL
dr auth login

How to prevent: Regularly update the CLI (dr self update) and re-authenticate if you change DataRobot instances or if your organization rotates API keys.

Getting help

For additional help:

# General help
dr --help

# Command-specific help
dr auth --help
dr templates --help
dr run --help

# Enable verbose output for debugging
dr --verbose templates list

# Enable debug output for detailed information
dr --debug templates list

When you enable debug mode, the CLI creates a dr-tui-debug.log file in the current directory for terminal UI debug information.

For advanced options such as --skip-auth (skip authentication checks) and --force-interactive (force the setup wizard to run again), see the Command reference - Global flags.

Configuration location

Configuration files are stored in:

  • Linux/macOS~/.config/datarobot/drconfig.yaml.
  • Windows%USERPROFILE%\.config\datarobot\drconfig.yaml.

See Configuration files for more details.