1. Documentation
  2. CLI
ReadmeGitHub
  • Introduction
  • Quickstart
  • CLI
  • Configuration
  • Identity
  • Branding
  • Themes
  • Monitors
  • Checks and scheduling
  • Metrics and badges
  • Incidents
  • Maintenance
  • Notifications
  • Subscribers
  • React Router
  • Next.js
  • Astro
  • SQLite
  • Cloudflare D1
  • PostgreSQL
  • Schema and migrations
  • Cloudflare
  • Vercel
  • Self-hosting
  • API overview
  • Status endpoints
  • Incident endpoints
  • Maintenance endpoints
  • Subscriber endpoints
  • Badges, feeds and metrics
  • Admin endpoints
  • The check run
  • Uptime and history
  • Automatic incidents
  • Notification delivery
  • Public subscriptions

CLI

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

Use heyo-status to run checks, apply migrations or manage incidents from your terminal. It comes with @heyo-sh/heyo-status — the project generator is a different command. The CLI reads your config and database directly, so it needs database access but no running web server or admin token.

Run commands directly from your shell

To type heyo-status ... directly, install Bun 1.4.3+ and the CLI globally. Ensure bun and your package manager's global bin directory are on PATH. Run commands from the directory containing heyo-status.config.ts:

bun add -g @heyo-sh/heyo-status
bash
cd my-status-pageheyo-status check run

create-heyo-status creates a project; it does not install the CLI globally. It adds @heyo-sh/heyo-status as a project dependency for the framework adapters, config and UI. If you opted out of installing dependencies in the creator, run the package manager's install command in the project. When integrating manually, install the project dependency too (for example, bun add @heyo-sh/heyo-status). Global and project installations serve different purposes; keep their versions compatible.

Global install is for direct shell commands

A project's package.json scripts can run the local binary without a global install: "check": "heyo-status check run" runs with bun run check. The documented direct heyo-status ... commands assume the global installation above (or that you added node_modules/.bin to your shell's PATH).

Cloudflare/D1 projects use Wrangler migrations and Worker cron triggers rather than local CLI checks, because a shell process has no Worker D1 binding. See deploying to Cloudflare.

Commands

The commands below assume the global installation and must be run from the project root unless you pass --config.

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.ts. The configuration must export the heyoStatus() result as statusPage or as the default export.

Bun runs the CLI even with npm, pnpm or Yarn

The binary has a Bun shebang and loads the TypeScript configuration directly. Installing the package with another manager does not remove the Bun requirement.

dev

dev runs the local scheduler, with an optional 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 (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

This command checks every monitor, stores the results, reconciles automatic incidents and sends 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 needs direct database access but no admin token. An HTTP caller needs the admin token instead; the deployed API handler still needs access to its database. Use the CLI locally or in CI, and the API from another service.

Related

  • Scheduling
  • Admin endpoints
  • Configuration
Quickstart< PreviousConfigurationNext >

Powered by heyo

On this page

Run commands directly from your shellCommandsdevcheck rundb migratedb seedincidentmaintenanceOption parsingCLI versus HTTP