Sites

Sites are the deployment targets within an organization. Each site can have multiple deployments.

site list

List all your sites across all organizations.

zerodeploy site list

OptionDescription
--jsonOutput as JSON for scripting
bash
# List all your sites
zerodeploy site list

Example output:

text
Sites:
  my-website -> company/frontend
  landing-page
  docs -> company/monorepo

Sites linked to GitHub repositories show the repo name after the arrow (->).

site create

Create a new site in an organization.

zerodeploy site create <slug> [options]

ArgumentDescription
slugThe slug for the site (used as identifier and subdomain)
OptionDescription
--org <org>Organization (defaults to config/env)
--repo <owner/repo>Link to a GitHub repository on creation
--jsonOutput as JSON for scripting
bash
# Create a site
zerodeploy site create my-website

# Create a site linked to a GitHub repo (explicit org)
zerodeploy site create dashboard --repo company/monorepo --org my-company

site stats

View traffic analytics for a site.

zerodeploy site stats [site] [options]

ArgumentDescription
siteSite slug (defaults to config/env)
OptionDescription
--period <period>Time period: 24h, 7d, or 30d (default: 7d)
--jsonOutput as JSON for scripting
bash
# View last 7 days (default, site from config/env)
zerodeploy site stats

# View last 24 hours
zerodeploy site stats my-site --period 24h

# View last 30 days
zerodeploy site stats my-site --period 30d

Example output:

text
Analytics for my-company/my-site
Period: Last 7 days

Overview
  ----------------------------------------
  Requests:               1,234
  Bandwidth:              45.2 MB
  Unique visitors:          312
  Unique pages:              18

Top Pages
  --------------------------------------------------
  /                                      456 reqs
  /about                                 234 reqs
  /contact                               123 reqs
  /blog                                   98 reqs
  /pricing                                67 reqs

Top Countries
  ----------------------------------------
  United States                          456 reqs
  United Kingdom                         234 reqs
  Germany                                123 reqs

Response Codes
  ----------------------------------------
  2xx (success):            1,180
  3xx (redirect):              32
  4xx (client err):            22

site link

Link an existing site to a GitHub repository.

zerodeploy site link <repo> [options]

OptionDescription
--site <site>Site (defaults to config/env)
--jsonOutput as JSON for scripting
bash
zerodeploy site link company/monorepo

site unlink

Remove the GitHub repository link from a site.

zerodeploy site unlink [options]

OptionDescription
--site <site>Site (defaults to config/env)
bash
zerodeploy site unlink

site delete

Delete a site and all its deployments. This action cannot be undone.

zerodeploy site delete [slug] [options]

OptionDescription
--forceSkip confirmation prompt
bash
# Delete with confirmation prompt (site from config/env)
zerodeploy site delete my-website

# Delete without confirmation (site from config/env)
zerodeploy site delete --force

Warning: This permanently deletes the site, all its deployments, and all associated files from storage. This action cannot be undone.

Monorepo Support

One GitHub repository can be linked to multiple sites. This is useful for monorepos:

text
company/monorepo
├── apps/marketing  → site: marketing
├── apps/dashboard  → site: dashboard
└── apps/docs       → site: docs

Each app in the monorepo can deploy to its own site using the same deploy token and different --dir paths.