Install

This page describes supported installation methods for the OpenDeploy CLI.

Note Recommended: Lite Mode wrappers (opd) that delegate deploys to official CLIs (Vercel/Wrangler/GitHub Pages). Classic binary/source installs remain below.

Lite Mode — recommended

Use a tiny wrapper that calls official CLIs under the hood. No packaging or releases required.

  • Windows PowerShell (installs to %USERPROFILE%\\bin):
powershell
$dest = "$env:USERPROFILE\bin\opd.ps1"
iwr "https://raw.githubusercontent.com/Dendro-X0/OpenDeploy-CLI/main/scripts/lite/opd.ps1" -UseBasicParsing -OutFile $dest
[Environment]::SetEnvironmentVariable('PATH', "$env:USERPROFILE\bin;" + $env:PATH, 'User')
$env:PATH = "$env:USERPROFILE\bin;" + $env:PATH
opd.ps1 --help
  • macOS/Linux (installs to ~/.local/bin/opd):
bash
mkdir -p ~/.local/bin
curl -fsSL "https://raw.githubusercontent.com/Dendro-X0/OpenDeploy-CLI/main/scripts/lite/opd.sh" -o ~/.local/bin/opd
chmod +x ~/.local/bin/opd
export PATH="$HOME/.local/bin:$PATH"
opd --help

Provider prerequisites:

  • Vercel: npm i -g vercel (optional VERCEL_TOKEN for non-interactive)
  • Cloudflare Pages: npm i -g wrangler + CLOUDFLARE_API_TOKEN, CLOUDFLARE_ACCOUNT_ID
  • GitHub Pages: npx gh-pages and a writable git remote

Classic: Install via script

  • Linux/macOS (installs to ~/.local/bin/opd):
bash
curl -fsSL "https://raw.githubusercontent.com/Dendro-X0/OpenDeploy-CLI/main/scripts/install/install.sh" | bash
opd -v
  • Windows PowerShell (installs to %USERPROFILE%\bin\opd.exe):
powershell
iwr "https://raw.githubusercontent.com/Dendro-X0/OpenDeploy-CLI/main/scripts/install/install.ps1" -UseBasicParsing | iex
& "$env:USERPROFILE\bin\opd.exe" -v

Install from npm — when available

Requires Node.js 18+ (includes npm 9/10). No repository clone required.

  • One-off (always latest):
bash
npx opendeploy@latest start
  • Global install (adds opd to PATH):
bash
npm i -g opendeploy
opd -h

Install from Tag (source) — alternative

Download the latest tagged source archive, build the CLI, and run it locally.

  • Windows (PowerShell) — single command to download latest tag (adds TLS1.2 and User-Agent):
powershell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$H=@{ 'User-Agent'='opd-installer' };$O='Dendro-X0';$R='OpenDeploy-CLI';$t=Invoke-RestMethod -Headers $H "https://api.github.com/repos/$O/$R/tags?per_page=1";$Tag=if($t){$t[0].name}else{'main'};$Zip="$env:TEMP/opd-$Tag.zip";Invoke-WebRequest -Headers $H -Uri "https://github.com/$O/$R/archive/refs/tags/$Tag.zip" -OutFile $Zip;Expand-Archive -Force $Zip -DestinationPath .;Write-Host "Downloaded $Tag"
  • macOS/Linux (bash) — single command to download latest tag (no jq required):
