@laiyon/create-wasapi
Version:
CLI to create WhatsApp bot projects with Wasapi and BuilderBot
169 lines (127 loc) ⢠4.78 kB
Markdown
# š Create Laiyon - WhatsApp Bot Generator
Create professional WhatsApp bots with ease using the power of BuilderBot and Wasapi.



## ⨠Features
- š¤ **Instant Bot Creation** - Generate WhatsApp bots in seconds
- š§ **Automatic Setup** - Cross-platform ngrok integration
- šØ **Beautiful CLI** - Professional terminal interface
- š **Secure Configuration** - Protected API keys and tokens
- š± **QR Code Testing** - Instant bot testing with generated QR codes
- š **Cross-Platform** - Works on Windows, macOS, and Linux
- š **Built with BuilderBot** - Modern conversation flow architecture
## š Quick Start
```bash
# With project name (recommended)
npm create @laiyon/wasapi@latest my-bot
# Interactive mode
npm create @laiyon/wasapi@latest
# Alternative with npx
npx @laiyon/create-wasapi@latest my-bot
```
That's it! The CLI will guide you through the entire setup process.
## š CLI Flow
The create-laiyon CLI follows a smart, step-by-step process:
### 1. **Project Setup**
```
š Welcome Banner
āāā Project name input
āāā Database selection (Memory available, others coming soon)
āāā Template installation
```
### 2. **Wasapi Configuration**
```
š§ Environment Setup
āāā Secure API key input (hidden with *)
āāā Phone number selection
āāā Environment variables creation
```
### 3. **System Detection**
```
š Smart Platform Detection
āāā Operating System (Windows/macOS/Linux)
āāā Ngrok installation check
āāā Ngrok token verification
āāā Auto-setup capability assessment
```
### 4. **Automatic Setup** (if available)
```
š Intelligent Automation
āāā npm package installation
āāā Development server startup
āāā Ngrok tunnel creation
āāā Webhook URL generation
āāā WhatsApp QR code for testing
```
### 5. **Manual Instructions** (fallback)
```
š Clear Step-by-Step Guide
āāā Installation commands
āāā Configuration instructions
āāā Ngrok setup guidance
āāā Testing procedures
```
## š ļø System Requirements
- **Node.js** >= 16.0.0
- **npm** >= 8.0.0
- **Ngrok account** (free) for tunneling
- **Wasapi API key** for WhatsApp integration
## š§ Manual Setup (Alternative)
If automatic setup isn't available:
1. **Install your project:**
```bash
cd your-project-name
npm install
```
2. **Configure ngrok:**
```bash
# Install ngrok: https://ngrok.com/download
ngrok config add-authtoken <your-token>
```
3. **Start development:**
```bash
npm run dev
# In another terminal:
ngrok http <port>
```
## šļø Project Structure
```
your-bot/
āāā src/
ā āāā app.ts # Main bot logic with conversation flows
āāā .env # Environment variables (API keys, phone ID, port)
āāā package.json # Dependencies and scripts
āāā README.md # Project documentation
```
## š¤ Bot Features (Included Templates)
- **Welcome Flow** - Interactive menu system
- **Services Information** - Automated service descriptions
- **Support System** - Help and contact information
- **FAQ Handling** - Frequently asked questions
- **Dynamic Responses** - Personalized user interactions
- **Media Support** - Image and file sharing capabilities
- **Fallback Handling** - Smart unrecognized message responses
## š Security
- API keys are masked during input (password type)
- Ngrok tokens are securely handled
- Environment variables are properly configured
- No sensitive data is logged or displayed
## š Cross-Platform Support
| Platform | Ngrok Detection | Auto Setup | Manual Setup |
|----------|----------------|------------|--------------|
| Windows | ā
Yes | ā
Yes | ā
Yes |
| macOS | ā
Yes | ā
Yes | ā
Yes |
| Linux | ā
Yes | ā
Yes | ā
Yes |
## š Documentation
- [š Laiyon Website](https://laiyon.pro) - Official website and documentation
- [BuilderBot Documentation](https://builderbot.vercel.app/)
- [Ngrok Documentation](https://ngrok.com/docs)
## š¤ Contributing
We welcome contributions! Please feel free to submit a Pull Request.
## š License
MIT License - feel free to use this project for your own bots!
## š Support
If this project helped you create amazing WhatsApp bots, consider giving it a ā on GitHub!
---
Made with ā¤ļø by the Laiyon team @juanalvarez.pro