https://github.com/thoreinstein/gemini-obsidian
A Gemini CLI extension for interfacing with an Obsidian vault with local first RAG capabilities
https://github.com/thoreinstein/gemini-obsidian
gemini-cli gemini-cli-extensions gemini-extensions obsidian-md
Last synced: 2 months ago
JSON representation
A Gemini CLI extension for interfacing with an Obsidian vault with local first RAG capabilities
- Host: GitHub
- URL: https://github.com/thoreinstein/gemini-obsidian
- Owner: thoreinstein
- License: isc
- Created: 2026-02-04T00:34:43.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-02-08T19:44:52.000Z (2 months ago)
- Last Synced: 2026-02-09T20:01:48.144Z (2 months ago)
- Topics: gemini-cli, gemini-cli-extensions, gemini-extensions, obsidian-md
- Language: JavaScript
- Homepage:
- Size: 6.48 MB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-gemini-cli-extensions - Obsidian - Connect Gemini to your Obsidian vault through a local RAG MCP server with `/obsidian:*` commands to interact with your vault. (3rd-Party Services)
README
# Gemini Obsidian Extension
This is a powerful [Gemini CLI](https://github.com/google/gemini-cli) extension that integrates your **Obsidian Vault** directly into your AI workflow. It transforms Gemini into a "Second Brain" assistant capable of reading, searching, connecting, and managing your notes.
## Features
- **π§ Semantic Search (RAG)**: Ask natural language questions about your notes. The extension indexes your vault using embeddings (via LanceDB) to find relevant context.
- **πΈοΈ Graph Traversal**: Navigate your knowledge graph. Find backlinks (`[[linked from]]`) and outgoing links to surf your ideas.
- **π Smart Journaling**: Fetch today's daily note or append logs to specific headings (e.g., `## Work Log`) with timestamps.
- **β‘ Management**: Create, move, rename notes, and safely update YAML frontmatter without breaking formatting.
- **π Fuzzy Search**: Quickly find files by name or content.
## Demo

## Prerequisites
- **Node.js**: v18 or higher.
- **Gemini CLI**: The host application for this extension.
- **Obsidian Vault**: A local folder containing your markdown notes.
## Installation
1. **Install via Gemini CLI**:
```sh
gemini extensions install https://github.com/thoreinstein/gemini-obsidian
```
2. **Install Native Dependencies**:
This extension requires native binaries for semantic search. You **must** run `npm install` inside the extension directory:
```sh
cd ~/.gemini/extensions/gemini-obsidian && npm install
```
## Configuration
The extension needs to know where your Obsidian vault is located.
**Option 1: Environment Variable**
Set `OBSIDIAN_VAULT_PATH` in your shell profile:
```bash
export OBSIDIAN_VAULT_PATH="/Users/you/Documents/MyVault"
```
**Option 2: Runtime Configuration**
The first time you use a tool, gemini will ask to set `vault_path`. It will be cached in `~/.gemini-obsidian.config.json`.
## Data Storage & Troubleshooting
- **Vector Index**: The semantic search index is stored locally in `~/.gemini-obsidian-lancedb`.
- **Module Not Found Error**: If you see an error like `Cannot find module '@lancedb/lancedb'`, it means the native dependencies were not installed. Run `npm install` in the extension directory as shown in the Installation section.
- **Cache Reset**: If you suspect the index is corrupted or want a fresh start, you can manually delete the `~/.gemini-obsidian-lancedb` folder. The next time you run `/obsidian:index` or `obsidian_rag_index`, it will be recreated.
- **Logs**: If you encounter issues, check the extension logs. Since this runs as an MCP server, errors are typically output to stderr.
## Commands
The extension comes with pre-configured slash commands for common workflows:
| Command | Description |
| :--- | :--- |
| `/obsidian:daily` | Retrieve today's daily note, summarize tasks, and ask for updates. |
| `/obsidian:ask` | Ask a question to your vault using RAG (e.g., `/obsidian:ask "What did I learn about React?"`). |
| `/obsidian:search` | Fuzzy search for files by name or content. |
| `/obsidian:index` | Trigger a manual re-index of the vault for semantic search. |
## Available Tools
The following tools are exposed to the Gemini agent:
### Retrieval & Search
- `obsidian_rag_index`: Index the vault for semantic search.
- `obsidian_rag_query`: Perform a semantic search query.
- `obsidian_search_notes`: Simple text/filename search.
- `obsidian_list_notes`: List files in a folder.
- `obsidian_read_note`: Read the full content of a note.
### Graph & Connections
- `obsidian_get_backlinks`: Find all notes that link TO a specific note.
- `obsidian_get_links`: Find all notes linked FROM a specific note.
### Management & Journaling
- `obsidian_create_note`: Create a new markdown note.
- `obsidian_append_note`: Append text to the end of a note.
- `obsidian_append_daily_log`: Append text to a specific heading (e.g., "Log") in today's daily note with a timestamp.
- `obsidian_move_note`: Rename or move a note.
- `obsidian_update_frontmatter`: Safely update YAML frontmatter keys.
- `obsidian_get_daily_note`: Get or create today's daily note.
## Development
```bash
# Build changes
npm run build
# Watch mode
npm run watch
```
## License
ISC