Installation
Get started with Neutron by running the create command.
Quick Start
Run the following command in your terminal:
npm create neutron@latest
Follow the interactive prompts to set up your project:
- Project name: Choose a name for your directory (e.g.,
my-app). - Template: Select a starting point (Minimal, Blog, App, or Full).
- Tailwind CSS: Add styling support.
- Database: Include Drizzle ORM (optional).
- Git: Initialize a git repository.
Once the setup is complete, navigate to your project and start the development server:
cd my-app
npm run dev
Open your browser to http://localhost:3000 to see your new Neutron app.
Manual Setup
Neutron is designed to be easy to set up manually if you prefer.
-
Initialize a new project:
mkdir my-neutron-app cd my-neutron-app npm init -y -
Install dependencies:
npm install @neutron-build/core @neutron-build/cli preact npm install -D typescript vite -
Create a
neutron.config.ts:import { defineConfig } from "@neutron-build/core"; export default defineConfig({});Adapters are bundled in
@neutron-build/core; select one at build time with the CLI's--presetflag (e.g.--preset docker,--preset vercel,--preset cloudflare,--preset static). -
Add scripts to
package.json:{ "scripts": { "dev": "neutron-ts dev", "build": "neutron-ts build", "preview": "neutron-ts preview" } }