create-neutralinojs-vite-app
v2.1.2
Published
Create a Neutralinojs + Vite app with one command — React templates with JS or TypeScript, pre-configured and ready to run.
Maintainers
Readme
create-neutralinojs-vite-app
Scaffold a Neutralinojs + Vite + React app with one command.
Neutralinojs is a lightweight alternative to Electron — no bundled browser engine, uses the OS native WebView. This tool gives you a production-ready starting point with React + Vite, pre-configured HMR, and the Neutralinojs native API wired up and ready to use.
Usage
npx create-neutralinojs-vite-app@latest my-appOr pass no arguments for interactive mode:
npx create-neutralinojs-vite-app@latestCLI Options
You can bypass interactive prompts (ideal for CI/CD or headless environments) by passing flags:
-y, --yes: Skip all interactive prompts entirely and use default values (react-tstemplate) while automatically overwriting any existing directories.-t, --template <name>: Specify the template to use directly (react-jsorreact-ts).-f, --force: Overwrite the target directory if it already exists without asking for confirmation.
Example (TypeScript):
npx create-neutralinojs-vite-app@latest my-app --yesExample (JavaScript):
npx create-neutralinojs-vite-app@latest my-app --template react-js --forceWhat you get
- ⚡ Vite 8 — instant HMR, fast builds
- ⚛️ React 19 — with JS or TypeScript 6
- 🖥️ Neutralinojs — pre-configured
neutralino.config.jsonthat stays in sync with Vite - 🔌 Auto Port Resolution (v2.0+) — dynamically finds a free port to avoid conflicts between Vite and Neutralino
- 🎨 Prettier — baked into every template
- 📦 concurrently —
npm run devsafely starts Vite and Neutralinojs together on the resolved port
After scaffolding
cd my-app
npm install
npm run neu:update # downloads Neutralinojs binaries
npm run dev # starts Vite + NeutralinojsTemplates
| Template | Command | Headless Flag |
|----------|---------|---------------|
| React + Vite + JavaScript | npx create-neutralinojs-vite-app → No TypeScript | --template react-js |
| React + Vite + TypeScript | npx create-neutralinojs-vite-app → Yes TypeScript | --template react-ts |
Why this exists
Setting up Neutralinojs with Vite manually requires configuring neutralino.config.json to point at the Vite dev server, resolving port conflicts, and wiring up @neutralinojs/lib. This tool does all of that for you.
Requirements
- Node.js 18+
- Neutralinojs CLI (
npm i -g @neutralinojs/neu)
License
MIT — Ankit Mohanty
