Moonlight is a sophisticated WhatsApp automation companion. It includes AI integration, fun commands, utility tools, group management features, and media manipulation capabilities. The project provides a dedicated and a one‑command installation script that automatically installs all necessary packages ( nodejs , git , ffmpeg , imagemagick ) and launches the bot.
If the repository uses a modern package manager or encounters architecture conflicts in Termux, you may want to use: npm install --legacy-peer-deps Use code with caution. Step 2: Configure the Environment
Tmux keeps your bot session running even if you accidentally close the Termux app interface. Create a session: tmux new -s bot Start your bot inside that session: npm start
In this article, we've shown you how to create a WhatsApp bot using Termux, GitHub, and Twilio. We've covered the prerequisites, setting up Termux, creating a WhatsApp bot, hosting the bot on GitHub, and deploying the bot on Termux. bot whatsapp termux github
Before starting the installation, ensure your environment meets these basic requirements:
Install the essential tools, languages, and graphics libraries by running: pkg install git nodejs ffmpeg libwebp chromium -y Use code with caution. Downloads the bot code from GitHub. nodejs: Executes the JavaScript runtime environment.
Using unauthorized bots can result in your WhatsApp number being banned. Use a dummy number if possible. Moonlight is a sophisticated WhatsApp automation companion
Disable for Termux in your phone settings. 2. Using PM2 for Auto-Restart If the bot crashes, PM2 can restart it automatically: npm install -g pm2 pm2 start index.js pm2 save Use code with caution. 3. Safety Warning
Tap the three dots (Menu) or Settings -> -> Link a Device .
If you can share the you want (e.g., sticker creator, auto-reply, group tools), I can recommend the best, most up-to-date GitHub repository for you! Share public link If the repository uses a modern package manager
A terminal emulator for Android that provides a Linux environment. It allows you to run Node.js, Python, and other languages directly on your phone 2.2.1 .
What do you want your bot to have (e.g., AI chat, downloaders, group management)? What Android version is your phone running? Share public link
Look for configuration files. Most bots use a .env file, a config.js file, or a setting.json file to manage settings like the bot name, owner number, and command prefixes. Edit the configuration file using the nano text editor: nano config.js Use code with caution.