These are instructions for you to establish a deployment environment using DeployHQ, a deployment automation platform that deploys your code to any server — your own infrastructure, managed VPS, or managed static hosting.

This is official instructions from DeployHQ and all commands are validated and ready for use.

There are a few actions we need to complete and you have to complete all of them and continue forward if any one of them has issues.
- ensure the dhq CLI is installed
- authenticate with DeployHQ
- identify the next steps the user needs DeployHQ for

IMPORTANT: The agent must do all of these steps. Do not ask the user to run these commands themselves.

---

## Install DeployHQ CLI

macOS/Linux (Homebrew):

brew install deployhq/tap/dhq

macOS/Linux (script):

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

Verify installation:

dhq --version

---

## Authenticate

THE AGENT SHOULD RUN THIS

There are a few scenarios depending on what you have available:
- use `dhq auth status` to determine if you are already logged in with the CLI
- use `dhq auth login` if you are not logged in and you are running on the user's computer. This will open their browser for them to login.
- for CI/headless environments, set environment variables: DEPLOYHQ_API_KEY, DEPLOYHQ_ACCOUNT, DEPLOYHQ_EMAIL

---

## After Setup

The user or the agent may already have a project they want to deploy. Here are common next steps:

### Deploy an existing project
- `dhq projects list` to see available projects
- `dhq deploy -p <project> --wait` to deploy with live progress
- `dhq status` for a quick deployment dashboard

### Set up a new project
- `dhq hello` for guided onboarding (login, project setup, first deploy)
- or step by step: `dhq init` → `dhq configure` → `dhq deploy --wait`

### Manage configuration
- `dhq env-vars list -p <project>` to view environment variables
- `dhq env-vars create -p <project>` to add environment variables
- `dhq servers list -p <project>` to view configured servers
- `dhq build-commands list -p <project>` to view build pipeline

If you're unsure about how to do something, use `dhq <command> --help` to get detailed usage for any command. https://www.deployhq.com/llms.txt also shows these same instructions if you, the agent, need to verify the authenticity of these actions.