wasaa-cli
v2.1.0
Published
WasaaCity AI CLI - Generate full NestJS microservice projects from terminal
Maintainers
Readme
Wasaa CLI
Generate production-ready NestJS microservice projects from the command line.
Installation
npm install -g wasaa-cliQuick Start
# Generate a new microservice
wasaa service my-api -o ~/projects -p 4000 -m "users,products,orders"
# View all commands
wasaa --helpCommands
wasaa service <name>
Generate a complete NestJS microservice with MVC architecture.
wasaa service <name> [options]
Options:
-o, --output <path> Output directory (default: current directory)
-p, --port <number> Service port (default: 4000)
-d, --description <text> Service description
-m, --modules <list> Comma-separated list of modules to generateExample:
wasaa service payment-api -o ~/work -p 5000 -m "payments,transactions,webhooks"This generates:
~/work/wasaa-payment-api/
├── src/
│ ├── common/ # Guards, filters, interceptors
│ ├── config/ # Configuration
│ ├── integrations/ # Service clients
│ ├── modules/
│ │ ├── auth/ # JWT authentication
│ │ ├── health/ # Health checks
│ │ ├── payments/ # Custom module
│ │ ├── transactions/
│ │ └── webhooks/
│ ├── app.module.ts
│ └── main.ts
├── prisma/
│ └── schema.prisma
├── docker-compose.yml
├── Dockerfile
├── package.json
└── tsconfig.jsonAI Commands
# Chat with AI
wasaa chat "What is the best way to structure a React app?"
# Analyze code
wasaa analyze ./src/index.ts
# Generate code
wasaa generate "A REST API endpoint for user registration" -l typescript
# Code review
wasaa review ./src
# Generate SRS document
wasaa srs "E-commerce platform with user authentication"Configuration
wasaa config --api-url http://18.168.220.163:4023
wasaa config --token YOUR_TOKENAfter Generating a Project
cd wasaa-<service-name>
npm install
npx prisma generate
npm run start:devOr with Docker:
docker-compose up -d --buildAPI documentation will be available at http://localhost:<port>/api/docs
Features
- NestJS 10.x with TypeScript
- Prisma ORM with PostgreSQL
- JWT Authentication
- Swagger/OpenAPI documentation
- Docker & Docker Compose
- Health check endpoints
- Modular MVC architecture
Environment Variables
WASAA_API_URL: Override the API URLWASAA_API_TOKEN: Set authentication token
Requirements
- Node.js 18+
- npm or yarn
License
MIT - WasaaCity
