install
source · Clone the upstream repo
git clone https://github.com/deployhq/deployhq-cli
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/deployhq/deployhq-cli "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.claude" ~/.claude/skills/deployhq-deployhq-cli-claude && rm -rf "$T"
manifest:
.claude/SKILL.mdsource content
DeployHQ CLI — Agent Skill Guide
Identity
DeployHQ is a deployment automation platform. The
dhq CLI manages projects, servers, and deployments.
Authentication
# Guided setup (login or signup, pick a project) dhq hello # Environment variables (CI/agents — no login needed) export DEPLOYHQ_API_KEY=your-api-key export DEPLOYHQ_ACCOUNT=your-account export DEPLOYHQ_EMAIL=your-email # Or interactive login dhq auth login
Quick Reference
Discovery
dhq commands --json # Full command catalog dhq --help # Usage overview dhq <command> --help # Command details
Common Workflows
Deploy and wait for completion
dhq deploy -p <project> -s <server> --wait --json
Deploy latest revision
dhq deploy -p <project> -s <server> --use-latest --wait --json
Check deployment status
dhq deployments show <id> -p <project> --json
Watch a deployment in real-time
dhq deployments watch <id> -p <project>
View deployment logs
dhq deployments logs <id> -p <project>
Rollback
dhq rollback <deployment-id> -p <project> --json
Manage environment variables
dhq env-vars list -p <project> --json dhq env-vars create --name KEY --value VALUE --locked -p <project> dhq global-env-vars create --name KEY --value VALUE
Escape hatch (any API endpoint)
dhq api GET /projects/<id>/environment_variables dhq api POST /projects/<id>/config_files --body '{"config_file":{...}}'
Decision Tree
"Deploy code"
→ find projectdhq projects list --json
→ find serverdhq servers list -p <project> --json
→ deploy and waitdhq deploy -p <project> -s <server> --wait --json- On failure:
→ read logsdhq deployments logs <id> -p <project>
"Check what's deployed"
→ recent deploymentsdhq deployments list -p <project> --json
→ details + stepsdhq deployments show <id> -p <project> --json
"Something went wrong"
→ read logsdhq deployments logs <id> -p <project>
→ rollback if neededdhq rollback <id> -p <project> --json
→ abort if runningdhq deployments abort <id> -p <project>
"Manage project config"
→ environment variablesdhq env-vars list -p <project> --json
→ config filesdhq config-files list -p <project> --json
→ build pipelinedhq build-commands list -p <project> --json
→ SSH commandsdhq ssh-commands list -p <project> --json
→ serversdhq servers list -p <project> --json
Invariants
- Always use
for machine-readable output--json - JSON responses include
with suggested next commandsbreadcrumbs - Exit code 0 = success, 1 = failure (check JSON
field for details)ok - Empty results return exit 0 with empty
(not an error)data
covers any endpoint not in the command treedhq api- Use
on deploy to block until completion (exits non-zero on failure)--wait
Triggers
- User mentions "deploy", "deployment", "release" → deployment workflow
- User mentions "server", "hosting" → server management
- User mentions "rollback", "revert" → rollback workflow
- User mentions "env var", "environment", "config" → configuration management
- User mentions "DeployHQ", "deployhq" → general CLI usage