CLI Commands
Complete reference for all Mifty CLI commands and npm scripts.
Project Initialization
Create New Project
mifty init my-api
Initialize a new Mifty project with the specified name
cd my-api
Navigate to the newly created project directory
npm run dev
Start the development server
Development Commands
Start Development Server
npm run dev
Start API server with hot reload
npm run dev:full
Start API + DB Designer + Monitor + Prisma Studio
npm run dev:server
Start API server only
npm run dev:monitor
Start error monitor only
npm run dev:db-designer
Start DB Designer only (port 3001)
Database Designer
npm run db-designer
Start DB Designer UI at http://localhost:3001/ui
Build & Production
Build Commands
npm run build
Build TypeScript to JavaScript for production
npm run build:watch
Watch mode - rebuild automatically on file changes
Production Server
npm start
Start production server (requires build first)
Database Commands (Prisma)
Schema Management
npm run prisma:generate
Generate Prisma Client from schema
npm run prisma:migrate
Create and apply database migration
npm run prisma:push
Push schema changes without creating migration
npm run prisma:reset
⚠️ Reset database (DELETES ALL DATA)
Database Tools
npm run prisma:studio
Open Prisma Studio at http://localhost:5555
Module Generation
Generate Modules
npm run generate
Generate all modules from db.design.ts
npm run generate:module <name>
Generate a specific module by name
Testing Commands
Run Tests
npm test
Run all tests with coverage report
npm run test:watch
Run tests in watch mode (re-run on changes)
npm run test:coverage
Run tests with detailed coverage report
Error Monitoring
Monitor Commands
npm run monitor
Start error monitor for debugging
npm run monitor:autofix
Monitor with automatic error fixing enabled
npm run watch:imports
Watch and report import issues
Code Quality
Linting
npm run lint
Run ESLint to check code quality
npm run lint:fix
Run ESLint with automatic fixes
Formatting
npm run format
Format code with Prettier
Adapter Management
List Adapters
npm run adapter list
List all available adapters
npm run adapter installed
Show currently installed adapters
Install/Uninstall Adapters
npm run adapter install <name>
Install a specific adapter
npm run adapter uninstall <name>
Uninstall a specific adapter
Service Adapters
Email Services
npm run adapter install email-service
Install email service adapter (Gmail/SMTP)
Storage Services
npm run adapter install storage-service
Install storage adapter (S3/Local/Cloudinary)
Payment Processing
npm run adapter install stripe
Install Stripe payment processing adapter
Communication Services
npm run adapter install twilio
Install Twilio SMS service adapter
Caching
npm run adapter install redis
Install Redis caching adapter
AI Services
npm run adapter install openai
Install OpenAI API adapter
Authentication Adapters
List Auth Adapters
npm run auth:list
List all available authentication adapters
OAuth Providers
npm run auth:install auth-github
Install GitHub OAuth authentication
npm run auth:install auth-google
Install Google OAuth authentication
npm run auth:install auth-linkedin
Install LinkedIn OAuth authentication
npm run auth:install auth-facebook
Install Facebook OAuth authentication
OTP Authentication
npm run auth:install auth-email-otp
Install Email OTP authentication
npm run auth:install auth-mobile-otp
Install Mobile OTP authentication
Configuration
View Configuration
npm run services:config
View current services configuration
Service URLs
When running in development mode, these services are available:
- API Server: http://localhost:3000
- DB Designer: http://localhost:3001/ui
- Prisma Studio: http://localhost:5555
Quick Development Workflow
Here's the typical development workflow using these commands:
-
Initialize Project
mifty init my-project
cd my-project -
Start Development
npm run dev -
Design Database (in separate terminal)
npm run db-designer -
Generate Modules
npm run generate -
Run Tests
npm test -
Build and Deploy
npm run build
npm start
Command Categories
By Frequency of Use
Daily Development
npm run devnpm run db-designernpm run generatenpm test
Project Setup
mifty initnpm run adapter installnpm run auth:install
Database Management
npm run prisma:migratenpm run prisma:studionpm run prisma:generate
Production
npm run buildnpm startnpm run lint
By Component
Core Framework
- Project initialization
- Development server
- Build system
Database
- Prisma commands
- Migration management
- Schema generation
Adapters
- Service integrations
- Authentication providers
- Third-party APIs
Quality Assurance
- Testing
- Linting
- Error monitoring