CLI reference

The package on npm is azoxjs; the command it installs is azox. Argument parsing is hand-written — there is no Commander or Yargs behind it.

Commands

CommandWhat it does
azox create <name>Scaffold a new project
azox devServe the project, rebuilding on every change
azox compileBuild every page
azox doctorCheck the toolchain and the project
azox -vPrint the version
azox helpList commands

azox create

terminal
azox create my-app

Creates a directory with a page, a second page to show routing, a component, a package.json and a .gitignore. It refuses to overwrite an existing directory.

azox dev

terminal
azox dev
azox dev --port=5000
azox dev --host=0.0.0.0

Builds, serves at http://localhost:4321, watches pages/, and reloads the browser on save. If the port is taken it steps forward to the next free one rather than failing.

When a page fails to compile, the browser is served the error instead of stale output, so a broken edit never looks like it silently did not apply. It recovers on its own once the page is fixed.

Live reload uses Server-Sent Events rather than WebSockets. Reload is a one-way signal, so there is no handshake implementation to carry — which is how the dev server stays dependency-free.

azox compile

terminal
azox compile
azox compile --page=about
azox compile --page=/blog/first-post

Builds into .azox/build/. With no flag it builds every page; --page takes a file name or a URL.

The compiler parses the JavaScript it generated before writing it. A malformed expression fails the build, naming the page, rather than producing a file that breaks in the browser console.

azox doctor

terminal
$ azox doctor

Azox Framework v1.2.0 - The Sound of Future Web

  ✓ Node 22.11.0
  ✓ Azox v1.2.0
  ✓ pages/ (2 pages)
  ✓ /  (pages/index.azox)
  ✓ /about  (pages/about.azox)

Everything looks good.

Checks the Node version, lists the route map, and fully resolves every page — including its components — so a broken reference surfaces before a build rather than during one. Exits non-zero when something is wrong.

Flags

FlagApplies toMeaning
--page=<name>compileBuild one page, by file name or URL
--port=<n>devPort to serve on (default 4321)
--host=<addr>devHost to bind (default localhost)
-v, --versionanyPrint the version
-h, --helpanyShow help

Using it as a library

The compiler is importable, and works without a filesystem — which is how the playground compiles in your browser.

programmatic use
import { parseAzox, compileToModule } from 'azoxjs/compiler';
import { signal, effect, computed } from 'azoxjs/reactivity';

Next