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
| Command | What it does |
|---|---|
azox create <name> | Scaffold a new project |
azox dev | Serve the project, rebuilding on every change |
azox compile | Build every page |
azox doctor | Check the toolchain and the project |
azox -v | Print the version |
azox help | List commands |
azox create
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
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
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
$ 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
| Flag | Applies to | Meaning |
|---|---|---|
--page=<name> | compile | Build one page, by file name or URL |
--port=<n> | dev | Port to serve on (default 4321) |
--host=<addr> | dev | Host to bind (default localhost) |
-v, --version | any | Print the version |
-h, --help | any | Show help |
Using it as a library
The compiler is importable, and works without a filesystem — which is how the playground compiles in your browser.
import { parseAzox, compileToModule } from 'azoxjs/compiler';
import { signal, effect, computed } from 'azoxjs/reactivity';