Just A Rather Very Intelligent System
A futuristic, sci-fi desktop AI assistant powered by a holographic React + Three.js interface and a high-performance FastAPI brain.
Quick Start โข Features โข Architecture โข Voice Cloning โข Supported Commands โข Configuration
๐ Enjoying Project J.A.R.V.I.S.? If this project inspired you, please drop a star โญ to support further development!
Project J.A.R.V.I.S. is a hands-free, voice-first intelligent desktop companion inspired by Tony Starkโs iconic AI. Built specifically for macOS, it integrates live speech recognition, multi-tiered LLM routing, realistic zero-shot voice synthesis, and real OS-level system automation into a responsive WebGL HUD.
- ๐ Voice-First Interaction: Push-to-talk, click toggle, or hands-free continuous conversation with automatic echo mitigation.
- ๐ฎ Holographic Three.js Visualizer: Real-time microphone audio reactivity, animated FFT telemetry bars, and interactive particle field.
- ๐ง Multi-LLM Fallback Chain: High-speed routing across Groq, Mistral, OpenRouter, and 100% local Ollama inference.
- ๐ฃ Zero-Shot Voice Cloning: Bundled Kyutai Pocket-TTS engine duplicates any target voice using a brief 5-second reference sample.
- โ๏ธ Native macOS Control: Launch applications, capture screens, query battery & memory telemetry, and safely manage files.
- ๐ก๏ธ Safety Guardrails: Trash-first file safety, path containment, question filtering, and remote-execution security locks.
flowchart TD
subgraph Client ["Frontend (React 19 + Three.js)"]
A[๐ User Voice / Speech Input] --> B[Web Speech API STT]
B --> C[Cyberpunk HUD / Terminal]
D[WebGL Holographic Core] <-->|Audio FFT Stream| C
end
subgraph Server ["Backend (FastAPI Engine)"]
C -->|POST /chat| E[Action Intent Matcher]
E -->|System Command Match| F[macOS System Dispatcher]
F -->|Safe Execution / AppleScript Trash| G[macOS Tools: screencapture, pmset, open]
E -->|Conversational Query| H[LLM Brain Router]
H -->|1st Priority| I[Groq: LLaMA 3.3]
H -->|Fallback 1| J[Mistral AI]
H -->|Fallback 2| K[OpenRouter: Claude / LLaMA]
H -->|Fallback 3 / Offline| L[Ollama Local: Gemma 4]
H -->|Context + Tool Result| M[Synthesize Audio]
M -->|Pocket-TTS / gTTS| N[Audio Output Stream]
end
N -->|WAV / MP3 Dubbing| C
Get J.A.R.V.I.S. running in less than 2 minutes with the automated launcher:
# 1. Clone the repository
git clone https://github.com/satiricalguru/Jarvis.git
cd Jarvis
# 2. Launch with the one-command runner
chmod +x start.sh
./start.shstart.sh handles everything automatically:
- Creates a Python
.venvand installs all backend dependencies if missing. - Sets up
backend/.envfrom.env.example. - Installs frontend
node_modulesif needed. - Starts FastAPI on
http://localhost:8000and Vite onhttp://localhost:5173. - Handles clean shutdown of both processes on exit (
Ctrl+C).
Once running, open http://localhost:5173 in your browser.
If you prefer to configure and run the backend and frontend separately:
cd backend
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install requirements
pip install -r requirements.txt
# Configure environment keys
cp .env.example .env
# Run FastAPI backend
uvicorn app.main:app --reload --port 8000cd frontend
# Install dependencies
npm install
# Start Vite development server
npm run devVisit http://localhost:5173 to access the HUD interface.
J.A.R.V.I.S. features native zero-shot voice cloning using Kyutaiโs ultra-fast Pocket-TTS engine:
- Reference Audio: A high-fidelity reference voice sample is bundled at
backend/assets/jarvis.wav. You can replace it with any 5-10 second clear.wavrecording atbackend/voices/jarvis.wav. - Hugging Face Token (Optional): Add your token to
backend/.envto download premium gated voice weights:HUGGINGFACE_TOKEN=hf_your_token_here
- Automatic Fallback: If Pocket-TTS is initializing or unconfigured, the system automatically falls back to lightweight Google TTS (
gTTS) with zero interruption.
J.A.R.V.I.S. includes built-in semantic intent recognition for native macOS control:
| Category | Voice / Text Command | Executed macOS Action |
|---|---|---|
| ๐ธ Screenshots | "Take a screenshot", "Capture screen" | Saves timestamped PNG to Desktop via screencapture |
| ๐ App Launcher | "Open Spotify", "Launch Safari", "Start Terminal" | Launches target application via macOS open -a |
| ๐ Browsing | "Open github.com", "Search google.com for AI" | Opens URL in your default browser |
| ๐ Battery Info | "Battery status", "What's my power level?" | Queries pmset -g batt with percentage and charging state |
| ๐พ System Telemetry | "System info", "Check RAM and storage usage" | Fetches macOS memory, CPU load, and disk utilization |
| ๐ File Creator | "Create file notes.txt with hello world" | Safely writes file inside designated user directories |
| ๐๏ธ Trash Safety | "Delete file notes.txt" | Non-destructive: Moves file to macOS Trash via AppleScript |
| ๐ท Camera | "Open camera", "Open photo booth" | Launches Photo Booth for instant video preview |
๐ก๏ธ Safety Protection: Deletions never use destructive
rm -rf. All file removal requests are validated against directory boundary limits (blocking root/, system folders, and codebase directories) and sent to the macOS Trash (~/.Trash) so they can be restored at any time.
Configure your AI providers in backend/.env or in the frontend Settings (โ๏ธ) โ API Keys modal:
# --- LLM Providers ---
GROQ_API_KEY=your_groq_key_here
GROQ_MODEL=llama-3.3-70b-versatile
MISTRAL_API_KEY=your_mistral_key_here
MISTRAL_MODEL=mistral-small-latest
OPENROUTER_API_KEY=your_openrouter_key_here
OPENROUTER_MODEL=meta-llama/llama-3.3-70b-instruct:free
# --- Local Offline LLM (Ollama) ---
OLLAMA_MODEL=gemma4:e4b
OLLAMA_SECOND_MODEL=gemma4:e2b
# --- Voice Engine ---
HUGGINGFACE_TOKEN=your_huggingface_token
HF_TTS_MODEL=kyutai/pocket-tts
# --- Security & Remote Access ---
TELEGRAM_BOT_TOKEN=your_bot_token_here
TELEGRAM_SECRET_TOKEN=your_webhook_secret_token
ALLOW_REMOTE_SYSTEM_ACTIONS=false| Action | Control |
|---|---|
| Push-to-Talk | Hold Space while on the main HUD |
| Continuous Listening | Click the microphone icon in the header or toggle in Settings |
| Terminal Drawer | Click Logs in the header or drag the bottom terminal bar |
| Provider Telemetry | Click on the provider status badges in the upper right |
| Settings Panel | Click the gear icon โ๏ธ in the top navigation |
Jarvis/
โโโ assets/ # High-resolution logos, banners, and media
โ โโโ jarvis-banner.png # Cinematic HUD header banner
โ โโโ jarvis-logo.png # Circular Stark Industries AI emblem
โโโ backend/
โ โโโ app/
โ โ โโโ main.py # FastAPI application, audio cache, CORS
โ โ โโโ brain.py # Multi-provider LLM orchestrator & health
โ โ โโโ tools.py # Sandboxed macOS system action dispatcher
โ โ โโโ tts.py # Audio synthesis thread dispatcher
โ โ โโโ voice_engine.py # Pocket-TTS zero-shot voice cloning engine
โ โ โโโ telegram_bot.py # Authenticated Telegram webhook handler
โ โ โโโ models.py # Pydantic schemas for chat & telemetry
โ โโโ assets/ # Default reference voices (jarvis.wav)
โ โโโ .env.example # Environment template
โ โโโ requirements.txt # Python dependency manifest
โโโ frontend/
โ โโโ src/
โ โ โโโ components/ # MicBlobScene, SettingsModal, TerminalLog
โ โ โโโ hooks/ # useSpeechToText, useDubbedAudio
โ โ โโโ App.tsx # Main HUD shell and event orchestration
โ โ โโโ config.ts # API configuration
โ โโโ package.json # React 19 + Three.js frontend manifest
โโโ start.sh # Intelligent one-command development launcher
- Safe API Storage: API keys entered in the frontend remain in your browser's encrypted local state and are transmitted only as bearer headers to your local FastAPI backend.
- No Insecure Remote Execution: The Telegram bot endpoint enforces
X-Telegram-Bot-Api-Secret-Tokenvalidation and disables remote system execution by default unlessALLOW_REMOTE_SYSTEM_ACTIONS=trueis deliberately enabled. - Sanitized Deletions: Deletion commands strictly reject root directories, system files, and project paths. Files are routed to macOS Trash rather than unrecoverable permanent deletion.
Contributions, bug reports, and feature suggestions are welcome!
- Fork the repository
- Create your 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
This project is licensed under the MIT License โ see the LICENSE file for details.
