init-ai-app
v0.2.1
Published
Create AI-powered fullstack applications with Gemini integration
Downloads
14
Maintainers
Readme
init-ai-app
Create AI-powered fullstack applications with Gemini integration.
Quick Start
npx init-ai-app@latest my-app
cd my-app
npm run install:all
# Update backend/.env with your GEMINI_API_KEY
npm run devUsage
Interactive Mode
Run the CLI without options to be guided through the setup:
npx init-ai-app@latest [project-name]You'll be prompted to select:
- Project name - Name of your project (default:
my-app) - Backend - Node.js + Express (TypeScript)
- Frontend - Angular or React
- App type - Simple chat bot or Chat bot with file upload
Non-Interactive Mode
Skip prompts by providing options directly:
npx init-ai-app@latest my-app --frontend angular --backend node-express --app-type simple-chatHybrid Mode
Specify some options and get prompted for the rest:
npx init-ai-app@latest my-app --frontend react
# You'll be prompted for backend and app-typeOptions
--frontend <framework> Frontend framework (angular | react)
--backend <framework> Backend framework (node-express)
--app-type <type> Application type (simple-chat | chat-with-file-upload)
--use-npm Use npm as package manager
--use-pnpm Use pnpm as package manager
--use-yarn Use yarn as package manager
--use-bun Use bun as package manager
-V, --version Output version number
-h, --help Display helpExamples
# Full interactive (default)
npx init-ai-app@latest
# Angular + simple chat
npx init-ai-app@latest my-app --frontend angular --backend node-express --app-type simple-chat
# React + file upload with pnpm
npx init-ai-app@latest my-app --frontend react --backend node-express --app-type chat-with-file-upload --use-pnpm
# Just specify frontend, prompt for the rest
npx init-ai-app@latest my-app --frontend angularGenerated Project Structure
my-app/
├── backend/ # Node.js + Express API
│ ├── src/
│ │ ├── config/ # Gemini AI configuration
│ │ ├── controllers/ # Request handlers
│ │ ├── services/ # Business logic
│ │ ├── routes/ # API routes
│ │ └── types/ # TypeScript types
│ ├── .env # Environment variables
│ └── package.json
├── frontend/ # Angular or React app
│ └── src/
├── .gitignore
├── README.md
└── package.jsonAPI Endpoints
| Method | Endpoint | Description |
|--------|----------|-------------|
| GET | /api/health | Health check |
| POST | /api/chat | Send message, get AI response |
| POST | /api/chat/stream | Streaming response (SSE) |
| POST | /api/files/upload | Upload file (file-upload variant) |
Environment Variables
Create a backend/.env file:
GEMINI_API_KEY=your-api-key-here
GEMINI_MODEL=gemini-3-flash-preview
PORT=3000Get your API key from Google AI Studio.
Development
Prerequisites
- Node.js 18+
- npm, pnpm, yarn, or bun
Running the Generated App
# Install dependencies
npm run install:all
# Start development servers
npm run dev- Backend: http://localhost:3000
- Frontend: http://localhost:4200 (Angular) or http://localhost:5173 (React)
Contributing
Local Development
# Clone the repository
git clone https://github.com/luixaviles/init-ai-app-boilerplate.git
cd init-ai-app
# Install dependencies
npm install
# Build the CLI
npm run build:ncc
# Test locally (interactive)
node dist/index.js test-app
# Test locally (non-interactive)
node dist/index.js test-app --frontend angular --backend node-express --app-type simple-chat
# Or link globally
npm link
init-ai-app test-appScripts
| Script | Description |
|--------|-------------|
| npm run build:ncc | Build CLI with ncc bundler |
| npm run clean | Remove dist folder |
Tech Stack
CLI
- Commander - CLI framework
- Prompts - Interactive prompts
- fast-glob - File pattern matching
- fs-extra - File system utilities
- @vercel/ncc - Zero-dependency bundling
Generated Backend
- Node.js + Express
- TypeScript
- @google/genai - Gemini AI SDK
Generated Frontend
- Angular 21 (standalone components) or React 19 + Vite
- TypeScript
License
MIT
