1. Documentation
  2. CLI
  3. CLI commands
ReadmenpmGitHub
  • Introduction
  • Quickstart
  • Configuration file
  • Monitors
  • Checks and scheduling
  • Notifications
  • Incidents and maintenance
  • Subscribers
  • Metrics and badges
  • Identity and appearance
  • Telemetry
  • The check run
  • Uptime and history
  • Automatic incidents
  • Notification delivery
  • Public subscriptions
  • StatusPage component
  • Themes
  • UI primitives
  • Colour mode
  • React Router
  • Next.js
  • Astro
  • SQLite
  • Cloudflare D1
  • PostgreSQL
  • Schema and migrations
  • Cloudflare Workers
  • Vercel
  • Self-hosting
  • API overview
  • Status endpoints
  • Incident and maintenance endpoints
  • Subscriber endpoints
  • Badges, feeds and metrics
  • Admin endpoints
  • CLI commands
  • Package exports
  • Security
  • Troubleshooting

CLI commands

dev, check, db, incident and maintenance — every command, flag and exit code.

The heyo-status binary ships with @heyo-sh/heyo-status and operates on the project's configuration file directly — no running server, no API token.

bash
heyo-status dev [--config <path>] [--port <port>] [-- <framework dev command>]heyo-status check run [--config <path>]heyo-status db migrate [--config <path>]heyo-status db seed --uptime <0-100> --days <n> [--config <path>]heyo-status incident create --title <title> --severity <severity> --monitors <a,b> --message <message>heyo-status incident update <id> --status <status> --message <message> [--severity <severity>]heyo-status incident resolve <id> --message <message>heyo-status incident list [--status <status>] [--severity <severity>]heyo-status maintenance create --title <title> --monitors <a,b> --start <ISO> --end <ISO> [--description <text>]heyo-status maintenance list

Every command accepts --config, defaulting to HEYO_STATUS_CONFIG or ./heyo-status.config.ts. The configuration must export the heyoStatus() result as statusPage or as the default export.

The CLI runs on Bun

It loads a TypeScript configuration module directly. Bun 1.4.3+ is required even when the project is installed with npm, pnpm or Yarn.

dev

Starts the local cron scheduler and, optionally, a framework dev server.

bash
heyo-status dev -- next devheyo-status dev -- bunx --bun react-router devheyo-status dev --port 4000
  • Everything after -- is spawned as a child process with inherited stdio; the scheduler stops when it exits.
  • Without a command, the CLI serves the API itself on --port (or PORT, default 3000) plus a small index page at /. This path requires Bun.
  • One check runs immediately, so a fresh database is never empty.
  • Then checks.interval, checks.summaryCron and checks.cleanupCron drive the schedule.
  • SIGINT and SIGTERM stop both the server and the scheduler.

The scheduler evaluates once per second but runs each job at most once per minute, and the minute of the initial check is marked consumed so * * * * * does not fire twice at startup.

check run

Runs every monitor once, stores the results, reconciles automatic incidents and dispatches notifications.

bash
heyo-status check run
text
UP   Website (http) 128ms — HTTP 200DOWN API (http) 10002ms — HTTP timed out after 10000msStored 2 check result(s); 1 failed.
Exit codeMeaning
0Every check passed, or no monitors.
1At least one check failed.

The non-zero exit makes it usable as a post-deploy smoke test.

db migrate

bash
heyo-status db migrate

Calls migrate() when the adapter exposes it — PostgreSQL and D1 — and otherwise reports that embedded migrations are applied automatically, which is the SQLite case. Run it per environment before the first deploy and after upgrading the package.

db seed

Fabricates deterministic history so a new page has something to draw.

bash
heyo-status db seed --uptime 99.95 --days 90
FlagRequiredNotes
--uptimeyes0–100.
--daysyesPositive integer.

It writes 100 evenly distributed checks per monitor per day, with failures spread to match the requested uptime exactly, then compacts everything before today into daily summaries:

text
Seeded 54000 check result(s) for 6 monitor(s) across 90 day(s) at 99.95% uptime.Compacted 53400 result(s) into 534 daily summary row(s).
Seeded data is indistinguishable from real data

Seed a development or demo database only. There is no "unseed"; clearing it means deleting the rows yourself or starting from a fresh database.

incident

bash
heyo-status incident create \  --title "Elevated API latency" \  --severity major \  --monitors "API,Dashboard" \  --message "We are investigating elevated response times."heyo-status incident update inc_2f8c1d --status monitoring --message "A fix is deployed."heyo-status incident update inc_2f8c1d --severity critical --message "Escalating."heyo-status incident resolve inc_2f8c1d --message "Latency is back to normal."heyo-status incident list --status investigating --severity major
CommandRequired flagsOptional
create--title, --severity, --monitors, --message--status (not resolved)
updatepositional <id>--status, --severity, --message
resolvepositional <id>, --message—
list—--status, --severity

--monitors is a comma-separated list, trimmed and de-duplicated. Records are printed as formatted JSON, so the output pipes into jq.

update --status resolved is equivalent to resolve. Omitting --message on update uses "Incident details updated.".

maintenance

bash
heyo-status maintenance create \  --title "Database upgrade" \  --description "Read-only for about 30 minutes." \  --monitors "API,Dashboard" \  --start 2026-02-01T02:00:00Z \  --end 2026-02-01T03:00:00Zheyo-status maintenance list

--start and --end are ISO-8601; --end must be after --start. list prints upcoming and in-progress windows, with their status refreshed against the current time.

Option parsing

  • --name value and --name=value are both accepted.
  • An unknown option is an error — flags are never silently ignored.
  • Repeating an option is an error.
  • An option whose value is missing or starts with -- is an error.
  • Unexpected positional arguments are rejected, except where documented.

Failures print heyo-status failed: <message> and exit 1.

CLI versus HTTP

TaskCLIHTTP
Run checkscheck runPOST /admin/checks/run
Compact historydev scheduler— (cron only)
Delete old historydev scheduler— (cron only)
Create an incidentincident createPOST /admin/incidents
Migratedb migrate—
Seeddb seed—

The CLI talks to the database directly, so it needs database access but no admin token. The HTTP API needs a token but no database access. Use the CLI locally and in CI; use the API from a deployed environment.

Related

  • Scheduling
  • Admin endpoints
  • Troubleshooting
Admin endpoints< PreviousPackage exportsNext >

Powered by heyo

On this page

devcheck rundb migratedb seedincidentmaintenanceOption parsingCLI versus HTTP