Skip to content

datarobot-oss/cli

DataRobot Logo

DataRobot CLI

Homepage · Documentation · Support

Latest Release License

DataRobot CLI

Go Report Card License

The DataRobot CLI (dr) is a command-line interface for managing DataRobot custom applications. It provides an interactive experience for cloning, configuring, and deploying DataRobot application templates with built-in authentication, environment configuration, and task execution capabilities.

If you're new to DataRobot, visit the DataRobot documentation to learn more about the platform.

Features

  • 🔐 Authentication management—seamless OAuth integration with DataRobot.
  • 📦 Template management—clone and configure application templates interactively.
  • ⚙️ Interactive configuration—smart wizard for environment setup with validation.
  • 🚀 Task runner—execute application tasks with built-in Taskfile integration.
  • 🐚 Shell completions—support for Bash, Zsh, Fish, and PowerShell.
  • 🔄 Self-update capability—easily update to the latest version with a single command.

Table of contents

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
Click here for alternative installation methods
The following are alternative installation methods for the DataRobot CLI. You can choose to download a binary directly, install a specific version, or build and install from source.

Download binary (recommended)

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

If you'd like to install a specific version, you can do so by passing the version number to the installer, as shown below:

macOS/Linux

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

Windows (PowerShell)

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

Build and install from source

If you would like to build and install from source, you can do so by following the instructions below:

Prerequisites

  • Go 1.25.3 or later (for building from source)
  • Git
  • Task (for development and task running)

Build and install from source

# 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 the binary
task build

# The binary will be at ./dist/dr
# Install it to your PATH (example for macOS/Linux)
sudo mv ./dist/dr /usr/local/bin/dr

Windows (install a specific version)

# 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 the binary
task build

# The binary will be at .\dist\dr.exe
# Add it to your PATH or move it to a directory in your PATH

Verify installation

You can verify the installation by checking the version:

dr --version

You should see output similar to:

DataRobot CLI (version v0.2.9)

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

Quick start

Now that you have installed the DataRobot CLI, you can start using it to manage your DataRobot applications. The following sections will walk you through configuring the CLI, setting up a template, and running tasks.

Set up authentication

First, configure your DataRobot credentials by setting your DataRobot URL. Refer to DataRobot's API keys and tools page for steps to locate your DataRobot URL, also known as your DataRobot API endpoint.

# Set your DataRobot URL (interactive)
dr auth set-url
Click here for more information about configuration files
Configuration files are stored in:
  • Linux/macOS: ~/.config/datarobot/drconfig.yaml
  • Windows: %USERPROFILE%\.config\datarobot\drconfig.yaml

See Configuration files for more details.

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
  • Enter a valid URL if you have a custom/self-managed instance

Alternatively, set the URL directly:

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

Once you have configured the URL, 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.

Verify authentication

Check that you're logged in:

dr templates list

This command displays a list of available templates from your DataRobot instance.

Tip

What's next? Now that you're authenticated, you can:

  • Browse available templates: dr templates list
  • Start the setup wizard: dr templates setup
  • See the Command reference for all available commands

Set up a template

Next, load the interactive setup wizard to clone and configure a template. A template is a pre-configured application scaffold that you can customize. When you clone and configure a template, it becomes your application—a customized instance ready to run and deploy.

dr templates setup

After a few moments, the setup wizard displays the application templates available:

Templates list

Note

You can navigate through the list of templates using the arrow keys, or filter by pressing the / key and entering a search term. The setup wizard will only display templates that are available to you.

Select a template by pressing the Enter key. At the subsequent prompt, specify the desired directory name for the template and press Enter to have the setup wizard clone the template repository to your local machine.

Click here for manual setup instructions

Manual setup: If you prefer manual control:

# 1. List available templates.
dr templates list

# 2. Clone a specific template.
dr templates clone TEMPLATE_NAME

# 3. Navigate to the template directory.
cd TEMPLATE_NAME

# 4. Configure environment variables.
dr dotenv setup

[!TIP] What's next? After configuring your template:

  • Start your application: dr start or dr run dev
  • Explore available tasks: dr task list
  • See Run tasks below

Follow the instructions when prompted to continue configuring the template. The prompts vary depending on which template you selected. When all steps are finished, press Enter to exit the wizard and proceed to the next section.

Note

The CLI automatically tracks setup completion in a state file located at .datarobot/cli/state.yaml within your template directory. This allows the CLI to skip redundant setup steps on subsequent runs. For more details, see State tracking.

Tip

What's next? After the setup wizard completes, navigate to your new application directory with cd [template-name] and start your application with dr start or dr run dev.

Run tasks

Now that you've cloned and configured a template, you can start running tasks defined in the template Taskfile.

Quick start (recommended):

Use the start command for automated initialization:

dr start

This command will:

  • Check prerequisites and validate your environment.
  • Execute a template-specific quickstart script if available.
  • Fall back to the setup wizard if no script exists.

Tip

You can use the --yes flag to skip all prompts and execute immediately. This is useful in scripts or CI/CD pipelines.

Running specific tasks:

For more control, execute individual tasks with the run command:

# List available tasks
dr task list

# Run the development server
dr run dev

# Or execute specific tasks
dr run build
dr run test

Tip

What's next? Your application is now running! Explore the Template system documentation, set up shell completions, or review the Command reference for detailed command documentation.

Next steps

From here, refer to the repository of the template you selected to start customizing it. Refer to the Docs section of this repository for more details on using the DataRobot CLI. See the links below for specific details:

  • User guide—complete usage guide covering installation, authentication, working with templates, configuration management, and shell completions.
  • Quick reference—one-page command reference for the most common commands.
  • Template system—deep dive into how templates work, the interactive configuration wizard, and environment variable management.
  • Command reference—detailed documentation for all CLI commands and subcommands, including flags, options, and usage examples.
  • Auth command—detailed authentication management guide.
  • Development guide—for contributors: building from source, development setup, project structure, and release process.

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

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details on:

  • Code of conduct.
  • Development workflow.
  • Submitting pull requests.
  • Coding standards.
  • Testing requirements.

Support

Acknowledgments

Built with:

About

The DataRobot command line interface

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 17