Heximon Logo
CLI

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.

heximon create scaffolds a complete, working app — a module, a controller, a provider, the heximon.config.ts capability manifest, and the Vite + TypeScript setup — so your first pnpm dev is minutes away. A brand-new machine needs nothing pre-installed: every package manager's create convention maps onto the same command.

pnpm create heximon my-app

Run it bare and it prompts for everything; run it with flags (--yes accepts every default) and it's CI-scriptable:

pnpm create heximon my-shop -- --template database --validator zod --yes

What you choose

PromptOptionsDefaultFlag
Project namea directory-safe namemy-heximon-appthe positional argument
Templateminimal / databaseminimal--template
Validatorzod / valibot / nonezod--validator
Install dependenciesyes / noyes (interactive)--install / --no-install
Git inityes / noyes--git / --no-git
  • minimal — the smallest real app: one module, one controller with routes declared by handler parameter types, one constructor-injected provider.
  • database — a tasks CRUD API over Drizzle ORM on libsql/SQLite (:memory: by default, so there is no database server to install), including an in-process end-to-end test via createTestApp.
  • The validator choice adds a schema file and a validated POST route — one schema declaration is both the body's static type and its runtime validator. none keeps hand-checked bodies.

--pm npm|pnpm|yarn|bun overrides the detected package manager (the one that invoked create wins by default); --cwd picks the parent directory.

Where templates come from

Templates live in heximon/starters — one directory per template — and are fetched with giget at create time, so template fixes reach you without waiting for a framework release. The CLI tries the branch matching its own minor version first (v0.1 for a 0.1.x CLI) and falls back to main.

After fetching, it stamps your project name and pins every @heximon/* dependency to the CLI's own version (the CLI releases in lockstep with the framework, so the two always agree).

Scaffolding into an existing git repository skips git init automatically — nesting a repository is never what you want.

After it runs

cd my-app
pnpm install   # if you skipped the install step
pnpm dev       # http://localhost:3000

Then read the generated heximon.config.ts: it is the app's capability manifest — the entire HTTP layer is the one HttpPlugin entry, and every capability you add later (events, CQRS, queues, …) is one more plugin in the same list.

See also

Copyright © 2026