> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vulpy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# pnpm vulpy CLI reference

> Reference for the pnpm vulpy command line and top-level pnpm scripts used to install, manage environments, run Fox, and operate a Vulpy Commerce shop.

This page lists every `pnpm vulpy` subcommand and the top-level `pnpm` scripts you use to bootstrap, develop, and deploy Vulpy Commerce. Use these commands on the host or inside the Fox container as noted.

<Note>
  Day-2 commands run as the deploy user (for example, `vulpy-commerce`). Do not run them as root.
</Note>

<Tip>
  **You rarely need to memorize the CLI: ask Fox.** This table is for humans skimming; Fox already knows every subcommand and can run the dev-scope ones for you.

  Try prompts like:

  * "What does `pnpm vulpy env sync` do?"
  * "Run `pnpm vulpy verify` and summarize the output."
  * "Which CLI command backs up dev before an upgrade?"
</Tip>

## Install and lifecycle

These commands set up and verify the application.

| Command                 | Description                                                                                 |
| ----------------------- | ------------------------------------------------------------------------------------------- |
| `pnpm vulpy install`    | Dev-only install: Fox (Hermes) + the development shop. Usually invoked by `bootstrap-host`. |
| `pnpm vulpy verify`     | Health check for the shop, Medusa, Payload seed markers, and Fox basic auth.                |
| `pnpm vulpy dev status` | Show the status of the dev application stack.                                               |

## Environments

Vulpy supports three environments: `dev`, `staging`, and `live`. Create, start, stop, and manage them with the commands below.

| Command                                                 | Description                                                                                           |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| `pnpm vulpy env add live`                               | Human-only: add a live environment, configure domains, and start the stack. Matomo setup is included. |
| `pnpm vulpy env add staging`                            | Add a staging environment.                                                                            |
| `pnpm vulpy env up <name>`                              | Start the environment (for example, `dev`, `staging`, or `live`).                                     |
| `pnpm vulpy env down <name>`                            | Stop the environment.                                                                                 |
| `pnpm vulpy env status <name>`                          | Show the environment status.                                                                          |
| `pnpm vulpy env logs <name>`                            | Tail logs for the environment.                                                                        |
| `pnpm vulpy env golive live`                            | Flip the preview host from noindex to a 301 redirect to the apex. Requires Matomo to be running.      |
| `pnpm vulpy env backup <name>`                          | Back up the environment.                                                                              |
| `pnpm vulpy env restore <name> <archive>`               | Restore the environment from an archive.                                                              |
| `pnpm vulpy env set-domain <name> --domain example.com` | Set a custom domain for the environment.                                                              |
| `pnpm vulpy env sync <name>`                            | Regenerate the application-edge route for the environment.                                            |

## Fox (Hermes)

Fox is the AI operator container. Use these commands to start, stop, and diagnose it.

| Command                              | Description                                                                |
| ------------------------------------ | -------------------------------------------------------------------------- |
| `pnpm vulpy hermes up`               | Start Fox and the Tailscale sidecar when Tailscale is enabled.             |
| `pnpm vulpy hermes down`             | Stop Fox.                                                                  |
| `pnpm vulpy hermes doctor`           | Diagnose Fox Tailscale, host egress lock, and IMDS lock status (AWS only). |
| `pnpm vulpy hermes repair-ownership` | Fix file ownership drift in the Fox workspace.                             |

## Edge

The edge provides HTTPS for domain and sslip.io previews when Tailscale is not used.

| Command                  | Description           |
| ------------------------ | --------------------- |
| `pnpm vulpy edge up`     | Start the HTTPS edge. |
| `pnpm vulpy edge down`   | Stop the edge.        |
| `pnpm vulpy edge status` | Show edge status.     |
| `pnpm vulpy edge logs`   | Tail edge logs.       |

## User

Manage shared admin credentials across Medusa, Payload, Matomo, and the Hermes UI.

| Command                 | Description                                |
| ----------------------- | ------------------------------------------ |
| `pnpm vulpy user reset` | Reset the shared admin email and password. |

## Top-level pnpm scripts

Run these from the repo root. They are defined in the project manifest.

| Command                               | Description                                                                                                       |
| ------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `pnpm bootstrap`                      | Full bootstrap: env files, install, DB, migrate, seed, admin, and publishable key.                                |
| `pnpm dev`                            | Start Postgres/Redis, the storefront, and the Medusa backend (without Fox).                                       |
| `pnpm db:up`                          | Start PostgreSQL and Redis.                                                                                       |
| `pnpm db:hermes:up`                   | Start Fox (Hermes agent, WebUI, and missions).                                                                    |
| `pnpm db:hermes:down`                 | Stop Fox.                                                                                                         |
| `pnpm db:matomo:up`                   | Start the local Matomo stack for analytics testing.                                                               |
| `pnpm db:matomo:down`                 | Stop the local Matomo stack.                                                                                      |
| `pnpm db:down`                        | Stop all Docker services (Postgres, Redis, Matomo).                                                               |
| `pnpm db:reset`                       | Wipe `.data/postgres` and recreate the databases.                                                                 |
| `pnpm build`                          | Build all apps.                                                                                                   |
| `pnpm deploy:matomo:setup`            | Production Matomo install, site creation, and baked site ID.                                                      |
| `pnpm deploy:matomo:verify`           | Production Matomo privacy and legal gate verification.                                                            |
| `pnpm verify:docker:medusa-packaging` | Pre-push guard: verify the Medusa Dockerfile packages workspace deps. Skip with `SKIP_DOCKER_PACKAGING_VERIFY=1`. |
