Datarails CLI  ·  Command reference →  ·  latest: v1.6.139  ·  built 2026-10-15 21:07 UTC

Install dr-cli

Three steps: install an AI assistant (Claude Code, Gemini CLI, or Codex CLI), install dr-cli, start using it. End-to-end in about two minutes once your assistant is in place. For the full list of commands and flags, see the command reference.

Step 1 — Install an AI assistant

dr-cli is designed to be driven by an AI coding assistant — you describe what you want in natural language, the assistant picks the right dr command and runs it. Any of these works:

Install whichever you prefer (or several) following the official quickstart, then verify:

claude --version    # if you installed Claude Code
gemini --version    # if you installed Gemini CLI
codex --version     # if you installed Codex CLI

Once your assistant and dr-cli are installed (Steps 2–3), the universal setup is to open a new folder and run dr skill init-project from inside it. That wires the dr-cli skill into whichever assistant you launch from that folder — see Step 4.

Step 2 — Prerequisites

Node.js 18 or newer — npm ships with Node, no other tools required. Check what you have:

node --version

If it prints v18.x.x or higher, you're set — jump straight to the install section. Otherwise expand the platform-specific Node install instructions inside each tab below.

Note: Option A (the one-shot script in each tab) installs Node for you automatically if it's missing — you only need the manual Node steps if you're going with Option B.

Step 3 — Install dr-cli for your platform

Option A — One-shot script (recommended)

Run in any Windows terminal:

powershell -ExecutionPolicy Bypass -Command "irm https://drcli.datarails.com/cli/install.ps1 | iex"

Installs Node 18+ if missing, then installs dr-cli. Re-run any time to update.

Need Node.js 18+ first? — skip if you already have it, or if you used Option A

Recommended: winget (built into Windows 11 and modern Windows 10). Run in PowerShell:

winget install -e --id OpenJS.NodeJS.LTS

No admin needed — winget installs to your user profile. Open a NEW PowerShell window after install so node and npm are on PATH.

Alternative — installer from nodejs.org:

Download the LTS Windows installer (.msi) from nodejs.org/en/download, run it, click through. Same outcome.

Verify after install in a fresh terminal:

node --version
npm --version

Both should print sensible versions (Node ≥ 18.x, npm ≥ 10.x).

Option B — Manual (already have Node ≥ 18)

Single command in PowerShell or Command Prompt:

npm install -g @datarails-ai/dr-cli --registry https://datarails.jfrog.io/artifactory/api/npm/dr-cli-virtual

Re-run the same command later to update. npm uninstall -g @datarails-ai/dr-cli removes it.

If dr isn't found after install: npm's global bin directory may not be on your PATH. Open a fresh PowerShell window — the system PATH refreshes for new shells. If still missing, run npm config get prefix to find the directory and add its \bin subfolder to PATH.

Option A — One-shot script (recommended)

Open Terminal and run:

curl -fsSL https://drcli.datarails.com/cli/install.sh | bash

Installs Node 18+ if missing, then installs dr-cli. Re-run any time to update.

Need Node.js 18+ first? — skip if you already have it, or if you used Option A

macOS — recommended: Homebrew. Run in Terminal:

brew install node@20
echo 'export PATH="$(brew --prefix node@20)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

The node@20 formula is keg-only, which is why the PATH line is needed. Replace ~/.zshrc with ~/.bash_profile if you use bash.

macOS — alternative: installer from nodejs.org.

Download the LTS macOS installer (.pkg) from nodejs.org/en/download and run it. No PATH config needed.

Linux — Ubuntu / Debian (NodeSource):

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

Linux — Fedora / RHEL / CentOS:

sudo dnf install -y nodejs:20

On older RHEL-family distros without dnf modules: curl -fsSL https://rpm.nodesource.com/setup_20.x | sudo -E bash - && sudo yum install -y nodejs

Verify after install in a fresh terminal:

node --version
npm --version

