CLI
The nml binary manages your entire project lifecycle — init, dev, build, deploy, and test.
Installation
bunx @nml-lang/cli init
nml init
Interactive project scaffold. Prompts for a name, stack type, and optional extras. Never overwrites existing files.
bunx @nml-lang/cli init
| Stack | Description |
|---|---|
| Edge | Hono + Cloudflare Workers (wrangler deploy) |
| Static | Vite build → static HTML output |
| Hybrid | Static + HTMX or Alpine.js for interactivity |
nml dev
Starts the Vite dev server with Hot Module Replacement. NML files update in the browser instantly without a full reload.
nml dev
nml build
Detects used libraries (HTMX, Alpine.js, Tailwind), downloads CDN assets, then runs a Vite production build.
nml build
nml deploy
Runs build then wrangler deploy. Deploys your Worker and static assets to Cloudflare's global edge network.
nml deploy
nml test
Runs NML lint (parse errors with file:line) followed by bun test. Fails fast on the first parse error.
nml test