Quantum Badger is a local‑first, privacy‑obsessed assistant for macOS that works quietly in the background and keeps your data where it belongs—on your Mac. It handles the busywork, remembers what matters, and helps you stay organized without ever trading away your privacy or control.
- Local First: Runs optimized models (Phi-4, Mistral 7B, Llama 3) directly on your device using Apple Silicon (Metal/MLX).
- Cloud Fallback: Seamlessly switches to top-tier cloud models (Anthropic Claude, OpenAI GPT-4, Google Gemini) for complex reasoning tasks.
- Smart Routing: The Shadow Router analyzes prompt complexity and system load (VRAM/Thermals) to automatically choose the best execution path.
- PII Redaction: Automatically detects and redacts sensitive data (SSNs, API Keys, Emails) before it leaves the app.
- Input Sanitization: Blocks malicious prompt injection attempts (SQLi, Shell Injection) before execution.
- Audit Logging: An immutable local ledger tracks every decision and inference request for full transparency.
- Lockdown Mode: A global kill-switch instantly cuts network access and unloads models in emergencies.
- Live Monitoring: Real-time visualization of VRAM usage and Thermal pressure.
- Resource Guard: Prevents system slowdowns by throttling or suspending local inference if the device overheats or runs low on memory.
- Traffic Light Status: Quick-glance indicators for Local (Green) vs. Cloud (Blue) execution.
- Shortcuts & Siri: Full support for App Intents (
Ask Quantum Badger...). - Contextual History: Searchable interaction history with smart categorization (Code, Creative, Analysis).
- File Generation: Automatically converts long responses or code blocks into downloadable files.
- Language: Swift 6 (Strict Concurrency)
- UI Framework: SwiftUI (NavigationSplitView, Charts)
- Architecture: Modular (BadgerCore, BadgerRuntime, App)
- Local Inference: Metal / MLX (Apple Silicon Optimized)
- Search: CoreSpotlight
- Security: Local Authentication & Keychain (Secure Enclave)
- Xcode 16+ (Required for Swift 6)
- macOS 15+ (Sequoia) or iOS 18+
- Apple Silicon Mac (M1/M2/M3) recommended for local inference.
- Clone the repository
git clone https://github.com/yourusername/quantum-badger.git
cd quantum-badger- Build the project
./build.shOr with options:
./build.sh --config release # Build release configuration
./build.sh --test # Build and run tests
./build.sh --clean # Clean and rebuild- Open the Project (for development) The project uses Swift Package Manager. You can open it in Xcode or use the command line:
open Package.swift # Or use VS Code with Swift extension- Resolve Packages Dependencies are automatically fetched during build. Manual resolution:
cd BadgerApp && swift package resolveTo use cloud fallback capabilities:
- Go to Settings > Cloud Accounts.
- Enter your API Keys for Anthropic, OpenAI, or Google.
- Keys are stored encrypted in the Secure Enclave and never leave your device except for inference requests.
- Go to Settings > System Health.
- Check the VRAM card to see your available memory.
- The app will recommend a model (e.g., "Phi-4" for 16GB Macs, "TinyLlama" for 8GB Macs).
- Download the model weights to the app's document directory.
BadgerApp: The main UI layer, Views, and ViewModels.BadgerRuntime: The "Brain." Handles the Shadow Router, Inference Engines, and System Monitoring (VRAM/Thermal).BadgerCore: Shared data models, entities, and protocols.
We welcome contributions! Please see CONTRIBUTING.md for details on how to submit pull requests, report issues, and request features.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Built with ❤️ using Swift 6 and MLX-LM.