Both should print sensible versions (Node ≥ 18.x, npm ≥ 10.x).

Option B — Manual (already have Node ≥ 18)

Single command in any shell:

npm install -g @datarails-ai/dr-cli --registry https://datarails.jfrog.io/artifactory/api/npm/dr-cli-virtual

Re-run the same command later to update. npm uninstall -g @datarails-ai/dr-cli removes it.

macOS — if npm complains about permissions on /usr/local: you have a system-installed Node where global installs need sudo. Easier fix: install Node via Homebrew (brew install node@20) or nvm — both put global packages under your home directory so sudo isn't needed.

Step 4 — Use with your AI assistant

dr-cli ships with an embedded skill — the npm install in Step 3 automatically dropped a copy under each AI assistant directory it found in your home folder, so any session on this machine can drive the CLI using natural-language prompts like "log me into DEV and show me unmapped LUT items for customer Acme".

Where the skill landed:

Installed your assistant after dr-cli? Re-run dr skill install ~ once. The installer skips any assistant whose dotdir doesn't exist — re-running picks up newly present ones. Re-runs with the same skill bytes are no-ops.

Per-session usage

Each time you want to do dr-cli work, create a fresh working folder for that session and launch your assistant from inside it. The folder gives the assistant a scratch space for any files it produces (exports, snapshots, payloads), without polluting your home directory.

Claude Code

Windows (PowerShell):

mkdir $env:USERPROFILE\dr-work
cd $env:USERPROFILE\dr-work
claude

macOS / Linux:

mkdir -p ~/dr-work
cd ~/dr-work
claude

Gemini CLI

Windows (PowerShell):

mkdir $env:USERPROFILE\dr-work
cd $env:USERPROFILE\dr-work
gemini

macOS / Linux:

mkdir -p ~/dr-work
cd ~/dr-work
gemini

Verify the skill is loaded inside a Gemini session by typing /memory show — you should see a section sourced from ~/.gemini/skills/dr-cli/SKILL.md in the concatenated context. Use /memory reload if you re-ran dr skill install ~ mid-session.

Per-project setup — Gemini CLI & Codex CLI

For assistants that read context from the current folder (Codex CLI) or that benefit from a project-local override (Gemini CLI), run dr skill init-project inside the working folder. This is in addition to — not a replacement for — the global install: Claude Code keeps its trigger-gated global skill (no project-local copy needed).

Windows (PowerShell):

mkdir $env:USERPROFILE\dr-work
cd $env:USERPROFILE\dr-work
dr skill init-project
codex   # or: gemini

macOS / Linux:

mkdir -p ~/dr-work
cd ~/dr-work
dr skill init-project
codex   # or: gemini

dr skill init-project [dir] writes three files under the target directory (defaulting to the current folder):

All three files are idempotent — re-running dr skill init-project after a dr-cli upgrade refreshes the block in place without touching any user content outside the markers. Pass --force if you've hand-edited .dr-cli/SKILL.md and want to overwrite it with the bundled version. CLAUDE.md is intentionally not created — Claude Code is wired globally by Step 3 and uses trigger gating, so a project-local copy would be redundant.

Try a prompt

Inside either assistant, the dr-cli skill is already loaded from your home directory — try one of:

The assistant reads the skill, picks the right dr command, runs it, and presents the result. For destructive operations (delete / update) the skill instructs the assistant to confirm with you in chat before executing.

Tip — re-use the same folder. You can keep the dr-work folder around and reuse it across sessions. Both Claude Code and Gemini CLI preserve some per-folder state (Claude: project history; Gemini: per-project GEMINI.md if you add one), so reopening picks up where you left off.

Update or remove

Update to the latest published version any time — same command as install:

npm install -g @datarails-ai/dr-cli --registry https://datarails.jfrog.io/artifactory/api/npm/dr-cli-virtual

Uninstall:

npm uninstall -g @datarails-ai/dr-cli