bash
TAG=$(curl -sH 'User-Agent: opd-installer' https://api.github.com/repos/Dendro-X0/OpenDeploy-CLI/tags?per_page=1 | sed -n 's/.*"name"\s*:\s*"\([^"]*\)".*/\1/p' | head -n1); TAG=${TAG:-main}; curl -L "https://github.com/Dendro-X0/OpenDeploy-CLI/archive/refs/tags/$TAG.tar.gz" | tar -xz; echo "Downloaded $TAG"

Build and run (from the extracted folder; building from source requires Node 20+ and pnpm via Corepack):

bash
# enable pnpm (avoid pinning a specific version)
corepack enable
# install deps for the monorepo
pnpm install -r --no-frozen-lockfile
# build CLI
pnpm -C packages/cli build
# run CLI
node packages/cli/dist/index.js -v

Optional: create a small shell wrapper named opd in your PATH that executes node <path>/packages/cli/dist/index.js %* (Windows .cmd) or node <path>/packages/cli/dist/index.js "$@" (Unix). We will replace this with a single binary once releases are published.

Install from GitHub Releases — alternative

Download a prebuilt binary and place it in your PATH.

  • Windows (PowerShell):
powershell
$dest = "$env:USERPROFILE\bin"
New-Item -ItemType Directory -Force -Path $dest | Out-Null
Invoke-WebRequest -Uri "https://github.com/Dendro-X0/OpenDeploy-CLI/releases/latest/download/opd-win-x64.exe" -OutFile "$dest/opd.exe"
# Ensure $env:USERPROFILE\bin is on PATH, then:
& "$dest\opd.exe" -h
  • macOS (Apple Silicon):
bash
curl -L -o opd https://github.com/Dendro-X0/OpenDeploy-CLI/releases/latest/download/opd-macos-arm64
chmod +x opd && sudo mv opd /usr/local/bin/opd
opd -h
  • macOS (Intel):
bash
# Intel builds may be added later; use source install if not available.
echo "See Install from Tag (source) above"
  • Linux (x64):
bash
curl -L -o opd https://github.com/Dendro-X0/OpenDeploy-CLI/releases/latest/download/opd-linux-x64
chmod +x opd && sudo mv opd /usr/local/bin/opd
opd -h
  • Linux (arm64):
bash
curl -L -o opd https://github.com/Dendro-X0/OpenDeploy-CLI/releases/latest/download/opd-linux-arm64
chmod +x opd && sudo mv opd /usr/local/bin/opd
opd -h

Notes:

  • The binary is self-contained; no Node.js is required.
  • Prefer the Docker method below if you cannot install binaries system-wide.

Windows (PowerShell) — auto-detect latest

powershell
$Owner = 'Dendro-X0'
$Repo  = 'OpenDeploy-CLI'
# Detect latest tag; set $Version = 'vX.Y.Z' to pin to a specific release
$hdr   = @{ 'User-Agent' = 'opd-installer' }
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
$rel   = Invoke-RestMethod -Headers $hdr "https://api.github.com/repos/$Owner/$Repo/releases/latest"
$Version = $rel.tag_name
$arch = (Get-CimInstance Win32_Processor).Architecture
$isArm = ($arch -eq 12)
$asset = 'opd-win-x64.exe'
$url = ($rel.assets | Where-Object name -eq $asset).browser_download_url
if (-not $url) { throw "Asset not found: $asset in $Version" }
$dest = "$env:USERPROFILE\bin"
New-Item -ItemType Directory -Force -Path $dest | Out-Null
Invoke-WebRequest -Headers $hdr -Uri $url -OutFile "$dest/opd.exe"
"Installed: $dest\opd.exe"; & "$dest/opd.exe" -v

macOS/Linux — auto-detect latest

bash
set -euo pipefail
OWNER=Dendro-X0 REPO=OpenDeploy-CLI UA=opd-installer
VERSION=$(curl -sH "User-Agent: $UA" https://api.github.com/repos/$OWNER/$REPO/releases/latest | jq -r .tag_name)
U=$(uname -s)
case "$U" in Darwin) OS=macos ;; Linux) OS=linux ;; *) echo "Unsupported OS: $U"; exit 1 ;; esac
ARCH=$(uname -m)
case "$ARCH" in x86_64) ARCH=x64 ;; aarch64|arm64) ARCH=arm64 ;; *) echo "Unsupported arch: $ARCH"; exit 1 ;; esac
NAME="opd-${OS}-${ARCH}"
URL=$(curl -sH "User-Agent: $UA" https://api.github.com/repos/$OWNER/$REPO/releases/tags/$VERSION | jq -r ".assets[] | select(.name==\"$NAME\") | .browser_download_url")
sudo curl -L "$URL" -o /usr/local/bin/opd && sudo chmod +x /usr/local/bin/opd
opd -v

Troubleshooting downloads:

  • If Invoke-WebRequest shows an HTML page or fails with a web exception, the URL may be wrong (no release/tag yet) or headers are missing. Use the API‑based scripts above, ensure a tag like v1.1.1 exists, and that assets are attached (e.g., opd-win-x64.exe).
  • If using the direct latest/download URLs above, verify that a release is published with the corresponding asset name for your OS/arch (e.g., opd-windows-x64.exe).

Docker/OCI (no Node required)

Use the container image published to GHCR (if available for your architecture).

bash
docker run --rm -it \
  -v "$PWD:/work" -w /work \
  ghcr.io/dendro-x0/opd:latest start --provider vercel --env preview

Tip: add a tiny shell/pwsh wrapper named opd that calls the container so you can run opd … locally.

Package managers (alternative)

Not available yet. We’ll update docs when the package is published to registries. Use GitHub Releases (above) or Docker instead.

Git (dlx) — experimental

Running directly from Git is currently not supported for most users. It may work in limited scenarios, but we recommend the Releases binaries above (or Docker). We’ll revisit this path later.

Verify

  • Show help:
bash
opd -h
  • Run a dry-run plan:
bash
opd -s --provider vercel --env preview --dry-run --json
  • Use NDJSON streaming in CI:
bash
OPD_NDJSON=1 opd start --provider vercel --env preview --ci

First deploy (minimal)

bash
# Non-interactive defaults, auto-detects framework and provider:
opd start --minimal

# Monorepo path example:
opd start --minimal --path apps/web

Shortcuts:

  • opd -v — version
  • opd -h — help
  • opd -s — start wizard (equivalent to opd start)