obsidian-notes-rag 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- obsidian_notes_rag-0.1.2.dist-info/METADATA +171 -0
- obsidian_notes_rag-0.1.2.dist-info/RECORD +12 -0
- obsidian_notes_rag-0.1.2.dist-info/WHEEL +4 -0
- obsidian_notes_rag-0.1.2.dist-info/entry_points.txt +2 -0
- obsidian_notes_rag-0.1.2.dist-info/licenses/LICENSE +21 -0
- obsidian_rag/__init__.py +3 -0
- obsidian_rag/cli.py +494 -0
- obsidian_rag/config.py +157 -0
- obsidian_rag/indexer.py +276 -0
- obsidian_rag/server.py +272 -0
- obsidian_rag/store.py +160 -0
- obsidian_rag/watcher.py +330 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: obsidian-notes-rag
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: MCP server for semantic search over Obsidian notes using local RAG
|
|
5
|
+
Project-URL: Homepage, https://github.com/ernestkoe/obsidian-rag
|
|
6
|
+
Project-URL: Repository, https://github.com/ernestkoe/obsidian-rag
|
|
7
|
+
Project-URL: Issues, https://github.com/ernestkoe/obsidian-rag/issues
|
|
8
|
+
Author: Ernest Koe
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Python: >=3.11
|
|
12
|
+
Requires-Dist: chromadb>=0.4.0
|
|
13
|
+
Requires-Dist: click>=8.0.0
|
|
14
|
+
Requires-Dist: httpx>=0.25.0
|
|
15
|
+
Requires-Dist: mcp>=1.0.0
|
|
16
|
+
Requires-Dist: openai>=1.0.0
|
|
17
|
+
Requires-Dist: platformdirs>=3.0.0
|
|
18
|
+
Requires-Dist: pyyaml>=6.0
|
|
19
|
+
Requires-Dist: tomli-w>=1.0.0
|
|
20
|
+
Requires-Dist: watchdog>=3.0.0
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
|
|
23
|
+
# obsidian-rag
|
|
24
|
+
|
|
25
|
+
[](https://opensource.org/licenses/MIT)
|
|
26
|
+
|
|
27
|
+
MCP server for semantic search over your Obsidian vault. Uses OpenAI embeddings by default (or Ollama for local processing) with ChromaDB for vector storage.
|
|
28
|
+
|
|
29
|
+
## What it does
|
|
30
|
+
|
|
31
|
+
Ask natural language questions about your notes:
|
|
32
|
+
- "What did I write about project planning?"
|
|
33
|
+
- "Find notes similar to my meeting notes from last week"
|
|
34
|
+
- "What's in my daily notes about the API refactor?"
|
|
35
|
+
|
|
36
|
+
## Requirements
|
|
37
|
+
|
|
38
|
+
- Python 3.11+
|
|
39
|
+
- `OPENAI_API_KEY` environment variable (or [Ollama](https://ollama.ai/) for local embeddings)
|
|
40
|
+
|
|
41
|
+
## Quick Start
|
|
42
|
+
|
|
43
|
+
The easiest way to get started is with [uvx](https://docs.astral.sh/uv/guides/tools/) (no installation required):
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Run the setup wizard
|
|
47
|
+
uvx obsidian-rag setup
|
|
48
|
+
|
|
49
|
+
# Add to Claude Code
|
|
50
|
+
claude mcp add obsidian-rag -- uvx obsidian-rag serve
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Alternative: Clone and install
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
git clone https://github.com/ernestkoe/obsidian-rag.git
|
|
57
|
+
cd obsidian-rag
|
|
58
|
+
uv sync
|
|
59
|
+
|
|
60
|
+
uv run obsidian-rag setup
|
|
61
|
+
claude mcp add obsidian-rag -- uv run --directory /path/to/obsidian-rag obsidian-rag serve
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The setup wizard will:
|
|
65
|
+
1. Ask for your embedding provider (OpenAI or Ollama)
|
|
66
|
+
2. Configure your API key (for OpenAI)
|
|
67
|
+
3. Set your Obsidian vault path
|
|
68
|
+
4. Choose where to store the search index
|
|
69
|
+
5. Optionally run the initial indexing
|
|
70
|
+
|
|
71
|
+
### Manual Setup (alternative)
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Set your API key and index directly
|
|
75
|
+
export OPENAI_API_KEY=sk-...
|
|
76
|
+
uv run obsidian-rag index --vault /path/to/your/vault
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Using Ollama (local, offline)
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
# Install Ollama and pull the embedding model
|
|
83
|
+
ollama pull nomic-embed-text
|
|
84
|
+
|
|
85
|
+
# Run setup with Ollama, or index directly:
|
|
86
|
+
uv run obsidian-rag --provider ollama index --vault /path/to/your/vault
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## MCP Tools
|
|
90
|
+
|
|
91
|
+
Once connected, these tools are available to Claude:
|
|
92
|
+
|
|
93
|
+
| Tool | What it does |
|
|
94
|
+
|------|--------------|
|
|
95
|
+
| `search_notes` | Find notes matching a query |
|
|
96
|
+
| `get_similar` | Find notes similar to a given note |
|
|
97
|
+
| `get_note_context` | Get a note with related context |
|
|
98
|
+
| `get_stats` | Show index statistics |
|
|
99
|
+
| `reindex` | Update the index |
|
|
100
|
+
|
|
101
|
+
## Keeping the Index Fresh
|
|
102
|
+
|
|
103
|
+
### Option 1: Manual reindex
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
uv run obsidian-rag index
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Option 2: Watch for changes
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
uv run obsidian-rag watch
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Option 3: Auto-start on login (macOS)
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
uv run obsidian-rag install-service
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## CLI Reference
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
obsidian-rag setup # Interactive setup wizard
|
|
125
|
+
obsidian-rag serve # Start MCP server (for Claude Code)
|
|
126
|
+
obsidian-rag index [--clear] # Index vault (--clear to rebuild)
|
|
127
|
+
obsidian-rag search "query" # Search from command line
|
|
128
|
+
obsidian-rag watch # Watch for file changes
|
|
129
|
+
obsidian-rag stats # Show index stats
|
|
130
|
+
obsidian-rag install-service # Install macOS launchd service
|
|
131
|
+
obsidian-rag uninstall-service # Remove service
|
|
132
|
+
obsidian-rag service-status # Check service status
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Configuration
|
|
136
|
+
|
|
137
|
+
Set your vault path and provider via CLI options or environment variables:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# CLI options
|
|
141
|
+
uv run obsidian-rag --vault /path/to/vault index
|
|
142
|
+
uv run obsidian-rag --provider ollama index
|
|
143
|
+
|
|
144
|
+
# Environment variables
|
|
145
|
+
export OBSIDIAN_RAG_VAULT=/path/to/vault
|
|
146
|
+
export OBSIDIAN_RAG_PROVIDER=ollama # or "openai" (default)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
| Variable | Description |
|
|
150
|
+
|----------|-------------|
|
|
151
|
+
| `OPENAI_API_KEY` | OpenAI API key (required for default provider) |
|
|
152
|
+
| `OBSIDIAN_RAG_PROVIDER` | Embedding provider: `openai` (default) or `ollama` |
|
|
153
|
+
| `OBSIDIAN_RAG_VAULT` | Path to Obsidian vault |
|
|
154
|
+
| `OBSIDIAN_RAG_DATA` | Where to store the index (default: `./data`) |
|
|
155
|
+
| `OBSIDIAN_RAG_OLLAMA_URL` | Ollama API URL (default: `http://localhost:11434`) |
|
|
156
|
+
| `OBSIDIAN_RAG_MODEL` | Override embedding model |
|
|
157
|
+
|
|
158
|
+
## How it works
|
|
159
|
+
|
|
160
|
+
1. Parses your markdown files and splits them by headings
|
|
161
|
+
2. Generates embeddings using OpenAI API (or Ollama for local processing)
|
|
162
|
+
3. Stores vectors in ChromaDB (local, persistent)
|
|
163
|
+
4. MCP server provides semantic search to Claude
|
|
164
|
+
|
|
165
|
+
## Contributing
|
|
166
|
+
|
|
167
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup.
|
|
168
|
+
|
|
169
|
+
## License
|
|
170
|
+
|
|
171
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
obsidian_rag/__init__.py,sha256=t9xGwmsEw9905Z11CGQU8lKp7G61F1HDxlwCZO1uNGc,93
|
|
2
|
+
obsidian_rag/cli.py,sha256=oapWNqTbTgbbylcfgds00FwKJ9pVUlJGCNiD-dOJHKU,16645
|
|
3
|
+
obsidian_rag/config.py,sha256=2jUXUoZF7LbLawSB598RbmTuLZcBjleLuYSO4pY7QaA,4801
|
|
4
|
+
obsidian_rag/indexer.py,sha256=xoGdklZRap3zDWWFKkNuJFjoXNvMBT85kjUta_Lp2QA,8559
|
|
5
|
+
obsidian_rag/server.py,sha256=YQkjaMDUa99GbLzgzAVJfH9oVSgtcZFpUgm39ZHPFso,7620
|
|
6
|
+
obsidian_rag/store.py,sha256=0T9wOFQI5N4PY5R2Gke5TYcLobdsHMN8SsqcRtVfpSk,5053
|
|
7
|
+
obsidian_rag/watcher.py,sha256=vHyiBope_q_ZoBiriVgfK-IysnAljqbS3b3dCwd-fnw,10017
|
|
8
|
+
obsidian_notes_rag-0.1.2.dist-info/METADATA,sha256=0MPYKd0jYXvPLntPpgiqmdRT0pp8o3k8s-U-W543Vyc,4859
|
|
9
|
+
obsidian_notes_rag-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
10
|
+
obsidian_notes_rag-0.1.2.dist-info/entry_points.txt,sha256=-Kf5hOndApdppZVAS6boq6ZDu09Dx9ZmfV6MoQwyb14,61
|
|
11
|
+
obsidian_notes_rag-0.1.2.dist-info/licenses/LICENSE,sha256=BGPR85ZPP4AVv8hzsabjfJRoJDbJcgSSIKO2HIFVebc,1067
|
|
12
|
+
obsidian_notes_rag-0.1.2.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Ernest Koe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
obsidian_rag/__init__.py
ADDED