ClipSage is a modern, intelligent clipboard manager that combines semantic search capabilities with a sleek PyQt6 interface. It automatically captures and indexes your clipboard history, enabling AI-powered search through your copied content.
- Semantic Search: Find content by meaning, not just keywords
- AI-Powered: Uses Ollama embeddings (all-minilm:22m model)
- Real-time Results: Instant search with live preview
- Context Aware: Understands relationships between different content types
- Automatic Capture: Monitors system clipboard in real-time
- Content Types: Supports text and images with automatic classification
- Persistent Storage: Reliable storage with organized file structure
- Background Monitoring: Efficient C++ backend for system-wide capture
- Clean Design: Modern PyQt6 interface with intuitive navigation
- Live Preview: Real-time content preview and details
- Configurable: Customizable settings and preferences
- Cross-platform: Linux support with desktop integration
ClipSage follows a modular architecture with clear separation of concerns:
clipsage/
βββ core/ # Core functionality and business logic
β βββ config.py # Configuration management
β βββ semantic_search.py # AI-powered search engine
βββ gui/ # User interface components
β βββ main_window.py # Main application window
β βββ widgets.py # Custom UI components
βββ backend/ # System integration
βββ clipboard_manager.py # Backend interface
βββ main.cpp # C++ clipboard monitor
βββ CMakeLists.txt # Build configuration
- Backend Monitor: C++ service for efficient system clipboard monitoring
- Core Engine: Python-based semantic search and data management
- GUI Interface: Modern PyQt6 application with rich user experience
git clone https://github.com/clipsage/clipsage.git
cd clipsage
chmod +x scripts/install.sh
./scripts/install.sh# 1. Install system dependencies
sudo apt install python3 python3-pip cmake build-essential qt6-base-dev
# 2. Clone and setup
git clone https://github.com/clipsage/clipsage.git
cd clipsage
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# 3. Build backend
cd clipsage/backend && mkdir build && cd build
cmake .. && make -j$(nproc) && cp clipboard_manager ..
# 4. Install Ollama and model
curl -fsSL https://ollama.ai/install.sh | sh
ollama serve & && ollama pull all-minilm:22m# Snap (coming soon)
sudo snap install clipsage
# Debian package (coming soon)
wget https://github.com/clipsage/clipsage/releases/latest/download/clipsage_1.0.0_amd64.deb
sudo dpkg -i clipsage_1.0.0_amd64.deb# After installation
clipsage
# Or run directly
cd clipsage && source .venv/bin/activate
python -m clipsage
# With options
clipsage --help
clipsage --no-backend # Run without starting clipboard monitor
clipsage --debug # Enable debug output-
Basic Search: Type any query in the search box and press Enter or click Search
-
Semantic Queries: Search by meaning, e.g.:
- "programming code" - finds code snippets
- "web links" - finds URLs
- "meeting notes" - finds text about meetings
- "configuration" - finds config-related content
-
Clear Search: Click "Clear" to show all clipboard items
-
Refresh: Click "Refresh" to update with new clipboard content
- Auto-refresh: The interface automatically refreshes every 5 seconds
- Content Preview: Click any item to see full content in the preview pane
- Image Support: Images are displayed with dimensions and path information
- Type Detection: Automatic classification of content types (text, image)
src/
βββ app/ # Python GUI application
β βββ main.py # Main PyQt6 application
β βββ semantic.py # Semantic search functionality
β βββ clipsage.py # Application launcher
β βββ test_search.py # Search functionality tests
β βββ requirements.txt # Python dependencies
β βββ pyproject.toml # Project configuration
βββ clip_board/ # C++ clipboard manager
βββ main.cpp # Clipboard monitoring service
βββ CMakeLists.txt # Build configuration
βββ install.sh # Build script
βββ run_clipboard_manager.sh # Launcher script
- C++ service monitors system clipboard changes
- Content is saved to
/tmp/clipboard_manager/with timestamps - Python application loads and indexes this content
- Semantic search uses Ollama embeddings for intelligent queries
- Results are displayed in the modern GUI
Clipboard files follow this pattern:
clip_{counter}_{timestamp}_{type}.{ext}
counter: Sequential numbertimestamp: YYYY-MM-DD_HH-MM-SS-mmm formattype: text, image (only these types are processed)ext: txt, png based on content type
-
No clipboard items showing:
- Ensure the C++ clipboard manager is running
- Check if
/tmp/clipboard_manager/directory exists and has files - Copy some text to test clipboard monitoring
-
Embedding errors:
- Verify Ollama is installed and running
- Check that
all-minilm:22mmodel is available:ollama list - Restart Ollama service if needed
-
Search not working:
- Check Python dependencies are properly installed
- Verify LangChain and Ollama packages are available
- Check console output for error messages
Run with debug output:
cd src/app
python -c "from semantic import clipboard_search; clipboard_search.refresh_data()"- The semantic search system is extensible
- UI components follow modern PyQt6 patterns
- The C++ component can be enhanced for additional MIME types
cd src/app
python test_search.py- PyQt6: Modern GUI framework
- LangChain: AI/ML framework for semantic search
- langchain-ollama: Ollama integration
- Pillow: Image processing
- docx: Document handling
- Qt6 libraries
- C++ compiler (gcc/clang)
- CMake build system
This project is open source. See the license file for details.
Contributions are welcome! Please submit pull requests with:
- Clear description of changes
- Updated documentation
- Test coverage for new features
