RAG with Gemini and ChromaDB for Obsidian notes with a TUI interface
Step-by-step setup
- Create config and env files:
- Copy
config.example.jsontoconfig.json. - Copy
.env.exampleto.env.
- Copy
- Edit
config.json:vault_path: absolute path to your Obsidian vault.chroma_persist_dir: where to store the local Chroma DB (default./chroma-data).embedding_modelandchat_model: keep defaults or change as needed.
- Edit
.envand setGOOGLE_API_KEY. - (Optional) Set
RAG_CONFIG_PATHto point to a different config file:- Example:
export RAG_CONFIG_PATH=/path/to/config.json
- Example:
- Install dependencies:
uv sync
Indexing behavior
- Incremental by default: only new or changed chunks are embedded.
- Stale chunks are removed automatically if a file changes or is deleted.
- Full rebuild:
uv run build_index.py --reindexdeletes the collection and reindexes everything.
Typical workflow
- Build or update the index:
uv run build_index.py
- Run the TUI chat:
uv run chat.py
Notes
- Chroma runs in embedded mode using
./chroma-data.