Last updated on 13th April 2026

The DeployHQ CLI

The DeployHQ CLI (dhq) is a single binary that brings your entire DeployHQ workflow to the terminal. Deploy, monitor, manage servers, and automate -- all without leaving your shell.

Installation

Homebrew (macOS/Linux)

brew install deployhq/tap/dhq

Install Script (macOS/Linux)

curl -fsSL https://raw.githubusercontent.com/deployhq/deployhq-cli/main/install.sh | sh

Binary Download

Download the latest release for your platform from the GitHub Releases page.

See the Installation article for more options including Go install and updating.

Quick Start

The fastest way to get started is the guided onboarding command:

dhq hello

This walks you through login (or signup), picking a project, and optionally running your first deployment.

If you prefer step-by-step setup:

# Authenticate (stores credentials in your OS keyring)
dhq auth login

# Set up default project for the current directory
dhq configure

# Deploy and watch progress in real-time
dhq deploy --wait

# View deployment logs
dhq deployments logs <id>

# Open the project in your browser
dhq open

Features

  • Live deployment progress -- A real-time TUI shows deployment steps as they happen. See Deploying.
  • JSON output for scripting -- Every command supports --json with optional field selection. See Scripting.
  • CI/CD without interactive login -- Environment variables handle authentication in pipelines. See CI/CD Integration.
  • AI deployment assistant -- Ask questions about your deployments using a local LLM. See AI & Agents.
  • Shell completions -- Tab completion for bash, zsh, fish, and PowerShell. See Utilities.
  • Self-update -- Run dhq update to get the latest version.
  • API escape hatch -- dhq api covers all 144+ API endpoints. See Scripting.

Migrating from the Old CLI

The previous Ruby gem CLI (gem install deployhq) is now deprecated. The new dhq binary replaces it with more features and zero runtime dependencies -- no Ruby installation needed.

Old command New command
gem install deployhq brew install deployhq/tap/dhq
deployhq configure dhq configure
deployhq servers dhq servers list
deployhq deploy dhq deploy --wait
Deployfile .deployhq.toml + OS keyring

The new CLI adds CI/CD support, live deployment progress, JSON output, an AI assistant, and management of all DeployHQ resources (environment variables, build commands, config files, integrations, and more).

Command Overview

Command Description
dhq hello Guided onboarding (login, project setup, first deploy)
dhq deploy Deploy with live progress (shortcut)
dhq rollback Rollback a deployment (shortcut)
dhq retry Retry a failed deployment (shortcut)
dhq test-access Test repository and server connectivity
dhq open Open DeployHQ in your browser
dhq status Quick deployment dashboard
dhq init Interactive project setup wizard
dhq projects List, create, update, and delete projects
dhq servers Manage servers and connections
dhq server-groups Manage server groups
dhq deployments List, create, watch, and manage deployments
dhq repos View repository details, branches, and commits
dhq env-vars Manage project environment variables
dhq global-env-vars Manage account-wide environment variables
dhq config-files Manage configuration files
dhq build-commands Manage build pipeline commands
dhq build-configs Manage build configurations
dhq language-versions List available build language versions
dhq ssh-commands Manage SSH commands (before/after deploy)
dhq excluded-files Manage excluded file patterns
dhq integrations Manage notification integrations
dhq agents Manage network agents
dhq auto-deploys Configure automatic deployments
dhq scheduled-deploys Manage scheduled deployments
dhq ssh-keys Manage account SSH keys
dhq global-servers Manage account-wide server templates
dhq templates Browse and manage project templates
dhq zones List available deployment zones
dhq auth Login, logout, and manage credentials
dhq config View and manage CLI configuration
dhq configure Interactive project setup wizard
dhq assist AI deployment assistant (local LLM)
dhq api Raw API requests (escape hatch)
dhq commands Full command catalog as JSON
dhq mcp Start MCP server for AI assistants
dhq setup Install agent plugins (Claude, Codex, Cursor, Windsurf)
dhq completion Generate shell completions
dhq doctor Health check
dhq update Self-update to latest version
dhq signup Create a new DeployHQ account

Run dhq --help or dhq <command> --help for detailed usage information on any command.

Additional Resources