Local Semantic Explorer
A desktop application for semantic search across your local files using AI embeddings. Search by meaning, not just keywords.
- Semantic Search: Find files by meaning using AI embeddings (Ollama)
- Hybrid Search: Combine vector similarity and keyword search (RRF fusion)
- Filename Search: Quick lookup by file names
- Multi-modal Support: Index text files, PDFs, and images
- Real-time Sync: Automatic index updates when files change
- REST API: Programmatic access via FastAPI endpoints
- Offline-first: All processing happens locally
- Privacy-focused: Your data never leaves your computer
| Category | Extensions |
|---|---|
| Text | .txt, .md, .py, .json, .csv |
| Documents | .pdf |
| Images | .png, .jpg, .jpeg, .webp |
| Software | Version | Purpose |
|---|---|---|
| Python | 3.10+ | Runtime |
| Ollama | 0.1.0+ | AI embedding engine |
| OS | macOS 12+ / Ubuntu 20.04+ / Windows 10+ | Platform |
| Resource | Minimum | Recommended |
|---|---|---|
| RAM | 4 GB | 8 GB+ |
| Disk Space | 2 GB | 5 GB+ |
| GPU | Not required | CPU-only embeddings |
git clone https://github.com/yourusername/L4MOLE.git
cd L4MOLE
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt# macOS
brew install ollama
# Linux
curl -fsSL https://ollama.com/install.sh | sh
# Windows
winget install Ollama.Ollamaollama pull nomic-embed-textpython main.pyOllama will start automatically if not running.
python main.py # GUI only (default)
python main.py --mode api # REST API only
python main.py --mode both # GUI + API
python main.py --mode api --port 9000 # Custom port| Option | Default | Description |
|---|---|---|
--mode |
gui |
gui, api, or both |
--host |
127.0.0.1 |
API server host |
--port |
8000 |
API server port |
--log-level |
info |
debug, info, warning, error |
| Mode | Description |
|---|---|
| Filename | Search by file names |
| Content | Semantic search through file contents |
| Hybrid | Combined vector + keyword search (RRF) |
| Action | Windows/Linux | macOS |
|---|---|---|
| Focus search | Ctrl+F |
Cmd+F |
| Reindex | Ctrl+R |
Cmd+R |
| Settings | Ctrl+, |
Cmd+, |
| Clear results | Esc |
Esc |
Clean Architecture with clear separation of concerns.
src/
├── domain/ # Core business logic
│ ├── entities/ # File, Chunk, Folder
│ ├── value_objects/# FilePath, SearchQuery, EmbeddingVector
│ ├── ports/ # Repository interfaces
│ └── services/ # Hybrid search combiner, deduplication
├── application/ # Use cases
│ ├── use_cases/ # IndexFile, IndexFolder, Search
│ └── services/ # Transaction management
├── infrastructure/ # External adapters
│ ├── container/ # DI container
│ ├── persistence/ # SQLite, Milvus
│ ├── embedding/ # Ollama adapter
│ ├── file_system/ # File reader
│ ├── compression/ # Zstandard compression
│ └── resilience/ # Circuit breaker
└── presentation/ # UI layer
├── api/ # FastAPI endpoints
└── gui/ # PyQt6 interface
| Component | Technology | Purpose |
|---|---|---|
| Embeddings | Ollama | Generate semantic vectors |
| Vector Store | Milvus Lite | Similarity search |
| Metadata | SQLite (WAL) | File metadata storage |
| Keyword Search | SQLite FTS5 | Full-text search |
| GUI | PyQt6 | Desktop interface |
| REST API | FastAPI | Programmatic access |
| File Watching | Watchdog | Real-time sync |
pytest # All tests
pytest --cov=src # With coverage
pytest tests/unit/ -v # Unit tests onlymypy src/ # Type checking
ruff check src/ # Linting
vulture src/ # Dead code analysis| File | Purpose |
|---|---|
metadata.db |
SQLite database |
milvus_lite.db |
Vector embeddings |
| Table | Purpose |
|---|---|
files |
File metadata (path, size, mtime, hash, status) |
directories |
Directory path dictionary for compression |
chunks |
Content chunks with compressed text |
indexed_folders |
Folder settings (include hidden, index content) |
search_history |
Search query history |
content_fts |
FTS5 full-text search index |
| Collection | Purpose |
|---|---|
filenames |
Filename embedding vectors |
contents |
Content chunk embedding vectors |
- Verify installation:
ollama --version - Check running status:
ollama list - Restart if needed:
ollama serve
- Large PDFs may take time (1+ min for >10 MB files)
- Start with smaller folders (<100 files)
- Ensure sufficient RAM (4 GB minimum)
- Confirm indexing completed (100%)
- Try different search modes
- Use shorter, simpler queries
- Verify supported file types
MIT License - see LICENSE for details.
