pi-vault-mind 0.7.0
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.
- package/LICENSE +21 -0
- package/README.md +428 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/src/commands.d.ts +9 -0
- package/dist/src/commands.js +813 -0
- package/dist/src/events.d.ts +13 -0
- package/dist/src/events.js +236 -0
- package/dist/src/graph.d.ts +3 -0
- package/dist/src/graph.js +234 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +61 -0
- package/dist/src/lance.d.ts +40 -0
- package/dist/src/lance.js +409 -0
- package/dist/src/server.d.ts +25 -0
- package/dist/src/server.js +180 -0
- package/dist/src/settings-ui.d.ts +9 -0
- package/dist/src/settings-ui.js +313 -0
- package/dist/src/state.d.ts +2 -0
- package/dist/src/state.js +16 -0
- package/dist/src/tools.d.ts +2 -0
- package/dist/src/tools.js +772 -0
- package/dist/src/types.d.ts +103 -0
- package/dist/src/types.js +51 -0
- package/dist/src/utils.d.ts +17 -0
- package/dist/src/utils.js +102 -0
- package/dist/src/vault-writer.d.ts +17 -0
- package/dist/src/vault-writer.js +141 -0
- package/dist/src/watcher.d.ts +91 -0
- package/dist/src/watcher.js +411 -0
- package/dist/src/widget.d.ts +3 -0
- package/dist/src/widget.js +12 -0
- package/dist/test/index.test.d.ts +1 -0
- package/dist/test/index.test.js +368 -0
- package/package.json +83 -0
- package/skills/vault-mind/SKILL.md +260 -0
- package/skills/vault-mind/references/tool-reference.md +53 -0
- package/skills/vault-mind-broadcaster/SKILL.md +112 -0
- package/skills/vault-mind-heavy-lifter/SKILL.md +34 -0
- package/skills/vault-mind-manager/SKILL.md +35 -0
- package/skills/vault-mind-miner/SKILL.md +40 -0
- package/skills/vault-mind-setup/SKILL.md +385 -0
- package/skills/vault-mind-setup/references/obsidian-cli-and-plugins.md +269 -0
- package/skills/vault-mind-setup/references/obsidian-vault-structure.md +106 -0
- package/skills/vault-mind-setup/references/pi-extension-wiring.md +236 -0
- package/skills/vault-mind-setup/references/troubleshooting-tree.md +147 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vault-mind-setup
|
|
3
|
+
description: Setup and management assistant for pi-vault-mind (the passive Obsidian vault extension for pi). Use for first-time setup, configuration changes, troubleshooting, Obsidian plugin recommendations, upgrade paths, multi-vault management, and dependency auditing. Trigger phrases: "set up vault-mind", "configure obsidian", "install pi-vault-mind", "/wiki setup", "watcher not working", "vault-mind troubleshooting", "add another vault", "upgrade pi-vault-mind".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# pi-vault-mind Setup & Management
|
|
7
|
+
|
|
8
|
+
You are the setup and management assistant for **pi-vault-mind** — the passive Obsidian vault extension for the [pi](https://github.com/mariozechner/pi) agent ecosystem.
|
|
9
|
+
|
|
10
|
+
Your job: guide the user through **safe, checkpointed, end-to-end setup** without bulldozing their system. Always stop and confirm before destructive actions.
|
|
11
|
+
|
|
12
|
+
## When to use this skill
|
|
13
|
+
|
|
14
|
+
Trigger this skill when the user says any of:
|
|
15
|
+
- "set up pi-vault-mind" / "install vault-mind" / "/wiki setup"
|
|
16
|
+
- "configure my Obsidian vault" / "add a vault"
|
|
17
|
+
- "watcher not detecting" / "subagent not running" / "embedding failed"
|
|
18
|
+
- "upgrade pi-vault-mind" / "what changed in 0.8.0"
|
|
19
|
+
- "what Obsidian plugins do I need" / "kepano/obsidian-skills"
|
|
20
|
+
- "add another vault" / "multi-vault setup"
|
|
21
|
+
|
|
22
|
+
## Core principles
|
|
23
|
+
|
|
24
|
+
1. **Inventory before install.** Run read-only checks first. Show what you found. Ask before changing anything.
|
|
25
|
+
2. **Checkpoint every phase.** Never chain install → configure → write without a stop for confirmation.
|
|
26
|
+
3. **Reference the docs.** Don't reinvent — point to the right doc for each phase.
|
|
27
|
+
4. **Test in session, then in Obsidian.** First round-trip in the chat, then a real marker in a real note.
|
|
28
|
+
5. **Honor the user's vault.** Never write to the user's Obsidian vault without explicit permission for that specific path.
|
|
29
|
+
6. **Use forked subagents for research.** If you need to read 100 lines of code or pull 10 docs, fork a subagent. Keep the main session clean.
|
|
30
|
+
|
|
31
|
+
## The 8-phase walkthrough
|
|
32
|
+
|
|
33
|
+
### Phase 1 — Inventory environment (read-only, no install)
|
|
34
|
+
|
|
35
|
+
Run these checks and report what you found:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pi --version # confirm pi is installed
|
|
39
|
+
node --version # confirm Node 20+
|
|
40
|
+
ls ~/.pi/agent/ # check for existing global config
|
|
41
|
+
ls ~/.pi/agent/packages/ 2>/dev/null # check installed pi packages
|
|
42
|
+
which ollama && ollama list 2>/dev/null # check Ollama + models
|
|
43
|
+
cat ~/.config/obsidian/obsidian.json 2>/dev/null # find Obsidian vault paths
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Tell the user what's missing. Don't install yet.
|
|
47
|
+
|
|
48
|
+
### Phase 2 — Confirm Obsidian-side setup
|
|
49
|
+
|
|
50
|
+
Ask the user which Obsidian vault they want to use, then check for these community plugins (recommend installing if missing).
|
|
51
|
+
|
|
52
|
+
**First, check if the official Obsidian CLI is registered:**
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
command -v obsidian && obsidian version
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If missing, guide them to install it:
|
|
59
|
+
- Update to Obsidian 1.12+
|
|
60
|
+
- Settings → General → Command line interface → enable
|
|
61
|
+
- Follow the prompt to register the CLI
|
|
62
|
+
- Restart terminal
|
|
63
|
+
- Reference: https://help.obsidian.md/cli
|
|
64
|
+
|
|
65
|
+
**If the user is headless (no Obsidian running), use `notesmd-cli` instead:**
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
command -v notesmd-cli
|
|
69
|
+
# If missing:
|
|
70
|
+
# macOS/Linux: brew tap yakitrak/yakitrak && brew install yakitrak/yakitrak/notesmd-cli
|
|
71
|
+
# Windows: scoop install notesmd-cli
|
|
72
|
+
# Reference: https://github.com/Yakitrak/notesmd-cli
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Then install the recommended plugins via the official CLI:**
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
obsidian plugin:install id=obsidian-git enable
|
|
79
|
+
obsidian plugin:install id=obsidian-breadcrumbs enable
|
|
80
|
+
obsidian plugin:install id=graph-analysis enable
|
|
81
|
+
obsidian plugin:install id=actions-uri enable
|
|
82
|
+
obsidian plugin:install id=shellcommands enable
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Verify:**
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
obsidian plugins:enabled filter=community
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**For beta plugins** (not in the official store), use BRAT:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
obsidian plugin:install id=obsidian42-brat enable
|
|
95
|
+
# Then in Obsidian: Settings → BRAT → Beta Plugin List → Add
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Also check for `kepano/obsidian-skills` in the pi environment:**
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
for s in obsidian-markdown obsidian-bases json-canvas obsidian-cli; do
|
|
102
|
+
ls ~/.pi/agent/skills/$s/SKILL.md 2>/dev/null && echo "✅ $s" || echo "❌ $s missing"
|
|
103
|
+
done
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
If any are missing, use the official [`skills` CLI](https://github.com/vercel-labs/skills)
|
|
107
|
+
(pi is a first-class target agent):
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Non-interactive: install all 5 globally for pi
|
|
111
|
+
DISABLE_TELEMETRY=1 yes y | npx -y skills add https://github.com/kepano/obsidian-skills \
|
|
112
|
+
--skill obsidian-markdown --skill obsidian-bases \
|
|
113
|
+
--skill json-canvas --skill obsidian-cli --skill defuddle \
|
|
114
|
+
-g -a pi --copy -y
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
This puts them at `~/.pi/agent/skills/<name>/SKILL.md` where pi
|
|
118
|
+
auto-discovers them. The CLI handles symlink/copy, agent detection,
|
|
119
|
+
and security risk confirmations.
|
|
120
|
+
|
|
121
|
+
**Verify they're discoverable:**
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
for s in obsidian-markdown obsidian-bases json-canvas obsidian-cli defuddle; do
|
|
125
|
+
[ -f ~/.pi/agent/skills/$s/SKILL.md ] && echo "✅ $s" || echo "❌ $s"
|
|
126
|
+
done
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Just report. Don't install. See `references/obsidian-cli-and-plugins.md` for the full reference.
|
|
130
|
+
|
|
131
|
+
### Phase 3 — Install extension and required dependencies (STOP and ask first)
|
|
132
|
+
|
|
133
|
+
Show the user this before running:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Required: the wiki itself
|
|
137
|
+
pi install npm:pi-vault-mind
|
|
138
|
+
|
|
139
|
+
# Required: Manager needs this to fork subagents
|
|
140
|
+
pi install npm:pi-subagents
|
|
141
|
+
|
|
142
|
+
# Required: context hygiene tools
|
|
143
|
+
pi install npm:pi-context
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
If they say yes, run them. Then verify with `pi list`.
|
|
147
|
+
|
|
148
|
+
If they want optional pieces:
|
|
149
|
+
```bash
|
|
150
|
+
# Optional: podcast generation via NotebookLM
|
|
151
|
+
# Add to ~/.pi/agent/mcp.json: notebooklm-mcp server
|
|
152
|
+
# Or globally: npm install -g notebooklm-cli
|
|
153
|
+
|
|
154
|
+
# Optional: passive document ingestion
|
|
155
|
+
npm install -g any2md # or use npx any2md
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Phase 4 — Run the setup wizard
|
|
159
|
+
|
|
160
|
+
**Interactive mode (recommended for first-time users):**
|
|
161
|
+
```
|
|
162
|
+
/wiki setup
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**CLI mode (for scripting):**
|
|
166
|
+
```bash
|
|
167
|
+
/wiki setup --vault /home/user/Obsidian/MyVault --provider transformers
|
|
168
|
+
/wiki setup --vault /home/user/Obsidian/MyVault --provider ollama --model embeddinggemma
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Config writes to `~/.pi/agent/pi-vault-mind.config.json`. This applies **globally** — no matter which project directory the user opens pi from.
|
|
172
|
+
|
|
173
|
+
If config already exists, the wizard offers **View current** or **Reconfigure**.
|
|
174
|
+
|
|
175
|
+
### Phase 5 — Verify everything
|
|
176
|
+
|
|
177
|
+
Run all of these and report results:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
/wiki validate # overall health check
|
|
181
|
+
/wiki watcher status # is the watcher running?
|
|
182
|
+
/wiki embedding status # embedding provider + Ollama status
|
|
183
|
+
wiki_status # LanceDB connection
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
For the project-level config (collections, injectors):
|
|
187
|
+
```
|
|
188
|
+
/wiki init # scaffold project files
|
|
189
|
+
/wiki validate # check project too
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
For Obsidian sync verification:
|
|
193
|
+
```
|
|
194
|
+
/wiki watcher start # ensure watcher is running
|
|
195
|
+
# Drop a test @agent-miner marker in a real note
|
|
196
|
+
# Watch Vault/Agent/Inbox/ for results
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Phase 6 — First test: append in session
|
|
200
|
+
|
|
201
|
+
```python
|
|
202
|
+
append_wiki(collection="main", mode="autopilot", entry={
|
|
203
|
+
"id": "walkthrough-test-1",
|
|
204
|
+
"domain": "setup",
|
|
205
|
+
"source": "guided-setup",
|
|
206
|
+
"fact": "pi-vault-mind is installed and configured end-to-end",
|
|
207
|
+
"tag": "milestone"
|
|
208
|
+
})
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Verify:
|
|
212
|
+
```python
|
|
213
|
+
wiki_search(query="end-to-end setup") # should return the fact
|
|
214
|
+
wiki_status # should show 1 row
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Phase 7 — First test: Obsidian marker
|
|
218
|
+
|
|
219
|
+
Walk the user through this in Obsidian:
|
|
220
|
+
|
|
221
|
+
1. Open the vault in Obsidian
|
|
222
|
+
2. Create a new note: `test-vault-mind.md`
|
|
223
|
+
3. Paste this content:
|
|
224
|
+
|
|
225
|
+
```markdown
|
|
226
|
+
# Test: Vault Mind Walkthrough
|
|
227
|
+
|
|
228
|
+
@agent-miner Extract this test fact and confirm the system is working end-to-end.
|
|
229
|
+
|
|
230
|
+
This is a test of the passive Obsidian integration. The watcher should
|
|
231
|
+
detect this marker, dispatch a Miner subagent, extract entities, and
|
|
232
|
+
write results back to the vault.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
4. Save the file
|
|
236
|
+
5. Switch back to pi — confirm the dispatch was sent (you'll see the Manager receive the watcher notification)
|
|
237
|
+
6. Wait ~10 seconds
|
|
238
|
+
7. Check `Vault/Agent/Inbox/` for the Miner's output file
|
|
239
|
+
8. Verify with `wiki_search(query="end-to-end test")` — should return the fact
|
|
240
|
+
|
|
241
|
+
### Phase 8 — Review and next steps
|
|
242
|
+
|
|
243
|
+
Summarize what we accomplished:
|
|
244
|
+
- ✅ Install: [list extensions installed]
|
|
245
|
+
- ✅ Config: [path to global config]
|
|
246
|
+
- ✅ Vault: [path being watched]
|
|
247
|
+
- ✅ Test append: [fact added]
|
|
248
|
+
- ✅ Obsidian marker: [result found]
|
|
249
|
+
|
|
250
|
+
Then suggest:
|
|
251
|
+
- Try `@agent-broadcaster` for podcast generation
|
|
252
|
+
- Try `@agent-manager` to query the wiki via the graph
|
|
253
|
+
- Try multi-marker test: one file with `@agent-miner` and `@agent-broadcaster`
|
|
254
|
+
- Try named IDs: `@agent-miner:custom1` and `@agent-miner:custom2` in the same file
|
|
255
|
+
|
|
256
|
+
## Troubleshooting decision tree
|
|
257
|
+
|
|
258
|
+
When something fails, use this tree to diagnose. **Don't guess — read the error and follow the path.**
|
|
259
|
+
|
|
260
|
+
| Symptom | First check | Then |
|
|
261
|
+
|---|---|---|
|
|
262
|
+
| `subagent is not defined` | `pi list` | If `pi-subagents` missing: `pi install npm:pi-subagents` |
|
|
263
|
+
| `context_tag is not defined` | `pi list` | Install `pi-context` |
|
|
264
|
+
| Watcher doesn't detect markers | `/wiki watcher status` | If STOPPED: check `wiki.vaults` in config, then `/wiki watcher start` |
|
|
265
|
+
| Subagent dispatched but never finishes | Check `~/.pi/agent/sessions/` for the child session | Look for "needs_attention" or `interrupted` state; resume with `subagent({ action: "resume", id: "..." })` |
|
|
266
|
+
| `LanceDB connection failed` | `ls $wiki.dataDir` | Check the path is writable, not on a read-only mount |
|
|
267
|
+
| `Ollama not reachable` | `ollama list` | If fails: `ollama pull embeddinggemma`. If that works but wiki can't reach: check `wiki.embedding.ollamaHost` |
|
|
268
|
+
| `Embedding dimension mismatch` | Did you switch from transformers to ollama after data was indexed? | `/wiki reindex --reembed` |
|
|
269
|
+
| No search results | `wiki_status` | If 0 rows: append a fact first. Tables auto-create on first write. |
|
|
270
|
+
| `@agent-miner` works but `@agent-broadcaster` doesn't | `nlm login` | Broadcaster needs NotebookLM auth. Or skip the Broadcaster marker. |
|
|
271
|
+
| Vault write fails with permission error | `ls -ld /path/to/vault` | The user running pi doesn't own the vault directory |
|
|
272
|
+
|
|
273
|
+
## Multi-vault management
|
|
274
|
+
|
|
275
|
+
The user can have multiple vaults (work, personal, research). Each is a separate entry in `wiki.vaults`:
|
|
276
|
+
|
|
277
|
+
```json
|
|
278
|
+
{
|
|
279
|
+
"wiki": {
|
|
280
|
+
"vaults": {
|
|
281
|
+
"default": { "path": "/home/user/Obsidian/Main" },
|
|
282
|
+
"work": { "path": "/home/user/Obsidian/Work" },
|
|
283
|
+
"research": { "path": "/home/user/Obsidian/Research" }
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
The watcher monitors **all** configured vaults. To target a specific vault in a tool call:
|
|
290
|
+
|
|
291
|
+
```python
|
|
292
|
+
wiki_sync(vault="work", query="tag:decision", collection="main")
|
|
293
|
+
wiki_sync(vault="*", ...) # all vaults
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
To add a new vault: edit `~/.pi/agent/pi-vault-mind.config.json` or run `/wiki setup` again. The watcher will pick it up on the next session start, or run `/wiki watcher start` to apply immediately.
|
|
297
|
+
|
|
298
|
+
## Upgrade paths
|
|
299
|
+
|
|
300
|
+
When a new version of pi-vault-mind is released:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
# 1. See what's changed
|
|
304
|
+
cat CHANGELOG.md | head -50
|
|
305
|
+
|
|
306
|
+
# 2. Update the package
|
|
307
|
+
pi update --extensions
|
|
308
|
+
# or:
|
|
309
|
+
pi install npm:pi-vault-mind@0.8.0
|
|
310
|
+
|
|
311
|
+
# 3. If config schema changed, run setup again
|
|
312
|
+
/wiki setup
|
|
313
|
+
# (will detect existing config, offer to reconfigure)
|
|
314
|
+
|
|
315
|
+
# 4. Re-validate
|
|
316
|
+
/wiki validate
|
|
317
|
+
|
|
318
|
+
# 5. Reindex if embedding model changed
|
|
319
|
+
/wiki reindex --reembed
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**Breaking changes to watch for:**
|
|
323
|
+
- Config schema migrations (the loader silently migrates old keys, but check the config after upgrade)
|
|
324
|
+
- Tool name changes (`append_wiki` was `append_ledger` in v0.5)
|
|
325
|
+
- New required dependencies (e.g., a new pi extension that's now required)
|
|
326
|
+
|
|
327
|
+
If something stops working after an upgrade: check the CHANGELOG, then run `/wiki validate`, then look at TROUBLESHOOTING.md.
|
|
328
|
+
|
|
329
|
+
## Daily management (post-setup)
|
|
330
|
+
|
|
331
|
+
After the initial setup, the daily workflow is just:
|
|
332
|
+
|
|
333
|
+
1. **Open Obsidian.** Drop `@agent-miner`, `@agent-broadcaster`, or `@agent-manager` markers in notes.
|
|
334
|
+
2. **Save.** The watcher does the rest.
|
|
335
|
+
3. **Review results** in `Vault/Agent/Inbox/` and via `wiki_search`.
|
|
336
|
+
|
|
337
|
+
No terminal needed for daily use. The pi session can run in a background tmux pane.
|
|
338
|
+
|
|
339
|
+
Useful management commands:
|
|
340
|
+
|
|
341
|
+
| Command | What it does |
|
|
342
|
+
|---|---|
|
|
343
|
+
| `/wiki watcher start` / `stop` / `status` | Manage the passive file watcher |
|
|
344
|
+
| `/wiki server status` | Show HTTP server health, port, endpoints |
|
|
345
|
+
| `/wiki validate` | Health check |
|
|
346
|
+
| `/wiki stats` | Dashboard of collection counts, sizes, pending queue |
|
|
347
|
+
| `/wiki approve [collection]` | Review pending (gated) entries |
|
|
348
|
+
| `/wiki reindex [--reembed]` | Rebuild indexes (use `--reembed` after switching embedding model) |
|
|
349
|
+
| `/wiki embedding status` | Show embedding config + Ollama models |
|
|
350
|
+
| `/wiki embedding use <provider>` | Switch between transformers and ollama |
|
|
351
|
+
| `/wiki setup` | Re-run the interactive config wizard |
|
|
352
|
+
|
|
353
|
+
## Reference docs (load on demand)
|
|
354
|
+
|
|
355
|
+
For deep-dive content, load these when you actually need them:
|
|
356
|
+
|
|
357
|
+
- `references/obsidian-vault-structure.md` — recommended folder layout (PARA + Johnny Decimal + Agent/)
|
|
358
|
+
- `references/obsidian-cli-and-plugins.md` — **official Obsidian CLI (1.12+) + notesmd-cli** for safe plugin/theme install
|
|
359
|
+
- `references/pi-extension-wiring.md` — pi-side extensions: pi-subagents, pi-context, NotebookLM, any2md
|
|
360
|
+
- `references/troubleshooting-tree.md` — full troubleshooting decision tree with deeper fixes
|
|
361
|
+
- `references/upgrade-migrations.md` — version-by-version breaking changes and migration scripts
|
|
362
|
+
- `references/multi-vault-patterns.md` — when to split vaults, naming conventions, sync strategy
|
|
363
|
+
|
|
364
|
+
**Rule:** Only `read` a reference doc when you need its specific content. The main SKILL.md covers 80% of cases.
|
|
365
|
+
|
|
366
|
+
## Hard constraints
|
|
367
|
+
|
|
368
|
+
- **Never** run `npm install -g` or modify system config without explicit user confirmation.
|
|
369
|
+
- **Never** write to the user's Obsidian vault without explicit per-path permission.
|
|
370
|
+
- **Never** assume Ollama is running — check first, then offer to install/start it.
|
|
371
|
+
- **Never** skip `/wiki validate` after a config change.
|
|
372
|
+
- **Always** show the command before running it for non-readonly operations.
|
|
373
|
+
- **Always** reference the docs instead of inventing your own instructions.
|
|
374
|
+
- **Always** use `subagent({ context: "fork" })` for research that would pollute the main session.
|
|
375
|
+
|
|
376
|
+
## Related skills
|
|
377
|
+
|
|
378
|
+
This skill is part of the pi-vault-mind family:
|
|
379
|
+
|
|
380
|
+
- `vault-mind-manager` — the interactive orchestrator you talk to normally
|
|
381
|
+
- `vault-mind-miner` — research and entity extraction subagent
|
|
382
|
+
- `vault-mind-broadcaster` — NotebookLM artifact generation
|
|
383
|
+
- `vault-mind-heavy-lifter` — large context window analysis (low priority, planned)
|
|
384
|
+
|
|
385
|
+
When a user pastes a marker like `@agent-miner`, the `vault-mind-miner` skill is what actually runs. This `vault-mind-setup` skill is the **onboarding and management** layer — it gets the system running, then hands off to the other skills.
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
# Obsidian CLI & Plugin Management
|
|
2
|
+
|
|
3
|
+
This document covers the **safe, official ways** to install and manage Obsidian plugins, themes, and vault state from the terminal. Two CLIs:
|
|
4
|
+
|
|
5
|
+
- **Official `obsidian` CLI** (1.12+) — requires Obsidian running, full feature parity
|
|
6
|
+
- **`notesmd-cli`** (Yakitrak) — headless, no Obsidian required
|
|
7
|
+
|
|
8
|
+
## Why two CLIs?
|
|
9
|
+
|
|
10
|
+
| | Official `obsidian` CLI | `notesmd-cli` |
|
|
11
|
+
|---|---|---|
|
|
12
|
+
| Requires Obsidian running | Yes | No |
|
|
13
|
+
| Catalyst license needed | Yes (Early access) | No |
|
|
14
|
+
| Plugin install | ✅ `plugin:install` | ❌ (manual or via Obsidian UI) |
|
|
15
|
+
| Theme install | ✅ `theme:install` | ❌ |
|
|
16
|
+
| Bases | ✅ `bases`, `base:query` | ❌ |
|
|
17
|
+
| Tasks | ✅ `tasks`, `task` | ❌ |
|
|
18
|
+
| Properties | ✅ `property:set` | ✅ `frontmatter --edit` |
|
|
19
|
+
| Files/notes CRUD | ✅ `create`, `append`, `read` | ✅ `create`, `append`, `read` |
|
|
20
|
+
| Search | ✅ `search`, `search:context` | ✅ `search-content` |
|
|
21
|
+
| Daily notes | ✅ `daily`, `daily:append` | ✅ `daily --content` |
|
|
22
|
+
| Sync | ✅ `sync:status`, `sync:history` | ❌ |
|
|
23
|
+
| Workspaces | ✅ `workspace:save/load` | ❌ |
|
|
24
|
+
| Headless | ❌ | ✅ |
|
|
25
|
+
|
|
26
|
+
**Use the official CLI when Obsidian is running and you need full feature parity (plugin/theme install, Bases, tasks, sync).**
|
|
27
|
+
|
|
28
|
+
**Use `notesmd-cli` when Obsidian is not running, or in CI/containers/agent environments where the GUI isn't available.**
|
|
29
|
+
|
|
30
|
+
## Installing the official Obsidian CLI
|
|
31
|
+
|
|
32
|
+
1. Update to Obsidian 1.12+ via the official installer (Catalyst license required for Early access).
|
|
33
|
+
2. Open Obsidian → **Settings → General → Command line interface** → enable.
|
|
34
|
+
3. Follow the prompt to register the CLI to your system PATH. This requires admin privileges:
|
|
35
|
+
- **macOS**: creates `/usr/local/bin/obsidian` symlink via system dialog
|
|
36
|
+
- **Windows**: adds `Obsidian.com` terminal redirector
|
|
37
|
+
- **Linux**: copies binary to `~/.local/bin/obsidian` (make sure it's in PATH)
|
|
38
|
+
4. Restart your terminal.
|
|
39
|
+
5. Verify: `obsidian help`, `obsidian version`.
|
|
40
|
+
|
|
41
|
+
Reference: https://help.obsidian.md/cli
|
|
42
|
+
|
|
43
|
+
## Installing `notesmd-cli`
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# macOS / Linux
|
|
47
|
+
brew tap yakitrak/yakitrak
|
|
48
|
+
brew install yakitrak/yakitrak/notesmd-cli
|
|
49
|
+
|
|
50
|
+
# Windows
|
|
51
|
+
scoop bucket add scoop-yakitrak https://github.com/yakitrak/scoop-yakitrak.git
|
|
52
|
+
scoop install notesmd-cli
|
|
53
|
+
|
|
54
|
+
# Arch
|
|
55
|
+
yay -S notesmd-cli-bin
|
|
56
|
+
|
|
57
|
+
# From source (requires Go 1.19+)
|
|
58
|
+
git clone https://github.com/Yakitrak/notesmd-cli.git
|
|
59
|
+
cd notesmd-cli && go build -o notesmd-cli .
|
|
60
|
+
sudo install -m 755 notesmd-cli /usr/local/bin/
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Plugin install — the safe path
|
|
64
|
+
|
|
65
|
+
### Via official CLI (Obsidian running)
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Disable restricted mode if needed
|
|
69
|
+
obsidian plugins:restrict off
|
|
70
|
+
|
|
71
|
+
# Install + enable in one step
|
|
72
|
+
obsidian plugin:install id=obsidian-git enable
|
|
73
|
+
obsidian plugin:install id=obsidian-breadcrumbs enable
|
|
74
|
+
obsidian plugin:install id=graph-analysis enable
|
|
75
|
+
obsidian plugin:install id=actions-uri enable
|
|
76
|
+
obsidian plugin:install id=shellcommands enable
|
|
77
|
+
obsidian plugin:install id=obsidian42-brat enable # for beta plugins
|
|
78
|
+
|
|
79
|
+
# Verify
|
|
80
|
+
obsidian plugins:enabled filter=community
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The plugin IDs are the **GitHub repo name** (lowercase, kebab-case), e.g., `obsidian-git` for `Vinzent03/obsidian-git`.
|
|
84
|
+
|
|
85
|
+
### Via Obsidian UI
|
|
86
|
+
|
|
87
|
+
Settings → Community Plugins → Browse → search → Install → Enable.
|
|
88
|
+
|
|
89
|
+
### Via BRAT (for beta plugins not in the store)
|
|
90
|
+
|
|
91
|
+
1. Install BRAT first: `obsidian plugin:install id=obsidian42-brat enable`
|
|
92
|
+
2. In Obsidian: Settings → BRAT → **Beta Plugin List** → **Add Beta Plugin**
|
|
93
|
+
3. Paste the GitHub URL of the beta plugin (e.g., `https://github.com/zsviczian/obsidian-excalidraw-plugin`)
|
|
94
|
+
4. Click **Add Plugin** → Enable
|
|
95
|
+
|
|
96
|
+
BRAT will keep the plugin updated when new commits are pushed to the source repo.
|
|
97
|
+
|
|
98
|
+
## Theme install
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# Browse themes via official CLI
|
|
102
|
+
obsidian themes
|
|
103
|
+
|
|
104
|
+
# Install + activate
|
|
105
|
+
obsidian theme:install name="Minimal" enable
|
|
106
|
+
obsidian theme:install name="AnuPpuccin" enable
|
|
107
|
+
|
|
108
|
+
# Set as active
|
|
109
|
+
obsidian theme:set name="Minimal"
|
|
110
|
+
|
|
111
|
+
# Check current
|
|
112
|
+
obsidian theme
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Workspace management
|
|
116
|
+
|
|
117
|
+
The Workspaces plugin (built-in 1.12+) lets you save and load pane layouts:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Set up your workspaces
|
|
121
|
+
obsidian workspace:save name="Inbox"
|
|
122
|
+
obsidian workspace:save name="Research"
|
|
123
|
+
obsidian workspace:save name="Code"
|
|
124
|
+
|
|
125
|
+
# List saved
|
|
126
|
+
obsidian workspaces
|
|
127
|
+
|
|
128
|
+
# Switch
|
|
129
|
+
obsidian workspace:load name="Research"
|
|
130
|
+
|
|
131
|
+
# Delete
|
|
132
|
+
obsidian workspace:delete name="OldLayout"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Bases
|
|
136
|
+
|
|
137
|
+
The official CLI has first-class Bases support:
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
# List all .base files
|
|
141
|
+
obsidian bases
|
|
142
|
+
|
|
143
|
+
# List views in a base
|
|
144
|
+
obsidian base:views file=Tasks.base
|
|
145
|
+
|
|
146
|
+
# Query a base (returns JSON)
|
|
147
|
+
obsidian base:query file=Tasks.base view="By Status" format=json
|
|
148
|
+
|
|
149
|
+
# Create new item in a base view
|
|
150
|
+
obsidian base:create file=Tasks.base view="Inbox" name="New Task" content="- [ ] Task body"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Tasks
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# List all incomplete tasks
|
|
157
|
+
obsidian tasks todo
|
|
158
|
+
|
|
159
|
+
# List tasks from today's daily note
|
|
160
|
+
obsidian tasks daily todo
|
|
161
|
+
|
|
162
|
+
# Toggle a task (file:line reference)
|
|
163
|
+
obsidian task ref="Note.md:8" toggle
|
|
164
|
+
|
|
165
|
+
# Mark done / todo
|
|
166
|
+
obsidian task file=Note line=8 done
|
|
167
|
+
obsidian task file=Note line=8 todo
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Properties (typed YAML frontmatter)
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
# Read a property
|
|
174
|
+
obsidian property:read name="status" file=Note.md
|
|
175
|
+
|
|
176
|
+
# Set a property with type
|
|
177
|
+
obsidian property:set name="status" value="done" type=text path=Note.md
|
|
178
|
+
obsidian property:set name="agent:related-to" value="[[X]]" type=list path=Note.md
|
|
179
|
+
|
|
180
|
+
# Remove
|
|
181
|
+
obsidian property:remove name="draft" file=Note.md
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## Syncing
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Check status
|
|
188
|
+
obsidian sync:status
|
|
189
|
+
|
|
190
|
+
# List history for a file
|
|
191
|
+
obsidian sync:history file=Note.md
|
|
192
|
+
|
|
193
|
+
# Read a specific version
|
|
194
|
+
obsidian sync:read file=Note.md version=3
|
|
195
|
+
|
|
196
|
+
# Restore
|
|
197
|
+
obsidian sync:restore file=Note.md version=3
|
|
198
|
+
|
|
199
|
+
# Pause / resume
|
|
200
|
+
obsidian sync off
|
|
201
|
+
obsidian sync on
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
## Headless workflow with `notesmd-cli`
|
|
205
|
+
|
|
206
|
+
When Obsidian isn't running (CI, agent environment, headless server):
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# Register a vault
|
|
210
|
+
notesmd-cli add-vault /home/user/Vaults/main --set-default
|
|
211
|
+
|
|
212
|
+
# Create a note
|
|
213
|
+
notesmd-cli create "Agent/Inbox/2026-06-06-test.md" \
|
|
214
|
+
--content "# Test note
|
|
215
|
+
|
|
216
|
+
This is a test." --overwrite
|
|
217
|
+
|
|
218
|
+
# Append
|
|
219
|
+
notesmd-cli create "Agent/Inbox/2026-06-06-test.md" \
|
|
220
|
+
--content "Appended text" --append
|
|
221
|
+
|
|
222
|
+
# Read
|
|
223
|
+
notesmd-cli print "Agent/Inbox/2026-06-06-test.md"
|
|
224
|
+
|
|
225
|
+
# Set frontmatter
|
|
226
|
+
notesmd-cli frontmatter "Note.md" --edit --key "status" --value "done"
|
|
227
|
+
|
|
228
|
+
# Search
|
|
229
|
+
notesmd-cli search-content "pi-vault-mind" --format json --no-interactive
|
|
230
|
+
|
|
231
|
+
# Move/rename
|
|
232
|
+
notesmd-cli move "old.md" "new.md"
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## When to use which
|
|
236
|
+
|
|
237
|
+
| Scenario | Use |
|
|
238
|
+
|---|---|
|
|
239
|
+
| User has Obsidian open, wants to install plugins | Official `obsidian plugin:install` |
|
|
240
|
+
| Agent (pi) needs to read/write vault files | Either, but `notesmd-cli` works without Obsidian open |
|
|
241
|
+
| CI / cron job | `notesmd-cli` |
|
|
242
|
+
| Working with Bases | Official `obsidian base:*` |
|
|
243
|
+
| Need to manage Obsidian Sync | Official `obsidian sync:*` |
|
|
244
|
+
| User on Windows without Catalyst license | `notesmd-cli` (headless alternative) |
|
|
245
|
+
| Setting up workspaces | Official `obsidian workspace:*` |
|
|
246
|
+
|
|
247
|
+
## Notes for the `kb-2024` vault
|
|
248
|
+
|
|
249
|
+
The user's `kb-2024` vault (at `/mnt/c/users/kyleb/iCloudDrive/Documents/Vaults/kb-2024/`) has 23 community plugins. Most are compatible. Notable ones to be aware of:
|
|
250
|
+
|
|
251
|
+
| Plugin | ID | Notes |
|
|
252
|
+
|---|---|---|
|
|
253
|
+
| `obsidian42-brat` | `obsidian42-brat` | How they got beta plugins like excalidraw, mermaid-popup, etc. |
|
|
254
|
+
| `obsidian-tasks-plugin` | `obsidian-tasks-plugin` | Use `obsidian task` CLI commands to toggle |
|
|
255
|
+
| `obsidian-excalidraw-plugin` | `obsidian-excalidraw-plugin` | BRAT-installed; embed `.excalidraw.md` in syntheses |
|
|
256
|
+
| `mermaid-popup` | `mermaid-popup` | Render Mermaid diagrams in pages |
|
|
257
|
+
| `obsidian-style-settings` | `obsidian-style-settings` | Vault-wide theming |
|
|
258
|
+
| `cmdr` | `cmdr` | Custom command palette — useful for agent triggers |
|
|
259
|
+
| `make-md` | `make-md` | Markdown automation — pairs with Templater |
|
|
260
|
+
|
|
261
|
+
## Safety rails
|
|
262
|
+
|
|
263
|
+
- **`obsidian plugin:install enable`** is idempotent — safe to re-run
|
|
264
|
+
- **`obsidian plugin:disable`** is reversible — no data loss
|
|
265
|
+
- **`obsidian delete file=X permanent`** is the only destructive command — defaults to trash
|
|
266
|
+
- **`notesmd-cli create --overwrite`** is destructive — confirm before running
|
|
267
|
+
- **`notesmd-cli delete`** is destructive — confirm before running
|
|
268
|
+
|
|
269
|
+
Always show the user the command before running anything that modifies or deletes files. Use `--dry-run` flags where available (the official CLI doesn't have one, but `notesmd-cli` for some commands like `frontmatter --print` is read-only).
|