create-mochi
v0.2.2
Published
Scaffold a new Mochi project. Run with `npm create mochi@latest`.
Maintainers
Readme
create-mochi
Scaffold a new Mochi project.
Usage
# bun (recommended)
bun create mochi@latest my-app
# npm — requires bun to be installed locally, since the resulting project runs on bun
npm create mochi@latest my-appOr run the binary directly:
bunx create-mochi my-app
npx create-mochi my-appTemplates
| Template | Description |
| --------- | --------------------------------------------------------------- |
| minimal | A bare-bones Mochi app with a single page. |
| demos | A larger reference app with multiple demos (HN clone, todo, …). |
Flags
Usage: create-mochi [path] [options]
Arguments:
path where the project should be created
Options:
--template <name> starter template (minimal | demos)
--name <name> package.json `name` field (defaults to the directory name)
--force overwrite existing directory contents
-v, --version show CLI version
-h, --help show this helpRun with no arguments for an interactive prompt:
bunx create-mochiProgrammatic API
import { create } from 'create-mochi';
await create({
dir: './my-app',
template: 'minimal',
name: 'my-app',
});Requirements
Mochi runs on Bun. Install it first:
curl -fsSL https://bun.sh/install | bashLicense
MIT
