Your personal AI assistant powered by Google Gemma-4 running locally on your computer. Fully offline, no cloud dependencies, complete privacy.
- Voice Commands - Speak naturally, Jarvis understands your intent
- Text Interface - CLI mode for typing commands
- System Control - PowerShell integration, process management, audio/brightness
- Web Integration - Search (Google, Bing, YouTube), open URLs
- App Management - Open/close 20+ desktop applications instantly
- File Operations - Create, delete, rename, copy, move files
- Task Management - Reminders, todos, scheduling
- Keyboard/Mouse Control - Automate typing, clicking, shortcuts
- โ Fully offline - Gemma-4 runs locally on your PC
- โ No cloud calls - All data stays on your device
- โ Fast response - <2 second latency with GPU
- โ Lightweight - Minimal resource usage (CPU inference supported)
- Natural Language Understanding (NLU) via Gemma-4
- Intent recognition with confidence scoring
- Context-aware command interpretation
- Conversation history tracking
- User preference learning (future)
- Windows 11 (10 Pro tested)
- Python 3.11+
- Ollama (local model runner)
- Microphone (optional - text mode works without)
# Download from https://ollama.ai
ollama pull gemma:7b # Fast (7B parameters)
# OR
ollama pull gemma:13b # Accurate (13B parameters)# Clone and navigate to project
git clone https://github.com/LgrappaG/Gemma4Jarvis.git
cd jarvis
# Create and activate virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# or: source venv/bin/activate # Linux/Mac
# Install dependencies
pip install -r requirements.txtText Mode (Recommended for testing):
python main.py --text
# Try commands:
> "search artificial intelligence on google"
> "open VS Code"
> "show system information"
> "exit" to quitVoice Mode:
python main.py --voice
# Say "jarvis" to activate, then speak commandTest Components:
python main.py --test-mic # Test microphone
python main.py --test-tts # Test speaker
python main.py --test-gemma # Test AI model latency
python main.py --benchmark # Full system testGemma4Jarvis/ (700+ KB)
โโโ main.py # Entry point
โโโ requirements.txt # Dependencies (30+)
โโโ INSTALLATION.md # Setup guide
โโโ DEPLOYMENT.md # Distribution guide
โ
โโโ src/ (4,500+ lines)
โ โโโ ai/ # AI/LLM layer
โ โ โโโ gemma_manager.py (Ollama integration)
โ โ โโโ intent_parser.py (NLU)
โ โ โโโ prompt_templates.py (System prompts)
โ โ
โ โโโ commands/ (2,800+ lines) # Command handlers
โ โ โโโ system_commands.py (PowerShell, processes)
โ โ โโโ web_commands.py (Browser, search)
โ โ โโโ desktop_commands.py (App control)
โ โ โโโ task_commands.py (Reminders)
โ โ โโโ file_commands.py (File ops)
โ โ โโโ command_executor.py (Orchestrator)
โ โ
โ โโโ io/ (400 lines) # Voice I/O
โ โ โโโ voice_input.py (STT)
โ โ โโโ voice_output.py (TTS)
โ โ
โ โโโ core/ (600 lines) # Main orchestrator
โ โ โโโ jarvis.py (AI assistant core)
โ โ
โ โโโ utils/ (750 lines) # Utilities
โ โ โโโ config.py (Pydantic settings)
โ โ โโโ logger.py (Colored logging)
โ โ โโโ exceptions.py (Custom errors)
โ โ
โ โโโ advanced.py # Future features
โ
โโโ tests/ # Test suite
โ โโโ test_integration.py (20+ unit tests)
โ
โโโ .gitignore, LICENSE, etc.
๐ค You: search artificial intelligence on google
๐ค Jarvis: I'll search the web for information about artificial intelligence
โ
Opening search: artificial intelligence on google
๐ค Listening for 'jarvis'...
๐ค Wakeword detected: Hey jarvis
๐ค Listening for command...
๐ Captured: open VS Code
โ
Opened VS Code
| Category | Examples |
|---|---|
| System | system info, list processes, show CPU usage |
| Web | search google, open youtube on bing, open twitter.com |
| Apps | open VS Code, close notepad, start chrome |
| Files | create file, open pictures folder, delete document |
| Tasks | set reminder, show calendar, schedule meeting |
Edit ~/.gamma4/config.json or .env:
# Model
OLLAMA_BASE_URL=http://localhost:11434
MODEL_NAME=gemma:7b
MODEL_TIMEOUT=30
# Voice
VOICE_ACTIVATION_KEYWORD=jarvis
VOICE_RECOGNITION_TIMEOUT=30
TTS_RATE=150
TTS_VOICE=1 # 0=male, 1=female
# Features
COMMAND_CONFIRMATION_REQUIRED=true
DANGEROUS_COMMANDS_ENABLED=false| Component | Latency | Notes |
|---|---|---|
| Voice Capture | 1s | Microphone recording |
| AI Inference (Gemma-7B) | 1.3-2.2s | CPU (~1.3-2.2s), GPU (~0.7-1s) |
| Command Execution | 0.6s | System calls |
| Voice Output | 0.4-0.7s | Text-to-speech |
| Total | ~3.3-5.5s | Target: <6s โ |
GPU Acceleration:
- With NVIDIA RTX 4060 Ti: 1s-1.5s total โก
# Run unit tests
pytest tests/ -v
# Run with coverage
pytest tests/ --cov=src
# Run specific test
pytest tests/test_integration.py::test_gemma_manager_initialization -v- Outlook/Calendar integration
- Advanced scheduling with persistence
- Long-term memory & learning
- Context-aware conversations
- Custom wake words
- Multi-language support
- Plugin system
Convert to standalone .exe:
pip install pyinstaller
pyinstaller --onefile --windowed main.py
# Output: dist/Gemma4Jarvis.exeSee DEPLOYMENT.md for full guide.
"Ollama not found"
- Ensure Ollama is running:
ollama serve - Check URL:
http://localhost:11434
"Microphone not detected"
- Test in Windows Sound Settings
- Run:
python main.py --test-mic
"Slow response"
- Use smaller model:
gemma:7b - Install NVIDIA drivers for GPU
- Close other apps
See installation.md for more help.
MIT License - Feel free to use, modify, and distribute!
Contributions welcome! Areas needing help:
- Outlook integration
- More app templates
- Additional languages
- Performance optimization
- Installation Guide - Detailed setup
- Deployment Guide - Build & distribute
- Troubleshooting - Common issues
- API Reference - Developer guide
- v0.1.0 โ MVP: Core AI, commands, voice I/O
- v0.2.0 ๐ Advanced features, Outlook, scheduling
- v0.3.0 ๐ฎ Multi-language, personality
- v1.0.0 ๐ Full release, auto-updates
- Google Gemma-4 - LLM
- Ollama - Local model runner
- Python 3.11 - Language
- FastAPI - Framework
- Pydantic - Validation
- speech_recognition - STT
- pyttsx3 - TTS
Q: Does it require internet? A: No! Gemma-4 runs locally via Ollama. Only voice may use online APIs as alternatives.
Q: How much storage? A: ~7-13GB for model + ~2GB for app + OS files.
Q: Can I use custom commands?
A: Yes! Edit command handlers in src/commands/ and add new intents in prompts.
Q: Is it secure? A: Yes - everything runs locally, no data leaves your PC.
Made with โค๏ธ for AI enthusiasts everywhere
Questions? File an issue or check the docs!
Status: MVP Ready for Testing โ
Next: INSTALLATION.md