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) |
--non-interactive |
Never prompt; error on ambiguity (auto-enabled when piped) |
--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 hello |
-- | Guided onboarding wizard | Installation |
dhq launch |
-- | One-command deploy to Static Hosting or Managed VPS, optionally on your own domain with --custom-domain |
Deploying |
dhq deploy |
-- | Deploy with live progress | Deploying |
dhq rollback |
-- | Rollback a deployment | Deploying |
dhq retry |
-- | Retry a failed deployment | Deploying |
dhq test-access |
show |
Test repo and server connectivity | Deploying |
dhq init |
-- | Interactive project setup wizard | Configuration |
dhq insights |
-- | Deployment insights and stats | Utilities |
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, regenerate-key, apply-suggestions, ai-overview, undeployed-changes |
Manage projects | Projects |
dhq servers |
list, show, create, update, delete, reset-host-key, from-global, metrics |
Manage servers | Servers |
dhq server-groups |
list, show, create, update, delete |
Manage server groups | Servers |
dhq domains |
list, show, add, remove, check |
Custom domains for Static Hosting sites | Servers |
dhq deployments |
list, show, create, abort, rollback, retry, logs, watch |
Manage deployments | Deploying |
dhq deployment-checks |
list, show, create, update, delete |
Pre-build and post-deploy checks | Automation |
dhq repos |
show, create, update, branches, commits, commit-info, 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, link-global, unlink-global |
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, link-global, unlink-global |
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, download |
Account SSH keys | Utilities |
dhq global-servers |
list, show, create, update, delete, copy-to-project |
Account server templates | Servers |
dhq global-config-files |
list, show, create, update, delete |
Account config file templates | Build Pipeline |
dhq build-cache-files |
list, create, update, delete |
Build cache files | Build Pipeline |
dhq build-languages |
set |
Set build language version | Build Pipeline |
dhq build-known-hosts |
list, create, delete |
Build SSH known hosts | Build Pipeline |
dhq templates |
list, show, public, public-show, create, update, delete, plus sub-resource groups: servers, server-groups, build-commands, build-cache-files, build-known-hosts, build-languages, build-configuration, commands, config-files, excluded-files, integrations |
Project templates | Utilities |
dhq zones |
list |
Deployment zones | Utilities |
dhq account |
get, update, billing |
Account details and billing | Utilities |
dhq profile |
get, update |
Your own user profile | Utilities |
dhq api-keys |
create, delete |
Manage API keys | Utilities |
dhq users |
list, show, create, update, delete, resend-invitation |
Manage account users | Utilities |
dhq teams |
list, show, create, update, delete |
Manage teams (account-level permission groups) | Utilities |
dhq folders |
list, create, update, delete |
Organise projects into folders | Utilities |
dhq invoices |
list, download |
List and download invoices | Utilities |
dhq plans |
-- | List subscription plans and pricing | Utilities |
dhq ip-ranges |
-- | DeployHQ IP ranges for firewall allowlisting | Utilities |
dhq hosted-resources |
list, show, sync, retry-provision |
Managed VPS and Static Hosting resources | Utilities |
dhq managed-hosting |
regions, sizes |
Browse Managed VPS regions and sizes | Utilities |
dhq beta |
enroll |
Manage beta enrollment | Utilities |
dhq detect |
-- | Detect a project's framework and suggested deploy configuration | Utilities |
dhq url |
parse |
URL tools | 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 skills |
show, list, install |
Read or install the DeployHQ skill for local AI agents | AI & Agents |
dhq setup |
claude, codex, cursor, windsurf |
Install agent plugins (deprecated -- use dhq skills install) |
AI & Agents |
dhq mcp |
-- | Set up the hosted MCP server (--local runs the local stdio 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 telemetry |
status, enable, disable |
Manage anonymous usage telemetry | Utilities |
dhq version |
-- | Show CLI version | 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 |
domain, custom-domains |
domains |
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