A powerful, cross-platform AI assistant with voice control, WhatsApp automation, and intelligent task execution.
Features β’ Quick Start β’ Documentation β’ Contributing
- π€ Voice Control - Natural language commands with speech recognition
- π¬ WhatsApp Automation - Send messages via voice or text commands
- π₯οΈ System Control - Open apps, control volume, manage files
- π€ AI-Powered - Gemini 2.0 Flash + Groq Llama 3.3 70B
- π§ State Machine - Disciplined execution with IDLE β THINKING β EXECUTING flow
- πΎ Short-Term Memory - Context retention for multi-step commands
- π¨ Beautiful GUI - Modern PyQt6 interface with command history
- π Cross-Platform - Works on macOS, Windows, and Linux
- Python 3.10 or higher
- Microphone (for voice mode)
- API Keys: Google Gemini and Groq
macOS / Linux
git clone https://github.com/pratik1258m/nexus.git
cd nexus
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.template .env
# Edit .env with your API keysWindows
git clone https://github.com/pratik1258m/nexus.git
cd nexus
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
copy .env.template .env
# Edit .env with your API keysEdit .env file:
GEMINI_API_KEY=your_gemini_key_here
GROQ_API_KEY=your_groq_key_hereEdit contacts.json for WhatsApp:
{
"mom": "+1234567890",
"dad": "+0987654321"
}Voice Mode (with GUI):
python main.pyText Mode (terminal only):
python main.py --text- "Open calculator"
- "Send WhatsApp to mom saying hello"
- "What's the weather today?"
- "Take a screenshot"
- "Search Google for Python tutorials"
YOU: open chrome
YOU: send message to dad hello from nexus on whatsapp
YOU: set volume to 50
nexus/
βββ core/ # Core modules
β βββ engine.py # AI engine with Gemini & Groq
β βββ state_machine.py # Strict state control
β βββ task_memory.py # Short-term context retention
β βββ command_interpreter.py # Local-first command routing
β βββ voice.py # Voice system (TTS/STT)
β βββ platform_utils.py # Cross-platform utilities
β βββ logger.py # Logging system
βββ skills/ # AI skills (modular capabilities)
β βββ whatsapp_skill.py # WhatsApp automation
β βββ system_ops.py # System control
β βββ automation_ops.py # Keyboard/mouse control
β βββ ... # 16+ more skills
βββ gui/ # GUI components
β βββ app.py # PyQt6 interface
βββ main.py # Entry point
βββ requirements.txt # Dependencies
| Platform | Voice | GUI | App Control | Status | |
|---|---|---|---|---|---|
| macOS | β Native | β | β | β | Fully Tested |
| Windows | β pyttsx3 | β | β | β | Ready |
| Linux | β pyttsx3 | β | β | β | Ready |
Linux: Install system dependencies first
sudo apt-get install python3-pyaudio espeak portaudio19-devWindows: Volume control requires pycaw (included in requirements)
Nexus AI includes 18+ built-in skills:
- System - App control, volume, file operations
- WhatsApp - Automated messaging via Chrome/Safari
- Web - Search, browse, scrape
- Vision - Object detection, image analysis
- Email - Send/read emails
- Weather - Current conditions and forecasts
- Automation - Keyboard/mouse control
- Memory - Context and conversation history
- Screenshot - Capture screen
- Datetime - Time and date queries
- Notes - Create and manage notes
- Reminders - Set reminders
- Tasks - Task management
- Detection - Object detection with AI
- Camera - Camera control
- Execution - Code execution
Create a new file in skills/:
from core.skill import Skill
class MySkill(Skill):
@property
def name(self):
return 'my_skill'
def get_tools(self):
return [...] # Define your tools
def get_functions(self):
return {...} # Map tool names to functionsSkills are auto-loaded on startup.
See .env.template for all available options:
- API keys (Gemini, Groq)
- Voice settings
- Logging levels
- Feature toggles
- State machine configuration
Voice not working?
- Check microphone permissions
- Verify
pyttsx3installation on Windows/Linux
WhatsApp automation fails?
- Ensure Chrome is installed
- First run requires QR code scan
- Check
contacts.jsonformat
Import errors?
- Activate virtual environment:
source .venv/bin/activate - Reinstall dependencies:
pip install -r requirements.txt
Nexus uses a disciplined state machine architecture:
IDLE β THINKING β EXECUTING β COMPLETED β IDLE
β
ERROR β IDLE
β
ABORTING β IDLE
Key Features:
- β Sequential execution (no concurrent tasks)
- β 60-second short-term memory for context
- β Local-first command routing (80-85% faster)
- β Minimal responses ("Done.", "Opened.", "Sent.")
- β Safe abort mechanism
MIT License - see LICENSE file for details
Contributions welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Pratik Mishra (@pratik1258m)
Give a βοΈ if this project helped you!
Made with β€οΈ using Python, Gemini AI, and Groq