Privacy-focused email automation assistant with configurable LLM integration. It is still a work in progress.
Spectral is a desktop application that automates email workflows while giving you complete control over your data privacy. With configurable privacy levels and LLM provider options, you can choose between local-only processing or cloud-powered assistance.
Spectral provides multiple privacy levels and LLM provider options to balance convenience with data protection.
Choose a preset privacy level that matches your requirements:
- All features disabled - No automation, no LLM, manual operation only
- Best for: Highly sensitive environments, maximum control
- Trade-off: No AI assistance available
- Local LLM only - Uses Ollama or LM Studio running on your machine
- All automation features enabled (browser, email, scanning)
- Zero data sent to external services
- Best for: Privacy-conscious users with local LLM setup
- Trade-off: Slower responses, requires local compute resources
- Cloud + Local LLM - Best of both worlds
- PII filtering enabled - Sensitive data tokenized before cloud processing
- All features enabled
- Best for: Most users wanting convenience with privacy protection
- Trade-off: Some data sent to cloud (with PII filtered)
- Full control - Configure individual feature flags
- Granular permissions for each capability:
- Local LLM usage
- Cloud LLM usage
- Browser automation
- Email sending
- IMAP monitoring
- PII scanning
- Best for: Advanced users with specific requirements
Spectral supports multiple LLM providers. Configure your preferences in Settings > LLM Providers.
Ollama
# Install Ollama from https://ollama.com
# Pull a model
ollama pull llama3.2
# Ollama runs at http://localhost:11434 by defaultLM Studio
# Download from https://lmstudio.ai
# Load a model and start the server
# LM Studio runs at http://localhost:1234 by defaultOpenAI
- Get API key from https://platform.openai.com/api-keys
- Navigate to Settings > LLM Providers
- Select "OpenAI" and enter your API key
- Uses GPT-4 for optimal results
Anthropic Claude
- Get API key from https://console.anthropic.com/
- Navigate to Settings > LLM Providers
- Select "Claude" and enter your API key
- Uses Claude 3.5 Sonnet for optimal results
Google Gemini
- Get API key from https://makersuite.google.com/app/apikey
- Navigate to Settings > LLM Providers
- Select "Gemini" and enter your API key
- Uses Gemini Pro for optimal results
Configure different providers for different tasks:
- Primary Provider - Default for all tasks
- Task-Specific Overrides - Use different providers per task type:
- Email Drafting
- Form Filling
Example configuration:
- Primary: Ollama (local, fast, private)
- Email Drafting: Claude (cloud, high quality)
- Form Filling: Ollama (local, sufficient quality)
When using cloud providers with Balanced or Custom mode (cloud enabled + PII scanning enabled):
- Detection - Identifies emails, phone numbers, SSNs, credit cards, etc.
- Tokenization - Replaces PII with reversible tokens (e.g.,
EMAIL_TOKEN_001) - Cloud Processing - Sends tokenized content to cloud LLM
- Detokenization - Restores original PII in the response
This ensures cloud LLMs never see your sensitive data while still providing high-quality assistance.
Example:
Input:
Draft email to john.doe@company.com about project deadline
Sent to cloud (tokenized):
Draft email to EMAIL_TOKEN_001 about project deadline
Cloud response:
Subject: Project Deadline Discussion
Dear EMAIL_TOKEN_001,
I hope this email finds you well...
Final output (detokenized):
Subject: Project Deadline Discussion
Dear john.doe@company.com,
I hope this email finds you well...
- Rust 1.75+ (for building)
- Node.js 20+ (for frontend)
- SQLCipher (for encrypted database)
# Clone the repository
git clone https://github.com/yourusername/spectral.git
cd spectral
# Install dependencies
npm install
# Build and run in development mode
npm run tauri dev
# Build for production
npm run tauri build- Application creates encrypted vault on first launch
- Navigate to Settings > Privacy & Security
- Choose your privacy level (Balanced recommended)
- Configure LLM provider(s) in Settings > LLM Providers
- (Optional) Add API keys for cloud providers
- Start using email drafting and automation features
IMPORTANT: Always use the dev script to start the development server. It automatically finds an available port and synchronizes it between the frontend (Vite) and backend (Tauri):
npm run tauri:devDo NOT use:
cargo tauri dev(won't sync ports)npm run dev(only starts frontend)
The dev script works on all platforms (Windows, macOS, Linux):
- Windows: Runs
scripts/dev.ps1(PowerShell) - Linux/macOS: Runs
scripts/dev.sh(Bash) - Auto-detected:
scripts/dev.cjslauncher picks the right one
How it works:
- Finds an available port starting from 5737
- Updates Tauri config to use that port
- Exports PORT env var for Vite
- Starts the Tauri app with synchronized ports
- Restores original config on exit
If you see "Port X is in use", the script will automatically try the next port.
spectral/
├── crates/
│ ├── spectral-privacy/ # Privacy engine and LLM router
│ ├── spectral-llm/ # LLM provider implementations
│ ├── spectral-browser/ # Browser automation
│ └── spectral-db/ # Encrypted database layer
├── src/ # Svelte frontend
├── src-tauri/ # Tauri backend
└── docs/
└── testing/ # Manual testing checklists
# Run all tests
cargo test --all
# Run privacy engine tests
cargo test -p spectral-privacy
# Run integration tests
cargo test -p spectral-privacy --test integration_testSee docs/testing/privacy-llm-manual-tests.md for comprehensive manual testing checklist.
TBD