Last updated on 4th April 2026

Managing Projects with the CLI

The DeployHQ CLI lets you manage all aspects of your projects, from creation to repository configuration.

Listing Projects

# List all projects (starred projects appear first)
dhq projects list

# JSON output
dhq projects list --json

# Selected fields only
dhq projects list --json name,permalink,zone

Viewing Project Details

dhq projects show my-app

This displays the project name, repository URL, branch, zone, and other configuration details.

Creating a Project

dhq projects create --name "My New App"

# With options
dhq projects create --name "My New App" --zone eu --template rails-template

Updating a Project

dhq projects update -p my-app --name "My Renamed App"

Deleting a Project

dhq projects delete -p my-app

Starring Projects

Toggle a project's starred status. Starred projects appear first in listings:

dhq projects star -p my-app

Project Insights

View deployment statistics and analytics for a project:

dhq projects insights -p my-app

Uploading Deploy Keys

Upload your project's SSH public key to GitHub or GitLab:

dhq projects upload-key -p my-app

This simplifies the process of granting DeployHQ access to your repository.

Deployment Badge

Generate a deployment status badge for your README:

dhq projects badge -p my-app

Opening in Browser

Open the project dashboard in your default browser:

dhq open my-app

Repository Management

View and manage the repository connected to your project.

Viewing Repository Details

dhq repos show -p my-app

Setting Up a Repository

dhq repos create -p my-app --scm-type git --url git@github.com:user/repo.git --branch main

Updating Repository Settings

dhq repos update -p my-app --branch main

Listing Branches

dhq repos branches -p my-app

Viewing Recent Commits

dhq repos commits -p my-app

Getting the Latest Revision

dhq repos latest-revision -p my-app

Using Templates

Create a project from an existing template:

# List available templates
dhq templates list

# List public templates (optionally filtered by framework)
dhq templates public --framework rails

# Create a project from a template
dhq projects create --name "My App" --template my-template

See Utilities for more on template management.