@blacksmithers/vaultforge 1.0.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.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +464 -0
  3. package/dist/index.d.ts +3 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +705 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/tool-handlers.d.ts +79 -0
  8. package/dist/tool-handlers.d.ts.map +1 -0
  9. package/dist/tool-handlers.js +326 -0
  10. package/dist/tool-handlers.js.map +1 -0
  11. package/dist/tools/canvas/canvas-create.d.ts +4 -0
  12. package/dist/tools/canvas/canvas-create.d.ts.map +1 -0
  13. package/dist/tools/canvas/canvas-create.js +243 -0
  14. package/dist/tools/canvas/canvas-create.js.map +1 -0
  15. package/dist/tools/canvas/canvas-patch.d.ts +4 -0
  16. package/dist/tools/canvas/canvas-patch.d.ts.map +1 -0
  17. package/dist/tools/canvas/canvas-patch.js +225 -0
  18. package/dist/tools/canvas/canvas-patch.js.map +1 -0
  19. package/dist/tools/canvas/canvas-read.d.ts +4 -0
  20. package/dist/tools/canvas/canvas-read.d.ts.map +1 -0
  21. package/dist/tools/canvas/canvas-read.js +97 -0
  22. package/dist/tools/canvas/canvas-read.js.map +1 -0
  23. package/dist/tools/canvas/canvas-relayout.d.ts +4 -0
  24. package/dist/tools/canvas/canvas-relayout.d.ts.map +1 -0
  25. package/dist/tools/canvas/canvas-relayout.js +152 -0
  26. package/dist/tools/canvas/canvas-relayout.js.map +1 -0
  27. package/dist/tools/canvas/canvas-utils.d.ts +40 -0
  28. package/dist/tools/canvas/canvas-utils.d.ts.map +1 -0
  29. package/dist/tools/canvas/canvas-utils.js +141 -0
  30. package/dist/tools/canvas/canvas-utils.js.map +1 -0
  31. package/dist/tools/canvas/layout-engine.d.ts +34 -0
  32. package/dist/tools/canvas/layout-engine.d.ts.map +1 -0
  33. package/dist/tools/canvas/layout-engine.js +75 -0
  34. package/dist/tools/canvas/layout-engine.js.map +1 -0
  35. package/dist/tools/canvas/types.d.ts +71 -0
  36. package/dist/tools/canvas/types.d.ts.map +1 -0
  37. package/dist/tools/canvas/types.js +2 -0
  38. package/dist/tools/canvas/types.js.map +1 -0
  39. package/dist/tools/files/batch-rename.d.ts +4 -0
  40. package/dist/tools/files/batch-rename.d.ts.map +1 -0
  41. package/dist/tools/files/batch-rename.js +140 -0
  42. package/dist/tools/files/batch-rename.js.map +1 -0
  43. package/dist/tools/files/delete-folder.d.ts +17 -0
  44. package/dist/tools/files/delete-folder.d.ts.map +1 -0
  45. package/dist/tools/files/delete-folder.js +100 -0
  46. package/dist/tools/files/delete-folder.js.map +1 -0
  47. package/dist/tools/files/prune-empty-dirs.d.ts +17 -0
  48. package/dist/tools/files/prune-empty-dirs.d.ts.map +1 -0
  49. package/dist/tools/files/prune-empty-dirs.js +106 -0
  50. package/dist/tools/files/prune-empty-dirs.js.map +1 -0
  51. package/dist/tools/intelligence/clustering.d.ts +15 -0
  52. package/dist/tools/intelligence/clustering.d.ts.map +1 -0
  53. package/dist/tools/intelligence/clustering.js +93 -0
  54. package/dist/tools/intelligence/clustering.js.map +1 -0
  55. package/dist/tools/intelligence/tfidf.d.ts +19 -0
  56. package/dist/tools/intelligence/tfidf.d.ts.map +1 -0
  57. package/dist/tools/intelligence/tfidf.js +68 -0
  58. package/dist/tools/intelligence/tfidf.js.map +1 -0
  59. package/dist/tools/intelligence/vault-suggest.d.ts +7 -0
  60. package/dist/tools/intelligence/vault-suggest.d.ts.map +1 -0
  61. package/dist/tools/intelligence/vault-suggest.js +307 -0
  62. package/dist/tools/intelligence/vault-suggest.js.map +1 -0
  63. package/dist/tools/intelligence/vault-themes.d.ts +30 -0
  64. package/dist/tools/intelligence/vault-themes.d.ts.map +1 -0
  65. package/dist/tools/intelligence/vault-themes.js +88 -0
  66. package/dist/tools/intelligence/vault-themes.js.map +1 -0
  67. package/dist/tools/links/backlinks.d.ts +4 -0
  68. package/dist/tools/links/backlinks.d.ts.map +1 -0
  69. package/dist/tools/links/backlinks.js +50 -0
  70. package/dist/tools/links/backlinks.js.map +1 -0
  71. package/dist/tools/links/link-utils.d.ts +23 -0
  72. package/dist/tools/links/link-utils.d.ts.map +1 -0
  73. package/dist/tools/links/link-utils.js +63 -0
  74. package/dist/tools/links/link-utils.js.map +1 -0
  75. package/dist/tools/links/update-links.d.ts +16 -0
  76. package/dist/tools/links/update-links.d.ts.map +1 -0
  77. package/dist/tools/links/update-links.js +88 -0
  78. package/dist/tools/links/update-links.js.map +1 -0
  79. package/dist/tools/metadata/frontmatter.d.ts +12 -0
  80. package/dist/tools/metadata/frontmatter.d.ts.map +1 -0
  81. package/dist/tools/metadata/frontmatter.js +190 -0
  82. package/dist/tools/metadata/frontmatter.js.map +1 -0
  83. package/dist/tools/notes/edit-regex.d.ts +4 -0
  84. package/dist/tools/notes/edit-regex.d.ts.map +1 -0
  85. package/dist/tools/notes/edit-regex.js +142 -0
  86. package/dist/tools/notes/edit-regex.js.map +1 -0
  87. package/dist/tools/search/markdown-parser.d.ts +12 -0
  88. package/dist/tools/search/markdown-parser.d.ts.map +1 -0
  89. package/dist/tools/search/markdown-parser.js +64 -0
  90. package/dist/tools/search/markdown-parser.js.map +1 -0
  91. package/dist/tools/search/orama-engine.d.ts +76 -0
  92. package/dist/tools/search/orama-engine.d.ts.map +1 -0
  93. package/dist/tools/search/orama-engine.js +152 -0
  94. package/dist/tools/search/orama-engine.js.map +1 -0
  95. package/dist/tools/search/search-reindex.d.ts +7 -0
  96. package/dist/tools/search/search-reindex.d.ts.map +1 -0
  97. package/dist/tools/search/search-reindex.js +34 -0
  98. package/dist/tools/search/search-reindex.js.map +1 -0
  99. package/dist/tools/search/smart-search.d.ts +7 -0
  100. package/dist/tools/search/smart-search.d.ts.map +1 -0
  101. package/dist/tools/search/smart-search.js +102 -0
  102. package/dist/tools/search/smart-search.js.map +1 -0
  103. package/dist/vault-index.d.ts +95 -0
  104. package/dist/vault-index.d.ts.map +1 -0
  105. package/dist/vault-index.js +432 -0
  106. package/dist/vault-index.js.map +1 -0
  107. package/package.json +60 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Solutions Forge LTDA
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.
package/README.md ADDED
@@ -0,0 +1,464 @@
1
+ <p align="center">
2
+ <img src="assets/vaultforge-logo.svg" alt="VaultForge" width="420" />
3
+ </p>
4
+
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/@blacksmithers/vaultforge"><img src="https://img.shields.io/npm/v/@blacksmithers/vaultforge.svg" alt="npm version" /></a>
7
+ <a href="https://github.com/blacksmithers/vaultforge/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="license" /></a>
8
+ <a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D22-brightgreen.svg" alt="node version" /></a>
9
+ <a href="https://github.com/blacksmithers/vaultforge/actions"><img src="https://github.com/blacksmithers/vaultforge/actions/workflows/ci.yml/badge.svg" alt="CI" /></a>
10
+ </p>
11
+
12
+ <h3 align="center">The most capable MCP server for Obsidian.</h3>
13
+
14
+ <p align="center">
15
+ <strong>27 tools</strong> · Canvas with auto-layout · BM25 smart search · Vault intelligence<br/>
16
+ No Obsidian plugin required · Works on macOS, Linux, Windows
17
+ </p>
18
+
19
+ <p align="center">
20
+ <a href="#canvas-tools">Canvas</a> ·
21
+ <a href="#smart-search">Search</a> ·
22
+ <a href="#vault-intelligence">Intelligence</a> ·
23
+ <a href="#all-tools">All 27 Tools</a> ·
24
+ <a href="#quick-start">Quick Start</a>
25
+ </p>
26
+
27
+ ---
28
+
29
+ ## The Problem with Every Other Obsidian MCP
30
+
31
+ I checked them all — mcp-obsidian, mcpvault, obsidian-mcp-server, obsidian-mcp-tools, obsidian-mcp-plugin. They read files. They write files. Some search. That's it.
32
+
33
+ None of them can create a visual diagram. None of them rank search results by relevance. None of them can tell an agent *"here are the 12 themes in this vault and which files belong to which."*
34
+
35
+ VaultForge does all three.
36
+
37
+ | Feature | VaultForge | mcp-obsidian | mcpvault | obsidian-mcp-server |
38
+ |---------|:-:|:-:|:-:|:-:|
39
+ | Read / Write / Delete notes | ✅ | ✅ | ✅ | ✅ |
40
+ | Full-text search | ✅ | ✅ | ✅ | ✅ |
41
+ | Edit in-place | ✅ | ❌ | ✅ | ❌ |
42
+ | Batch operations | ✅ | ❌ | ❌ | ❌ |
43
+ | Daily notes | ✅ | ❌ | ❌ | ✅ |
44
+ | Vault stats | ✅ | ❌ | ✅ | ❌ |
45
+ | **Canvas — create with auto-layout** | ✅ | ❌ | ❌ | ❌ |
46
+ | **Canvas — semantic read** | ✅ | ❌ | ❌ | ❌ |
47
+ | **Canvas — patch (add/remove/update)** | ✅ | ❌ | ❌ | ❌ |
48
+ | **Canvas — re-layout (dagre)** | ✅ | ❌ | ❌ | ❌ |
49
+ | **BM25 smart search (Orama)** | ✅ | ❌ | ❌ | ❌ |
50
+ | **Vault theme mapping (TF-IDF)** | ✅ | ❌ | ❌ | ❌ |
51
+ | **Vault reorganization engine** | ✅ | ❌ | ❌ | ❌ |
52
+ | **Regex find-and-replace (grep-sub)** | ✅ | ❌ | ❌ | ❌ |
53
+ | **Batch rename / move with link updates** | ✅ | ❌ | ❌ | ❌ |
54
+ | **Backlink analysis** | ✅ | ❌ | ❌ | ❌ |
55
+ | **Frontmatter as structured data** | ✅ | ❌ | ❌ | ❌ |
56
+ | **Directory management (delete, prune)** | ✅ | ❌ | ❌ | ❌ |
57
+ | No Obsidian plugin required | ✅ | ❌ | ✅ | ❌ |
58
+
59
+ ---
60
+
61
+ ## Fewer Tokens. Same Intelligence.
62
+
63
+ The other Obsidian MCPs weren't designed for AI agents — they were designed for humans who happen to use AI. Every tool returns raw, verbose data that burns through context windows. VaultForge is **AI-infrastructure**: every response is shaped to minimize token consumption while maximizing semantic density.
64
+
65
+ | Operation | Traditional MCP | VaultForge | Savings |
66
+ |---|---|---|---|
67
+ | Read a canvas | Raw JSON — coordinates, hex IDs, pixel dimensions | Semantic graph: labels + connections only | ~70-80% fewer tokens |
68
+ | Search vault | Unranked grep dump — agent reads 50 results to find 3 | BM25-ranked top results with relevance scores | ~90% fewer tokens |
69
+ | Understand vault structure | Agent reads files one by one (N calls × M tokens each) | One `vault_themes()` call returns clustered map | ~95% fewer tokens |
70
+
71
+ Tokens = API cost, context window space, and latency. Fewer tokens means faster, cheaper, smarter agents.
72
+
73
+ ---
74
+
75
+ ## Three Things No Other MCP Can Do
76
+
77
+ ### 🎨 Canvas Tools
78
+
79
+ > The agent thinks in graphs. The tool thinks in pixels.
80
+
81
+ AI agents create, read, modify, and re-layout [JSON Canvas](https://jsoncanvas.org/) files without touching a single coordinate. The agent describes a semantic graph. VaultForge calculates all geometry using [dagre](https://github.com/dagrejs/dagre) — the same Sugiyama layout engine behind Mermaid and React Flow.
82
+
83
+ **canvas_create** — describe nodes and edges, get a fully laid-out `.canvas` file:
84
+
85
+ ```
86
+ Agent sends: Obsidian renders:
87
+
88
+ nodes: ┌───────────┐
89
+ - API Gateway │ API │───┐
90
+ - Auth Service │ Gateway │ │
91
+ - Database └───────────┘ │
92
+ - Cache ┌───────────┐ │ ┌───────────┐
93
+ edges: │ Auth │───┼──▶│ Database │
94
+ - API Gateway → Auth Service │ Service │ │ └───────────┘
95
+ - API Gateway → Cache └───────────┘ │
96
+ - Auth Service → Database │ ┌───────────┐
97
+ - Cache → Database └──▶│ Cache │
98
+ layout: { direction: "LR" } └───────────┘
99
+ ```
100
+
101
+ **canvas_read** — semantic graph, not raw JSON:
102
+
103
+ ```
104
+ Instead of: {"id":"231bf38f","x":-635,"y":-420,"width":250,"height":70,...}
105
+ Agent gets: { label: "AXON", connections: ["Strategy", "AWS", "Resistance"] }
106
+ ```
107
+
108
+ A typical canvas with 15 nodes returns ~200 tokens as a semantic graph vs ~2,000+ tokens as raw JSON Canvas. The agent gets the same information at 10% of the cost.
109
+
110
+ **canvas_patch** — modify with relative positioning:
111
+
112
+ ```
113
+ add_nodes: [{ label: "New Module", near: "API Gateway", position: "below" }]
114
+ remove_nodes: ["Deprecated Service"] → cascade-removes all connected edges
115
+ ```
116
+
117
+ **canvas_relayout** — fix a messy canvas with one call. Preview before committing.
118
+
119
+ ---
120
+
121
+ ### 🔍 Smart Search
122
+
123
+ > Not grep. Elasticsearch-grade.
124
+
125
+ [Orama](https://github.com/oramasearch/orama) BM25-ranked search with typo tolerance, stemming (26 languages), and field boosting. No ML, no API keys, no internet.
126
+
127
+ ```
128
+ smart_search("stripe webhook")
129
+
130
+ → Stripe-Webhooks.md score: 0.92
131
+ "...webhook endpoint configuration for handling Stripe events..."
132
+
133
+ → Refactor-Prompts.md score: 0.61
134
+ "...refactor the Stripe integration to use webhook signatures..."
135
+
136
+ vs search_content("stripe webhook")
137
+ → Returns EVERY file containing "stripe", unranked, no scoring
138
+ ```
139
+
140
+ Unranked grep forces the agent to consume every result to find relevance. BM25 puts the answer at the top. Fewer results read = fewer tokens burned = faster, cheaper responses.
141
+
142
+ **Field boosting:** title (3×) > tags (2.5×) > headings (2×) > content (1×).
143
+
144
+ **Persistent index** at `.vaultforge/search-index.json` — survives restarts.
145
+
146
+ ---
147
+
148
+ ### 🧠 Vault Intelligence
149
+
150
+ > Your vault has folders. Now it has a map.
151
+
152
+ Files land where the energy of the moment puts them. Themes bleed across folders — "SpecForge" ends up in `Projetos/`, `AI/prompts/`, `Content/`, and `Empresas/`. Nobody maintains a perfect taxonomy.
153
+
154
+ **vault_themes** — scans every file, extracts distinctive terms via TF-IDF, clusters by similarity:
155
+
156
+ ```json
157
+ {
158
+ "themes": [
159
+ {
160
+ "label": "SpecForge Frontend",
161
+ "key_terms": ["impl", "dashboard", "widget"],
162
+ "files": 12,
163
+ "folders": ["32-AI/prompts/specforge"],
164
+ "coherence": 0.89
165
+ },
166
+ {
167
+ "label": "Content Strategy",
168
+ "files": 6,
169
+ "folders": ["80-Content", "70-Empresas"],
170
+ "cross_folder": true
171
+ }
172
+ ],
173
+ "orphans": 5,
174
+ "cross_folder_warnings": 3
175
+ }
176
+ ```
177
+
178
+ Without this, an agent needs to `read_note` on every file individually to understand vault structure — hundreds of tool calls, thousands of tokens. One `vault_themes()` call replaces all of them.
179
+
180
+ **vault_suggest** — actionable reorganization from the atlas:
181
+
182
+ ```json
183
+ {
184
+ "suggestions": [
185
+ { "type": "consolidate", "action": "Move Launch-Strategy.md → 80-Content/" },
186
+ { "type": "create_moc", "action": "Create MOC-SpecForge-Frontend.md linking 12 files" },
187
+ { "type": "archive", "action": "Move 8 stale files to 90-Archive/" }
188
+ ]
189
+ }
190
+ ```
191
+
192
+ **The full workflow:**
193
+
194
+ ```
195
+ "Organize my vault"
196
+ → vault_themes() maps 179 files into 15 themes
197
+ → vault_suggest() generates 20 reorganization actions
198
+ → human approves "do it, skip the archive stuff"
199
+ → batch execution moves files, creates MOCs
200
+ → canvas_create() visual theme map in Obsidian
201
+ ```
202
+
203
+ The vault maps itself.
204
+
205
+ ---
206
+
207
+ ## All Tools
208
+
209
+ ### Notes (6)
210
+ | Tool | What it does |
211
+ |------|-------------|
212
+ | `read_note` | Read content + metadata. Fuzzy path resolution. |
213
+ | `write_note` | Create or overwrite. |
214
+ | `edit_note` | In-place find and replace. Exact match, must be unique. |
215
+ | `edit_regex` | Regex find-and-replace. Single file or grep-sub across vault. Capture groups, dry run. |
216
+ | `append_note` | Append to existing, or create if missing. |
217
+ | `delete_note` | Move to `.trash` (safe) or permanent. Optional `cleanup_empty_parents` removes empty parent dirs. |
218
+
219
+ ### Search & Discovery (8)
220
+ | Tool | What it does |
221
+ |------|-------------|
222
+ | `smart_search` | **BM25-ranked.** Typo tolerance, field boosting, snippets. |
223
+ | `search_reindex` | Force re-index after bulk operations. |
224
+ | `search_vault` | Fast filename/path search from in-memory index. |
225
+ | `search_content` | Full-text grep. For exact/literal matches. |
226
+ | `list_dir` | Directory listing with created/modified timestamps. Sort by name, date, or size. |
227
+ | `recent_notes` | Recently modified files. Instant from index. |
228
+ | `daily_note` | Today's daily note (or any date). |
229
+ | `vault_status` | File counts, types, index health. |
230
+
231
+ ### Files (3)
232
+ | Tool | What it does |
233
+ |------|-------------|
234
+ | `batch_rename` | Rename/move files. Explicit pairs or regex patterns. Auto-updates wikilinks. Dry run default. |
235
+ | `delete_folder` | Delete empty or non-empty directories. Moves to `.trash` by default. Safety guards for `.obsidian`, `.git`, `.trash`. |
236
+ | `prune_empty_dirs` | Find and remove all empty directories. Dry run default. Bottom-up pruning handles cascading empty dirs. |
237
+
238
+ ### Links (2)
239
+ | Tool | What it does |
240
+ |------|-------------|
241
+ | `update_links` | Update all wikilinks across vault after moving/renaming a file. Dry run default. |
242
+ | `backlinks` | Find all files that link to a given file. Line numbers, context, embed detection. |
243
+
244
+ ### Metadata (1)
245
+ | Tool | What it does |
246
+ |------|-------------|
247
+ | `frontmatter` | Read/write/merge YAML frontmatter as structured data. No string parsing needed. |
248
+
249
+ ### Canvas (4)
250
+ | Tool | What it does |
251
+ |------|-------------|
252
+ | `canvas_create` | Semantic graph → auto-laid-out `.canvas` via dagre. |
253
+ | `canvas_read` | Canvas → semantic graph (labels + connections, not coordinates). |
254
+ | `canvas_patch` | Add/remove/update with relative positioning + fuzzy matching. |
255
+ | `canvas_relayout` | Re-layout existing canvas. Preview before committing. |
256
+
257
+ ### Intelligence (2)
258
+ | Tool | What it does |
259
+ |------|-------------|
260
+ | `vault_themes` | TF-IDF theme extraction + clustering. Vault atlas with cross-folder warnings. |
261
+ | `vault_suggest` | Reorganization engine: consolidate, create MOCs, archive stale, triage orphans. |
262
+
263
+ ### Batch (1)
264
+ | Tool | What it does |
265
+ |------|-------------|
266
+ | `batch` | Execute multiple operations — read, write, edit, regex, rename, frontmatter, delete. Delete ops support `cleanup_empty_parents`. |
267
+
268
+ ---
269
+
270
+ ## Quick Start
271
+
272
+ ### Prerequisites
273
+
274
+ - [Node.js](https://nodejs.org/) v22+
275
+ - A folder with Markdown files (Obsidian vault or any structure)
276
+
277
+ **Obsidian app is not required.** VaultForge operates directly on the filesystem. If Obsidian is open, it picks up changes in real time.
278
+
279
+ ### Install
280
+
281
+ ```bash
282
+ npm install -g @blacksmithers/vaultforge
283
+ ```
284
+
285
+ ### Configure
286
+
287
+ **Claude Desktop** — edit `claude_desktop_config.json`:
288
+
289
+ | OS | Config file location |
290
+ |----|---------------------|
291
+ | macOS | `~/Library/Application Support/Claude/claude_desktop_config.json` |
292
+ | Windows | `%APPDATA%\Claude\claude_desktop_config.json` |
293
+ | Linux | `~/.config/Claude/claude_desktop_config.json` |
294
+
295
+ > **Tip (Windows):** press `Win+R`, paste `%APPDATA%\Claude`, hit Enter. The folder opens directly.
296
+
297
+ macOS / Linux:
298
+ ```json
299
+ {
300
+ "mcpServers": {
301
+ "vaultforge": {
302
+ "command": "vaultforge",
303
+ "args": ["/Users/you/Documents/MyVault"]
304
+ }
305
+ }
306
+ }
307
+ ```
308
+
309
+ Windows:
310
+ ```json
311
+ {
312
+ "mcpServers": {
313
+ "vaultforge": {
314
+ "command": "vaultforge",
315
+ "args": ["C:\\Users\\you\\Documents\\MyVault"]
316
+ }
317
+ }
318
+ }
319
+ ```
320
+
321
+ **Claude Code:**
322
+
323
+ ```bash
324
+ claude mcp add vaultforge -- vaultforge /path/to/your/vault
325
+ ```
326
+
327
+ ### Verify
328
+
329
+ Ask your AI assistant: *"List the files in my vault"* — if it responds with your vault contents, you're connected.
330
+
331
+ ---
332
+
333
+ ## Under the Hood
334
+
335
+ ### Three Engines, One Index
336
+
337
+ ```
338
+ @orama/orama (BM25 index — single source of truth)
339
+ ├── smart_search query-driven "find files about X"
340
+ ├── vault_themes corpus-driven "what themes exist?"
341
+ └── vault_suggest action-driven "how should I reorganize?"
342
+
343
+ @dagrejs/dagre (Sugiyama graph layout)
344
+ ├── canvas_create semantic graph → positioned canvas
345
+ ├── canvas_patch relative edits → absolute coordinates
346
+ └── canvas_relayout messy canvas → optimized layout
347
+
348
+ Wikilink engine (zero dependencies)
349
+ ├── update_links safe moves with automatic link repair
350
+ ├── backlinks impact analysis before moves/deletes
351
+ └── batch_rename rename + link update in one operation
352
+ ```
353
+
354
+ ### Dependencies
355
+
356
+ Two packages. Both MIT, TypeScript-native, zero sub-dependencies:
357
+
358
+ | Package | Purpose | Size |
359
+ |---------|---------|------|
360
+ | [`@dagrejs/dagre`](https://github.com/dagrejs/dagre) | Sugiyama graph layout | ~15KB |
361
+ | [`@orama/orama`](https://github.com/oramasearch/orama) | BM25 search engine | ~2KB core |
362
+
363
+ ### Architecture
364
+
365
+ ```
366
+ src/
367
+ ├── tools/
368
+ │ ├── notes/ read, write, edit, edit_regex, append, delete
369
+ │ │ └── edit-regex.ts regex find-and-replace
370
+ │ ├── files/ rename, move, directory management
371
+ │ │ ├── batch-rename.ts rename/move with link updates
372
+ │ │ ├── delete-folder.ts delete directories with safety guards
373
+ │ │ └── prune-empty-dirs.ts find and remove empty directories
374
+ │ ├── links/ wikilink management
375
+ │ │ ├── link-utils.ts shared wikilink regex engine
376
+ │ │ ├── update-links.ts fix links after moves
377
+ │ │ └── backlinks.ts impact analysis
378
+ │ ├── metadata/ frontmatter operations
379
+ │ │ └── frontmatter.ts read/write/merge YAML frontmatter
380
+ │ ├── search/ search_vault, search_content, list_dir, recent, daily, status
381
+ │ │ ├── smart-search.ts BM25 search via Orama
382
+ │ │ ├── search-reindex.ts full/incremental re-index
383
+ │ │ ├── orama-engine.ts Orama wrapper + persistence
384
+ │ │ └── markdown-parser.ts strip md, extract frontmatter/headings
385
+ │ ├── intelligence/ vault analysis + reorganization
386
+ │ │ ├── vault-themes.ts TF-IDF extraction + clustering
387
+ │ │ └── vault-suggest.ts suggestions + batch execution
388
+ │ ├── canvas/ JSON Canvas (jsoncanvas.org spec v1.0)
389
+ │ │ ├── canvas-create.ts
390
+ │ │ ├── canvas-read.ts
391
+ │ │ ├── canvas-patch.ts
392
+ │ │ ├── canvas-relayout.ts
393
+ │ │ ├── layout-engine.ts dagre wrapper + edge side calc
394
+ │ │ ├── canvas-utils.ts ID gen, text height, fuzzy match
395
+ │ │ └── types.ts
396
+ │ └── batch/ multi-operation execution
397
+ ```
398
+
399
+ ---
400
+
401
+ ## Roadmap
402
+
403
+ What's coming next. Ordered by priority — community input shapes the sequence.
404
+
405
+ ### v0.6.0 — Vault Graph & Tags
406
+ - **`vault_graph`** — Export the vault's link graph as a JSON adjacency list. Nodes = files, edges = wikilinks. Enables agents to reason about knowledge structure, find clusters, detect orphans, and identify bridge notes. Output compatible with D3, Cytoscape, or canvas_create for visual rendering.
407
+ - **`tag_search`** — Search by YAML frontmatter tags, separate from content search. Filter by tag combinations (`tag:draft AND tag:specforge`). Returns files with matching tags plus their frontmatter metadata.
408
+ - **`diff_note`** — Compare two notes (or two versions of the same note) and return a structured diff. Useful for agents reviewing changes, merging edits, or auditing vault history.
409
+
410
+ ### v0.7.0 — Template Engine & Smart Create
411
+ - **`template_create`** — Create notes from templates with variable substitution (`{{date}}`, `{{title}}`, `{{tags}}`). Supports custom template folders. The agent describes intent, the tool handles boilerplate.
412
+ - **`smart_create`** — AI-aware note creation. Analyzes vault themes and suggests optimal location, tags, and links for new notes. "Write about X" → creates the note in the right folder with relevant backlinks.
413
+
414
+ ### v0.8.0 — Performance at Scale
415
+ - Large vault optimization (10k+ files) — incremental indexing, lazy loading, memory-mapped file access
416
+ - Parallel batch operations where order independence allows
417
+ - Index compression for faster startup on large vaults
418
+ - Benchmark suite with reproducible performance targets
419
+
420
+ ### v1.0.0 — Stability & Ecosystem
421
+ - Comprehensive test suite with >90% coverage
422
+ - Stable API — no breaking changes without major version bump
423
+ - Plugin ecosystem hooks — allow community extensions
424
+ - Published to MCP registry
425
+ - Obsidian community plugin (optional companion for enhanced integration)
426
+
427
+ ### Community-Driven
428
+ Open an issue tagged `roadmap` to propose features. The most-requested items move up the queue. This is an open forge — the community shapes the steel.
429
+
430
+ ---
431
+
432
+ ## The Forge is Open
433
+
434
+ VaultForge is the first open-source tool from the **Blacksmithers** — a community of builders who forge tools that build things.
435
+
436
+ We don't wrap APIs and call it innovation. We build real engines — BM25 search, graph layout, TF-IDF clustering — because the tools AI agents use should be as rigorous as the agents themselves.
437
+
438
+ **If that resonates, you're already one of us.**
439
+
440
+ ### Contributing
441
+
442
+ Open an issue first to discuss changes. PRs welcome — especially for:
443
+
444
+ - Semantic similarity search (embedding-based, complementing BM25)
445
+ - Canvas layout algorithms beyond Sugiyama (force-directed, circular)
446
+ - Performance improvements for large vaults (10k+ files)
447
+ - Windows-specific edge cases and path handling
448
+ - New language stemmers for smart search
449
+
450
+ ### Community
451
+
452
+ - 🔨 [blacksmithers.dev](https://blacksmithers.dev) — The movement
453
+ - 🐦 [@gabgforge](https://x.com/gabgforge) — Engineer · Founder · Blacksmither
454
+ - 💬 [GitHub Discussions](https://github.com/orgs/blacksmithers/discussions) — Ideas, feedback, show & tell
455
+
456
+ ### License
457
+
458
+ [MIT](LICENSE) — [Solutions Forge LTDA](https://solutionsforge.tech)
459
+
460
+ ---
461
+
462
+ <p align="center">
463
+ <strong>Stop automating spreadsheets. Start forging.</strong>
464
+ </p>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}