@verb-js/create-verb
v1.0.0
Published
Create Verb fullstack applications with one command
Downloads
48
Maintainers
Readme
create-verb
Create Verb fullstack applications with one command
Part of the Verb Ecosystem
| Package | Description | |---------|-------------| | Verb | Fast web framework for Bun | | Hull | Ecto-inspired database toolkit | | Allow | Authentication library | | Hoist | Deployment platform |
Quick Start
# npm
npm create verb my-app
# bun
bunx create-verb my-app
# yarn
yarn create verb my-app
# pnpm
pnpm create verb my-appThen:
cd my-app
bun run devVisit http://localhost:3001 🚀
What You Get
- Verb Framework - High-performance multi-protocol server
- Bun Native Routes - HTML imports with automatic bundling
- React + TypeScript - Modern frontend with full type safety
- REST API - Complete CRUD examples (users, products)
- Hot Module Reloading - Instant feedback during development
- Zero Configuration - Everything works out of the box
Usage
create-verb <project-name>Options
-h, --help Show help message
-v, --version Show version numberExamples
# Create a new project
create-verb my-fullstack-app
# Navigate and start development
cd my-fullstack-app
bun run devRequirements
- Bun v1.0.0+ - Install Bun
- Git - For downloading the boilerplate
What Happens When You Run It
- Downloads the latest boilerplate from verbjs/boilerplate
- Installs dependencies with
bun install - Customizes package.json with your project name
- Cleans up git history for a fresh start
Project Structure
The generated project includes:
my-app/
├── src/
│ ├── main.ts # Server with withRoutes pattern
│ ├── frontend/ # React components
│ │ ├── index.html # Main page
│ │ ├── index.tsx # User management app
│ │ ├── api.html # API explorer
│ │ └── api.tsx # Interactive docs
│ └── types.d.ts # TypeScript declarations
├── package.json
├── tsconfig.json
├── biome.json
└── README.md # Getting started tutorialAvailable Scripts
In your generated project:
| Command | Description |
|---------|-------------|
| bun run dev | Start development server with HMR |
| bun run build | Build for production |
| bun run start | Start production server |
| bun test | Run tests |
| bun run lint | Lint with Biome |
| bun run format | Format with Biome |
Features Included
Frontend
- React 18+ with TypeScript
- Automatic bundling (no webpack/vite needed)
- CSS bundling and hot reloading
- Interactive user management interface
- API explorer and documentation
Backend
- Verb framework with Bun's native routing
- REST API with CRUD operations
- Parameter extraction and validation
- Error handling patterns
- Health check endpoints
Development
- Hot Module Reloading (HMR)
- TypeScript support out of the box
- Zero configuration required
- Enhanced console logging
- Route display on startup
Example: Using the Generated App
After running create-verb my-app:
cd my-app
bun run devVisit:
- http://localhost:3001 - Main React app
- http://localhost:3001/api-demo - Interactive API explorer
Test the API:
# List users
curl http://localhost:3001/api/users
# Create a user
curl -X POST http://localhost:3001/api/users \
-H "Content-Type: application/json" \
-d '{"name":"John Doe","email":"[email protected]"}'Troubleshooting
"Command not found: create-verb"
Make sure you're using the correct command for your package manager:
# ✅ Correct
npm create verb my-app
bunx create-verb my-app
# ❌ Incorrect
npm install -g create-verb"Directory already exists"
Choose a different project name or remove the existing directory:
rm -rf my-app
create-verb my-app"Git is required but not found"
Install Git from git-scm.com
Development
To work on create-verb itself:
git clone https://github.com/verbjs/create-verb
cd create-verb
bun install
# Test locally
bun run dev my-test-app
# Run tests
bun test
# Build for publishing
bun run buildLicense
MIT - see LICENSE file for details.
Happy coding! 🎉
For more help, visit the Verb documentation or open an issue.
