AI-Powered Translation Desktop Application
Barbaros is a lightweight desktop application that provides instant AI translations through your system tray. Simply copy text to your clipboard and get quick translations with a hotkey.
Note: Tested only on Linux, but may also work on Windows and macOS.
- 🚀 System Tray Integration: Runs quietly in the background without cluttering your desktop
- 📋 Clipboard Translation: Automatically translates text from your clipboard
- 🖼️ OCR Functionality: Text recognition from images with screen capture and cropping support
- 🤖 AI-Powered: Leverages advanced AI models through multiple LLM providers (Ollama, OpenAI, Anthropic, and 40+ others) for accurate translations
- 🎯 Separate Models for OCR: Ability to choose a dedicated model for text recognition from images
- 🔒 Privacy-First: Process translations locally with Ollama or securely with cloud providers (your data protection depends on chosen provider)
- 🏠 Offline Capable: Works completely offline with local providers (e.g., Ollama) once models are downloaded
- ⚡ Quick Access: Instant popup with customizable hotkeys
- 🔄 Multiple Communication Methods: Uses DBus and Unix signals for reliable operation
- 🎛️ Three Functional Tabs: Text (text translation), Image (OCR), Settings (configuration)
Barbaros uses the any_llm SDK to support 40+ different LLM providers. You can choose to work with local providers like Ollama or cloud providers like OpenAI, Anthropic, and others.
Barbaros comes with Ollama pre-configured as the default provider. For local, privacy-focused translations, install Ollama:
Linux Installation:
curl -fsSL https://ollama.com/install.sh | shPull a Translation Model: After installing Ollama, download a model for translations:
ollama pull llama3.1Browse available models in the official Ollama catalog.
For cloud providers, you'll need:
- API Key: Get an API key from your chosen provider's website
- Model Access: Ensure you have access to the desired models
Popular cloud providers include:
- OpenAI: Requires API key
- Anthropic: Requires API key
- Google Gemini: Requires API key
- And 40+ more supported by any_llm
Note: Cloud providers send your text to their servers. Review their privacy policies before use.
Download and Install:
- Get the latest
.flatpakfile from GitHub Releases - Install the package:
cd ~/Downloads flatpak install Barbaros-v1.2.3.flatpak
Launch:
- Terminal:
flatpak run io.github.frimn.barbarosorflatpak run io.github.frimn.barbaros --openedfor open main window on startup - GUI: Find "Barbaros" in your application menu
Quick Translation:
flatpak run io.github.frimn.barbaros --popupTip: Bind this command to a keyboard shortcut for instant access
Note: Manual Flatpak installation doesn't support automatic updates. Check GitHub releases for new versions.
Clone and Setup:
git clone https://github.com/FRiMN/barbaros.git
cd barbaros
uv syncRun Application:
# Start system tray application
uv run barbaros
# Quick translation popup
uv run barbaros --popup
# Start app with open main window without translation
uv run barbaros --opened- Start the Application: Launch Barbaros to run it in your system tray
- Select Provider and Model (optional):
- Open the application window
- In the "Text" tab, select a provider and model from the dropdown
- Default: Ollama with your first available model
- Configure Providers (optional):
- Go to "Settings" tab
- Click "Manage Providers" to add/edit/remove providers
- Click refresh button next to a provider to load available models
- Translate Text:
- Copy any text you want to translate to your clipboard
- Use the
--popupcommand, or click the system tray icon - In the translation window, select target language
- Press "Translate" button or
Ctrl+Returnshortcut
- Get Results: The translation window will appear with your translated text and performance statistics
Barbaros supports text recognition from images with subsequent translation:
- Navigate to "Image" Tab: In the main application window, select the "Image" tab
- Load an Image:
- Click "Load Image" button to load an image from disk
- Or click "Screenshot" button to capture a screen
- Select Text Area:
- Click on the image preview to open the cropping editor
- Select the text area you want to recognize
- Use the corner and side handles for precise area adjustment
- Use the zoom slider for detailed viewing
- Select OCR Model:
- From the "OCR Model" dropdown, select a provider and model for text recognition
- Recommended: vision-capable models like
llavaor specialized OCR models
- Start Recognition:
- Click "OCR" button to recognize text from the selected area
- Recognized text will appear in the text field
- Translate Recognized Text:
- Select target language
- Click "Translate" button to translate the recognized text
- Translation result will appear in the bottom text field
Barbaros supports 40+ LLM providers through the any_llm SDK, giving you flexibility to choose between local and cloud models:
- Ollama: Pre-configured for local, privacy-focused translations
The application supports providers including:
- Local: Ollama, Llama.cpp, Llamafile, vLLM, LM Studio
- Major Cloud: OpenAI, Anthropic, Google Gemini, Azure
- Specialized: Groq, Together AI, Cerebras, Fireworks, Sambanova
- Enterprise: AWS Bedrock, IBM watsonx, Databricks, Vertex AI
- And 30+ more: See any_llm documentation for complete list
- Open Settings: Navigate to the "Settings" tab in Barbaros
- Manage Providers: Click the "Manage Providers" button
- Add Provider:
- Click "Add Provider"
- Enter a name (e.g., "My Ollama")
- Select provider type from dropdown (OpenAI, Anthropic, etc.)
- Enter API key (required for cloud providers)
- Enter API URL if using a custom endpoint (optional)
- Load Models: Click the refresh button next to a provider to fetch available models
- Select Model: Choose from provider/model dropdown in Text or OCR tabs
OpenAI:
- Type:
openai - API Key: Your OpenAI API key from https://platform.openai.com/api-keys
- API URL: Leave blank (uses default)
Anthropic:
- Type:
anthropic - API Key: Your Anthropic API key from https://console.anthropic.com/
- API URL: Leave blank (uses default)
Custom OpenAI-compatible endpoint:
- Type:
openai - API Key: Your endpoint's API key
- API URL:
https://your-endpoint.com/v1
Ollama (local):
- Type:
ollama - API Key: Leave blank
- API URL: Leave blank (uses
http://localhost:11434by default)
Each provider can have multiple models. Select the desired model from the tree view dropdown:
- Provider names are shown as top-level items
- Models appear as children under each provider
- Selection persists between sessions
Barbaros uses a dual-communication system for reliable popup functionality:
- Primary: DBus messaging for seamless desktop integration
- Fallback: Unix signals (
SIGUSR1) for reliable operation
When you use the --popup argument, the command communicates with the running application instance, which then:
- Brings the main window to the foreground
- Retrieves text from your clipboard
- Processes the translation through the selected provider and model
- Displays the results
For OCR functionality, Barbaros uses a separate worker process:
- Image Loading: User loads an image or takes a screenshot
- Cropping: Built-in editor allows precise selection of text area
- Model Submission: Image is converted to PNG and sent to the selected OCR model
- Recognition: Model analyzes the image and returns recognized text
- Translation: Recognized text can be translated using the selected translation model
Provider Communication:
- Local Providers (e.g., Ollama): Translations and OCR processed offline on your machine
- Cloud Providers (e.g., OpenAI, Anthropic): Secure API calls to provider servers
- Dual-Communication System: DBus messages + Unix signals for reliable popup functionality
Runtime Requirements:
- any_llm - Unified LLM provider SDK (supports 40+ providers)
- PySide6 - GUI framework
- psutil - Process utilities
- Flatpak - Application distribution (optional)
Optional (for local AI models):
- Ollama - Local LLM provider (default, pre-configured)
For OCR Functionality:
- Compatible vision-capable models (models with image support)
- Recommended models:
glm-ocror other multimodal models
Development Tools:
For detailed information about building the Flatpak package, see build_flatpak.md.
Quick Build:
We use invoke for the build process. See the tasks.py file in the project root.
uv run invoke buildImportant Notice: The quality of translations depends entirely on the AI model you choose and its capabilities. Barbaros is a tool that facilitates the translation process, but it does not guarantee the accuracy, completeness, or appropriateness of translations.
- Translation accuracy varies between different language pairs
- Complex technical, legal, or medical texts may require professional human translation
- Always review and verify translations for important documents
- The application is not responsible for any consequences resulting from translation errors
For critical translations, we recommend consulting professional translation services.
Contributions are welcome! Please feel free to submit issues and pull requests.
This project is open source. Please check the repository for license details.


