Hogsend
CLI Reference

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 doctor

Verify:

hogsend --version

Connecting to an instance

The data commands call a running instance's API. Point the CLI at it with global flags or environment variables:

Global flagEnv varDefault
--url <baseUrl>HOGSEND_API_URLhttp://localhost:3002
--admin-key <key>HOGSEND_ADMIN_KEY / ADMIN_API_KEY
--data-key <key>HOGSEND_DATA_KEY / HOGSEND_API_KEY
--jsonoff (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

CommandDescription
hogsend devRun the full local stack from one command — infra, API + worker, health, URLs
hogsend domainSet up + verify the sending domain — DNS records, Cloudflare/Vercel auto-apply
hogsend doctorProbe a running instance's health (GET /v1/health)
hogsend journeysList, inspect, enable, and disable journeys
hogsend contactsList, inspect, and trace contact activity
hogsend statsSystem-wide overview metrics
hogsend eventsStream a single user's event history
hogsend emailsSend a transactional email through the data plane (rate-limited 30/min/key)
hogsend campaignsQueue a broadcast to a list or bucket, or check its status
hogsend webhooksManage outbound webhook endpoints — create, rotate, test
hogsend studioServe the bundled Hogsend Studio admin SPA locally
hogsend studio adminCreate, reset, or list Studio admins directly against the database
hogsend setupLocal onboarding for a scaffolded app
hogsend skillsInstall bundled Claude Code skills into .claude/skills
hogsend upgradeBump @hogsend/* deps to latest and refresh Claude Code skills
hogsend ejectVendor a @hogsend/* package into vendor/<name>
hogsend patchPatch 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.

On this page