Skip to content

Latest commit

 

History

31 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-mainz

Create a new Mainz project.

Requirements

  • Node.js >= 20.19.0
  • For Deno projects, deno must also be installed

Quick start

Create a new project with the default runtime:

npm create mainz my-app

Create a starter project:

npm create mainz my-app -- --template starter

Create a Deno project:

npm create mainz my-app -- --runtime deno

Create a Deno starter project:

npm create mainz my-app -- --runtime deno --template starter

Use the alpha release:

npm create mainz@alpha my-app

Options

  • --runtime <node|deno|bun>
  • --template <empty|starter>
  • --mainz <specifier>

Examples:

npm create mainz my-app -- --template starter
npm create mainz my-app -- --runtime deno --template starter
npm create mainz my-app -- --mainz jsr:@mainz/mainz@0.1.0-alpha.84

Runtime selection

If you do not pass --runtime, create-mainz checks installed runtimes in this order:

  1. node
  2. deno
  3. bun

When multiple runtimes are available, node is chosen by default.

bun is detected, but Mainz project bootstrap is not published for Bun yet.

After scaffolding

The generated project includes the Mainz tasks/scripts you need, but dev, build, preview, and diagnose still require an explicit target.

Starter templates already include an app target:

Node starter projects:

cd my-app
npm install
npm run dev -- --target app

Deno starter projects:

cd my-app
deno task dev --target app

Empty templates start with no targets. Create one first, then pass it to the command:

Node empty projects:

cd my-app
npm install
npm run mainz -- app create my-app
npm run dev -- --target my-app

Deno empty projects:

cd my-app
deno task mainz app create my-app
deno task dev --target my-app

About

npm create entry point for Mainz projects

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages