hogsend dev
Run the full local Hogsend stack from one command — infra, .env, migrations, API + worker, health wait, and the local URLs.
One command runs the whole local loop for a scaffolded Hogsend app. From the app directory:
hogsend devIt orchestrates five steps, in order:
- Infra — detects whether Postgres, Redis, and Hatchet-Lite are already running (
docker compose psplus TCP probes against the ports in your.env); runsdocker compose up -donly when something is missing. Apps without a compose file skip this step entirely. .env— copies.env.example→.envwhen.envis missing, and replaces a placeholderBETTER_AUTH_SECRETwith a generated 64-char hex secret (a real secret is never overwritten).- Migrate —
pnpm db:migrate(engine track, then your client track), when the app has the script. - Spawn — starts
[api] pnpm run devand[worker] hatchet worker devas line-prefixed child processes. The hatchet CLI mode is used only when both thehatchetbinary and ahatchet.yamlexist; otherwise the worker runs aspnpm run worker:dev(the scaffold's default). - Health — waits for
GET /v1/health, then prints the local URL block: the API, Studio at/studio, the Hatchet dashboard, and the docs.
When an admin key is configured (--admin-key / HOGSEND_ADMIN_KEY), the URL block also carries a one-line domain/test-mode status from GET /v1/admin/domain — Test mode active — emails redirect to you@example.com (domain pending) or Domain mysite.com — verified. The call is guarded: with no key, or against an engine without the domain feature, the line is simply omitted.
Ctrl+C stops everything — the API, the worker, and their whole process trees (SIGTERM, then SIGKILL after 5 seconds for stragglers). If either child dies on its own, the rest is taken down and hogsend dev exits with that child's code.
hogsend dev [options]
hogsend dev --fire <event> [event-send options]Options
| Option | Description |
|---|---|
--cwd <dir> | Project root to run in (defaults to the current directory). |
--no-worker | Start the API only (skip the worker process). |
--no-infra | Skip the docker/.env/migrate steps (infra managed elsewhere). |
--fire <event> | Don't boot anything — send a test event to the running instance via POST /v1/events. |
-h, --help | Show this help. |
hogsend dev refuses to start when the configured PORT is already in use (another dev server, or a second hogsend dev), and fails early with the missing piece named when the directory isn't a runnable Hogsend app (it needs a package.json with dev + worker:dev scripts and @hogsend/engine as a dependency).
Firing a test event
--fire works standalone, from a second terminal, while hogsend dev runs in the first. It checks the instance is reachable, then delegates to hogsend events send — so it accepts every event-send option: --email, --user-id, --prop, --props, --contact-prop, --contact-props, --list, --unlist, --idempotency-key, --timestamp.
hogsend dev --fire signup --email a@b.com --prop plan=proExamples
hogsend dev
hogsend dev --cwd apps/api
hogsend dev --no-worker
hogsend dev --fire signup --email a@b.com --prop plan=prohogsend dev shares its setup steps with hogsend setup — it is the "setup and run, one command" superset. Scaffolded apps also ship pnpm bootstrap, which additionally mints the local Hatchet token and an ingest-scoped HOGSEND_API_KEY, and remaps conflicting host ports; hogsend dev detects and reuses everything bootstrap set up. A typical first run is pnpm bootstrap once, then hogsend dev every day after.
CLI Reference
Install and use @hogsend/cli — the agent-native companion for inspecting and operating a running Hogsend instance from your terminal.
hogsend doctor
Probe a running Hogsend instance via GET /v1/health and report component status, schema state, and an overall verdict — no admin key required.