Create RouteCraft App

Create a new RouteCraft project using the official initializer.

Usage

npm create routecraft@latest [project-name] [options]

You will then be asked the following prompts:

What is your project named?  my-app
Example (optional):  none / hello-world / GitHub URL
Package manager:  npm / pnpm / yarn / bun
Use src directory:  No / Yes
Initialize git:  Yes / No
Install dependencies now:  Yes / No

Options

OptionDescription
-h or --helpShow usage help
-y or --yesSkip interactive prompts and use defaults
-f or --forceOverwrite existing directory
--skip-installSkip installing dependencies
-e or --example <name or url>Example to include (none, hello-world) or GitHub URL
--use-npm, --use-pnpm, --use-yarn, --use-bunChoose package manager
--no-src-dirPlace project files at root instead of src/
--no-gitSkip git initialization

Next steps

Build and start your RouteCraft project:

cd my-app
npm run build
npm run start

A dev command with hot-reload capabilities is coming soon in a future release.

Examples

# Create a new project with interactive prompts
npm create routecraft@latest my-app

# Create with hello-world example using pnpm
npm create routecraft@latest my-app --example hello-world --use-pnpm

# Create with defaults (no prompts)
npm create routecraft@latest my-app --yes --example hello-world

# Force overwrite existing directory
npx create-routecraft my-app --force

# Create from a GitHub repository
npm create routecraft@latest my-app --example https://github.com/user/repo

# Create from a specific path in a GitHub repository
npm create routecraft@latest my-app --example https://github.com/user/repo/tree/main/examples/api