obra-0.1.0 is not a library.
Obsidian Brain (obra)
A fast, semantic search CLI for your Obsidian vault, built in Rust.
obra uses local vector embeddings to find notes based on their meaning, allowing you to search your vault with natural language queries like "notes about machine learning" or "plans for the weekend".
Features
- Semantic Search: Uses local vector embeddings (BGE-Small) to find notes by meaning, not just keywords.
- Incremental Indexing: Automatically tracks file changes and only indexes what's necessary.
- Zero External Dependencies: No Docker or Python required. Everything runs in a single, fast binary.
- Auto-Sync: Automatically refreshes your index if it's older than 24 hours.
How it Works
- Scanning:
obrawalks your Obsidian vault, ignoring folders like.obsidianand.git. - Chunking: Files are split into manageable chunks with overlapping context.
- Embedding: Each chunk is converted into a 384-dimensional vector using the
BGE-Small-EN-v1.5model viacandle. - Indexing: Vectors are stored in a
usearchindex for ultra-fast similarity search. - Search: When you query, your query is also embedded and compared against the index. Results are ranked by cosine similarity and boosted by filename matches.
Installation
# Clone the repository
# Install via Cargo
Usage
1. Initial Setup
Point the tool to your Obsidian vault:
2. Searching
Search your vault using natural language:
3. Indexing
Indexing happens automatically on search if needed, but you can force a sync:
Data Locations
- Config:
~/.config/obra/config.json - Database:
~/.local/share/obra/vectors.usearch - Metadata:
~/.local/share/obra/chunks.json
License
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0) license.
- Non-Commercial: You may not use this material for commercial purposes.
- Attribution: You must give appropriate credit and indicate if changes were made.
See the LICENSE file for the full text.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request