UNPKG

@laiyon/create-wasapi

Version:

CLI to create WhatsApp bot projects with Wasapi and BuilderBot

169 lines (127 loc) • 4.78 kB
# šŸš€ Create Laiyon - WhatsApp Bot Generator Create professional WhatsApp bots with ease using the power of BuilderBot and Wasapi. ![Laiyon Banner](https://img.shields.io/badge/Laiyon-WhatsApp%20Bot%20Generator-brightgreen?style=for-the-badge) ![Platform Support](https://img.shields.io/badge/Platform-Windows%20%7C%20macOS%20%7C%20Linux-blue?style=for-the-badge) ![Node Version](https://img.shields.io/badge/Node-%3E%3D16.0.0-green?style=for-the-badge) ## ✨ 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