CLI Reference
Install and use @hogsend/cli — the agent-native companion for inspecting and operating a running Hogsend instance from your terminal.
Overview
@hogsend/cli is the agent-native Hogsend CLI. It talks to a running instance's admin API to inspect journeys, contacts, events, and metrics, probe health, and handle a few local-project chores (onboarding, skills, eject, patch). Every command accepts --json so agents and scripts get structured output.
It is not a project scaffolder and not a deployment tool — you create an app with create-hogsend and deploy it however you like.
Installation
Install it from npm, globally or per-project:
pnpm add -g @hogsend/cli # global `hogsend` bin
# or run without installing:
pnpm dlx @hogsend/cli doctorVerify:
hogsend --versionConnecting to an instance
The data commands call a running instance's API. Point the CLI at it with global flags or environment variables:
| Global flag | Env var | Default |
|---|---|---|
--url <baseUrl> | HOGSEND_API_URL | http://localhost:3002 |
--admin-key <key> | HOGSEND_ADMIN_KEY / ADMIN_API_KEY | — |
--data-key <key> | HOGSEND_DATA_KEY / HOGSEND_API_KEY | — |
--json | — | off (human output) |
doctor reads the unauthenticated health route, so it needs no key. Read commands (journeys, contacts, stats, events) wrap /v1/admin/* and need an admin key. Data-plane writes (contacts upsert, events send, emails, campaigns) hit the public data plane and need an ingest-scoped --data-key. webhooks manages outbound endpoints and needs an admin key.
Commands
| Command | Description |
|---|---|
hogsend dev | Run the full local stack from one command — infra, API + worker, health, URLs |
hogsend domain | Set up + verify the sending domain — DNS records, Cloudflare/Vercel auto-apply |
hogsend doctor | Probe a running instance's health (GET /v1/health) |
hogsend journeys | List, inspect, enable, and disable journeys |
hogsend contacts | List, inspect, and trace contact activity |
hogsend stats | System-wide overview metrics |
hogsend events | Stream a single user's event history |
hogsend emails | Send a transactional email through the data plane (rate-limited 30/min/key) |
hogsend campaigns | Queue a broadcast to a list or bucket, or check its status |
hogsend webhooks | Manage outbound webhook endpoints — create, rotate, test |
hogsend studio | Serve the bundled Hogsend Studio admin SPA locally |
hogsend studio admin | Create, reset, or list Studio admins directly against the database |
hogsend setup | Local onboarding for a scaffolded app |
hogsend skills | Install bundled Claude Code skills into .claude/skills |
hogsend upgrade | Bump @hogsend/* deps to latest and refresh Claude Code skills |
hogsend eject | Vendor a @hogsend/* package into vendor/<name> |
hogsend patch | Patch a package via pnpm's native patch flow |
Run hogsend <command> --help for command-specific options, or hogsend with no arguments for the root help.
Public sign-up is disabled, so the first Studio admin is created from your server — run hogsend studio admin create (it needs DATABASE_URL + BETTER_AUTH_SECRET in the shell, no running API), or set STUDIO_ADMIN_EMAIL (+ optional STUDIO_ADMIN_PASSWORD) and the API mints it on boot into an empty user table. There is no setup token and no web create-admin form. Web Studio is login + self-service forgot/reset only.
Output for agents
Pass --json to any command to get a single machine-readable JSON document on stdout and nothing else. Exit codes are meaningful — doctor, for example, exits non-zero when an instance is unreachable, degraded, or has pending migrations — so you can branch on them in scripts.