DataRobot CLI

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.
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.
- 🎨 Beautiful TUI—terminal UI built with Bubble Tea for an enhanced user experience.
Table of Contents
Installation
Quick Install (Recommended)
Install the latest version with a single command:
macOS/Linux
curl -fsSL https://raw.githubusercontent.com/datarobot-oss/cli/main/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/datarobot-oss/cli/main/install.ps1 | iex
Install Specific Version
macOS/Linux
curl -fsSL https://raw.githubusercontent.com/datarobot-oss/cli/main/install.sh | sh -s -- v0.1.0
Windows
$env:VERSION = "v0.1.0"; irm https://raw.githubusercontent.com/datarobot-oss/cli/main/install.ps1 | iex
Installation from source
Prerequisites
- Go 1.25.3 or later (for building from source).
- Git.
- Task (for development and task running).
Build from source
# Clone the repository
git clone https://github.com/datarobot-oss/cli.git
cd cli
# Build the CLI
task build
# The binary is available at ./dist/dr
./dist/dr version
Quick start
1. Set up authentication
Configure your DataRobot credentials:
# Set your DataRobot URL (interactive)
dr auth set-url
# Or specify directly
dr auth set-url https://app.datarobot.com
# Log in to DataRobot (opens browser for OAuth)
dr auth login
2. Set up a template
Use the interactive setup wizard to clone and configure a template:
dr templates setup
This guides you through the following:
- Selecting a template from available options.
- Cloning the template repository.
- Configuring environment variables interactively.
- Setting up application-specific settings.
3. Run tasks
Execute tasks defined in your template Taskfile:
# List available tasks
dr run --list
# Run a specific task
dr run dev
# Run multiple tasks in parallel
dr run lint test --parallel
Documentation
Comprehensive documentation is available in the docs/ directory:
Commands
Main commands
| Command |
Description |
dr auth |
Authentication management (login, logout, set-url). |
dr templates |
Template operations (list, clone, setup, status). |
dr run |
Execute application tasks. |
dr dotenv |
Manage environment variables interactively. |
dr completion |
Generate shell completion scripts. |
dr version |
Show version information. |
Examples
# Authentication
dr auth login
dr auth logout
dr auth set-url https://app.datarobot.com
# Template management
dr templates list # List available templates.
dr templates clone TEMPLATE_NAME # Clone a specific template.
dr templates setup # Interactive template setup wizard.
dr templates status # Show current template status.
# Environment configuration
dr dotenv # Interactive environment editor.
dr dotenv --wizard # Configuration wizard mode.
# Task execution
dr run --list # List available tasks.
dr run dev # Run development server.
dr run build deploy --parallel # Run multiple tasks in parallel.
dr run test --watch # Run tests in watch mode.
# Get help
dr --help
dr templates --help
dr run --help
Shell completion
The CLI supports shell completions for Bash, Zsh, Fish, and PowerShell. See Shell Completion Guide for detailed setup instructions.
Quick setup
Bash (Linux)
dr completion bash | sudo tee /etc/bash_completion.d/dr
Bash (macOS)
dr completion bash > /usr/local/etc/bash_completion.d/dr
Zsh
dr completion zsh > "${fpath[1]}/_dr"
Fish
dr completion fish > ~/.config/fish/completions/dr.fish
PowerShell
dr completion powershell | Out-String | Invoke-Expression
Development
Setting up the development environment
- Install prerequisites
# Install Task (task runner)
# macOS
brew install go-task/tap/go-task
# Linux
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin
# Windows
choco install go-task
- Clone and build
git clone https://github.com/datarobot-oss/cli.git
cd cli
# Install development tools
task dev-init
# Build the CLI
task build
# Run tests
task test
# Run linters
task lint
- Available development tasks
task --list # Show all available tasks.
task test # Run tests.
task test-coverage # Run tests with coverage.
task lint # Run linters.
task fmt # Format code.
task build # Build binary.
task clean # Clean build artifacts.
Project structure
.
├── cmd/ # Command implementations.
│ ├── auth/ # Authentication commands.
│ ├── completion/ # Shell completion.
│ ├── dotenv/ # Environment management.
│ ├── run/ # Task runner.
│ ├── templates/ # Template commands.
│ └── version/ # Version command.
├── internal/ # Private application code.
│ ├── config/ # Configuration management.
│ ├── drapi/ # DataRobot API client.
│ ├── envbuilder/ # Environment builder.
│ ├── task/ # Task discovery and execution.
│ └── version/ # Version information.
├── tui/ # Terminal UI components.
├── docs/ # Documentation.
└── main.go # Application entry point.
Release
Creating a release
This project uses goreleaser for automated releases.
-
Ensure all changes are merged to the main branch.
-
Determine the next version following Semantic Versioning:
MAJOR.MINOR.PATCH (e.g., v1.2.3).
- Pre-release:
v1.2.3-rc.1, v1.2.3-beta.1.
-
Create and push a tag:
# Create a new version tag.
git tag v0.1.0
# Push the tag.
git push --tags
- Automated release: The GitHub Actions workflow automatically:
- Builds binaries for multiple platforms.
- Generates release notes.
- Creates a GitHub release.
- Uploads artifacts.
Release testing
To test the release process without publishing:
# Dry run.
goreleaser release --snapshot --clean
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details on:
- Code of conduct.
- Development workflow.
- Submitting pull requests.
- Coding standards.
- Testing requirements.
Quick contribution guide
- Fork the repository.
- Create a feature branch (
git checkout -b feature/amazing-feature).
- Make your changes.
- Run tests and linters (
task test && task lint).
- Commit your changes (
git commit -m 'Add amazing feature').
- Push to the branch (
git push origin feature/amazing-feature).
- Open a pull request.
License
Copyright 2025 DataRobot, Inc. and its affiliates. All rights reserved.
This is proprietary source code of DataRobot, Inc. See LICENSE.txt for details.
Support
Acknowledgments
Built with: