A local AI-powered writing assistant that corrects language mistakes using AI models.
Select any text, press a keyboard shortcut, and receive grammar corrections instantly.
The assistant uses cloud AI when an internet connection is available and automatically falls back to a local Ollama model when offline.
- Hybrid AI system (Google Gemini + local Ollama fallback)
- Fully offline capability
- Global keyboard shortcut for correction
- Works across desktop applications
- Preserves original meaning and vocabulary
- Provides explanations for corrections
- Structured JSON responses
- Multi-language ready architecture
- Python
- uv for dependency management
- Ollama for local inference
- Google Gemini API for online inference
- Pydantic for structured outputs
- Tkinter for desktop popup UI
- Global hotkeys + clipboard integration
Install dependencies:
uv sync
Install Ollama: https://ollama.com/
Download a local model:
ollama pull qwen3:4b
Create a .env file:
GOOGLE_API_KEY=your_api_key_here
Run the assistant:
uv run german_assistant
-
Highlight text in any application.
-
Press:
CTRL + ALT + G
-
The assistant captures the selected text.
-
The best available AI backend is selected:
- Google Gemini when internet is available
- Ollama when offline
-
A correction popup displays:
- corrected sentence
- detected changes
- explanations
Settings can be changed in:
src/german_assistant/config.py
Example:
ollama_model = "qwen3:4b"
Any Ollama-compatible model can be used.
Offline mode runs completely locally.
When using Google Gemini, selected text is sent to Google's API for processing.
- One-click replacement of selected text
- Improved popup design
- Support for additional languages
- User correction history
- Personalized language learning insights
- System tray application