The heximon CLI
Building and running a Heximon app in development is pnpm dev — no CLI needed. The heximon package is a
separate, unscoped install for the parts that bracket everyday development: starting a new project,
shipping a build to a real platform, provisioning the resources that build needs an id for, and driving
migrations without a hand-written drizzle.config.ts. It ships exactly four commands.
pnpm create heximon my-app # day zero — nothing installed yet
pnpm add -D heximon # in an existing project
pnpx heximon deploy
npm create heximon@latest my-app # day zero — nothing installed yet
npm install -D heximon # in an existing project
npx heximon deploy
yarn create heximon my-app # day zero — nothing installed yet
yarn add -D heximon # in an existing project
yarn dlx heximon deploy
bun create heximon my-app # day zero — nothing installed yet
bun add -d heximon # in an existing project
bunx heximon deploy
The command surface
| Command | What it does |
|---|---|
heximon create | Scaffold a new app from a starter template (minimal / database, with an optional zod/valibot validator). Also reachable as pnpm create heximon. |
heximon deploy | Build (vp build), then ship the artifact to the configured platform via its native CLI. |
heximon provision | Pre-build: create the foundational resources whose id the compiler needs (e.g. a Cloudflare Hyperdrive binding), and report each id to record. |
heximon migrations | generate / migrate / status / push — drive your app's local drizzle-kit against its auto-detected config, with .env already loaded. |
That's the whole surface. There is no heximon dev, heximon build, or heximon serve — the dev server
and the build step are the vp tasks (vp dev / vp build) your vite.config.ts already runs via the
heximon() Vite plugin. The heximon CLI brackets those: create before your first pnpm dev, and
deploy at "ship this to a platform."
Every command shares a few flags
--cwd (project root, default .) and --env (deploy environment — production / staging /
preview:<id>, deploy/provision only) work the same way everywhere.
Beyond that, deploy and provision read your heximon.config.ts config file to resolve which
platform you're targeting — a --platform cloudflare flag overrides it when your config doesn't declare
one — and migrations reads your drizzle config(s) directly, no platform involved.
Interactive or scripted, either way
Every command renders through clack prompts when your terminal is a TTY — a
missing credential is an interactive question, a multi-database migrations run is a select menu.
In CI (no TTY), the same commands run non-interactively: a missing required credential halts with the env
var name to set instead of prompting, and a multi-database migrations run defaults to acting on all of
them. Nothing about the underlying steps changes between the two modes — only how a decision gets made.
No embedded infrastructure engine
heximon deploy and heximon provision don't reimplement Terraform. They resolve your credentials, run
vp build, then hand off to the platform's own CLI — wrangler deploy, vercel deploy --prebuilt,
netlify deploy, deployctl deploy — capturing its output and reporting it back through clack. That's the
whole ship step: native-CLI handoff, not a second deploy tool to learn.
See also
- Deploy a Heximon app —
heximon deploy's full flag reference:--provision,--create,--migrate,--profile,--verify,--destroy. - Migrations from the CLI —
generate/migrate/status/pushwithout a hand-written drizzle config. - Database migrations — the
MigrationRunner/MigrationConfigmechanism the CLI drives at the drizzle-kit layer, and the injectable runner that applies migrations at boot.
Cross-service events
Fan an integration event out to independently deployed services — the per-service-queue split, Redis Streams and SNS-to-SQS native broadcast, the Cloudflare DO-router escape hatch, and QStash push broadcast for freezing platforms — selected via crossService.transport.
Create a New App
heximon create (and pnpm create heximon) — scaffold a working Heximon app from a starter template in one command, with the template, validator, git, and install steps prompted or flagged.