Node/npm package for the Mainz CLI.
This repository owns the npm-distributed mainz binary, mainz init for Node and Deno projects,
mainz app create, and mainz dev.
Install the current alpha globally:
npm install -g @mainzjs/cli-node@alphaThis registers both mainz and mainz-cli-node. The explicit name is a fast-path delegation
target; other CLIs can also fall back to npx -y @mainzjs/cli-node@alpha ....
Initialize a new Node project:
mainz init my-mainz-app
cd my-mainz-app
npm installCreate an app and start the dev server:
mainz app create site
mainz dev --target siteOr start from a runnable starter project:
mainz init my-mainz-app --template starter
cd my-mainz-app
npm install
mainz dev --target appInitialize a Deno project from the same Node-hosted CLI:
mainz init my-mainz-deno-app --runtime denomainz app create <name> uses the default routed scaffold. Use --type root for the default
root-mounted scaffold, or --template <name|source> for an explicit app template or template
source. --type and --template are mutually exclusive.
--template also accepts template sources outside the packaged catalog, including local paths,
absolute paths, file:// URLs, and HTTP template sources.
Some app templates can declare runtime compatibility and dependencies. For example,
mainz app create analytics --template dashboard creates a routed dashboard app and adds Recharts
to the project manifest for the current runtime.
Install dependencies:
npm installRun the CLI locally:
node ./bin/mainz.js --helpCreate a new Node project:
node ./bin/mainz.js init --mainz npm:@jsr/mainz__mainz@0.1.0-alpha.36
node ./bin/mainz.js app create site
npm install
node ./bin/mainz.js dev --target siteCreate a new Deno project from the same Node-hosted CLI:
node ./bin/mainz.js init my-deno-app --runtime deno --mainz jsr:@mainz/mainz@0.1.0-alpha.36Run the template prototype tests:
npm testUninstall the global CLI:
npm uninstall -g @mainzjs/cli-node