Last updated on 4th April 2026

CLI Command Reference

This is a complete reference of all dhq commands, flags, and environment variables. For workflow-oriented guides, see the other articles in this section.

Global Flags

These flags are available on all commands:

Flag Description
--account DeployHQ account subdomain
--email Authentication email
--api-key API key
--project, -p Project permalink
--json Output as JSON (optionally specify fields: --json name,status)
--cwd, -C Change working directory before running
--help, -h Show help for any command

Environment Variables

Variable Description
DEPLOYHQ_ACCOUNT Account subdomain
DEPLOYHQ_EMAIL Login email
DEPLOYHQ_API_KEY API key
DEPLOYHQ_PROJECT Default project permalink
DEPLOYHQ_AGENT Agent identifier (for automation)
DEPLOYHQ_OUTPUT_FILE Path for JSONL operation log

Shortcut Commands

Command Subcommands Description Guide
dhq deploy -- Deploy with live progress Deploying
dhq rollback -- Rollback a deployment Deploying
dhq retry -- Retry a failed deployment Deploying
dhq open -- Open DeployHQ in browser Utilities
dhq status -- Quick deployment dashboard Utilities

Resource Commands

Command Subcommands Description Guide
dhq projects list, show, create, update, delete, star, insights, upload-key, badge Manage projects Projects
dhq servers list, show, create, update, delete, reset-host-key Manage servers Servers
dhq server-groups list, show, create, update, delete Manage server groups Servers
dhq deployments list, show, create, abort, rollback, retry, logs, watch Manage deployments Deploying
dhq repos show, create, update, branches, commits, latest-revision Manage repositories Projects
dhq env-vars list, show, create, update, delete Project environment variables Build Pipeline
dhq global-env-vars list, show, create, update, delete Account environment variables Build Pipeline
dhq config-files list, show, create, update, delete Manage config files Build Pipeline
dhq build-commands list, create, update, delete Manage build commands Build Pipeline
dhq build-configs list, show, default, create, update, delete Build configurations Build Pipeline
dhq language-versions list Available build language versions Build Pipeline
dhq ssh-commands list, show, create, update, delete Server SSH commands Build Pipeline
dhq excluded-files list, show, create, update, delete Excluded file patterns Build Pipeline
dhq integrations list, show, create, update, delete Notification integrations Automation
dhq agents list, create, update, delete, revoke Network agents Automation
dhq auto-deploys list, enable Automatic deployments Automation
dhq scheduled-deploys list, show, create, update, delete Scheduled deployments Automation
dhq ssh-keys list, create, delete Account SSH keys Utilities
dhq global-servers list, show, create, update, delete, copy-to-project Account server templates Servers
dhq templates list, public, create, update, delete Project templates Utilities
dhq zones list Deployment zones Utilities

Authentication and Configuration

Command Subcommands Description Guide
dhq auth login, logout, status, token Manage credentials Authentication
dhq config show, init, set, unset Manage CLI configuration Configuration
dhq configure -- Interactive setup wizard Configuration
dhq signup -- Create a new account Utilities

AI and Agent Commands

Command Subcommands Description Guide
dhq assist -- AI deployment assistant AI & Agents
dhq setup claude, codex Install agent plugins AI & Agents
dhq mcp -- Start MCP server AI & Agents
dhq commands -- Command catalog (JSON) AI & Agents
dhq show -- Show resource by URL AI & Agents

Utility Commands

Command Subcommands Description Guide
dhq api -- Raw API requests Scripting
dhq activity list, stats Account activity Utilities
dhq completion bash, zsh, fish, powershell Shell completions Utilities
dhq doctor -- Health check Utilities
dhq update -- Self-update Utilities
dhq feedback -- Send feedback Utilities

Command Aliases

Several commands have shorter aliases:

Alias Full command
project, proj projects
server, srv servers
sg server-groups
deployment, dep deployments
repo, repository repos
env env-vars
lv language-versions
template, tmpl templates

Getting Help

# General help
dhq --help

# Command-specific help
dhq deploy --help
dhq projects --help
dhq deployments create --help