sverklo 0.9.4 → 0.10.1

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/README.md CHANGED
@@ -1,24 +1,14 @@
1
1
  # Sverklo
2
2
 
3
- _Sverklo_ (Russian: **сверкло**, _SVERK-lo_) archaic past tense of "сверкнуть," to flash or gleam. Code intelligence that illuminates your repo so your AI assistant stops guessing.
3
+ Local-first code intelligence MCP server. Semantic search, symbol graph, blast-radius analysis, diff-aware PR review, and git-pinned memory for Claude Code, Cursor, Windsurf, and any MCP client.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/sverklo.svg?color=E85A2A)](https://www.npmjs.com/package/sverklo)
6
6
  [![npm downloads](https://img.shields.io/npm/dw/sverklo.svg?color=E85A2A)](https://www.npmjs.com/package/sverklo)
7
- [![GitHub stars](https://img.shields.io/github/stars/sverklo/sverklo?style=flat&color=E85A2A)](https://github.com/sverklo/sverklo)
8
7
  [![License: MIT](https://img.shields.io/badge/license-MIT-E85A2A.svg)](LICENSE)
9
- [![Local-first](https://img.shields.io/badge/local--first-no%20cloud-E85A2A)](#)
10
-
11
- > **MIT Licensed** — the only fully open-source code intelligence MCP. Free for commercial use, no restrictions. [Compare with alternatives →](#why-not-as-of-2026-04)
12
-
13
- [![Star History Chart](https://api.star-history.com/svg?repos=sverklo/sverklo&type=Date)](https://star-history.com/#sverklo/sverklo&Date)
14
8
 
15
9
  ![Sverklo demo — audit and badge](./docs/demo.gif)
16
10
 
17
- ## Stop re-explaining your codebase to your AI.
18
-
19
- Sverklo is a local-first code intelligence MCP server that gives **Claude Code, Cursor, Windsurf, VS Code, JetBrains, and Google Antigravity** the same mental model of your repo that a senior engineer has. Hybrid semantic search, symbol-level blast-radius analysis, diff-aware PR review, and memory pinned to git state — running entirely on your laptop.
20
-
21
- ### The problem
11
+ ## The problem
22
12
 
23
13
  Your AI agent edits `UserService.validate()`. It doesn't know that 47 other functions call it. Breaking changes ship. Tests pass because they mock the dependency.
24
14
 
@@ -39,21 +29,6 @@ cd your-project && sverklo init
39
29
 
40
30
  `sverklo init` auto-detects your installed AI coding agents, writes the right MCP config files, appends sverklo instructions to your `CLAUDE.md`, and runs `sverklo doctor` to verify the setup. MIT licensed. Zero config. No API keys.
41
31
 
42
- ### Works with every MCP editor
43
-
44
- | Editor | MCP | Skills | Hooks | Auto-setup |
45
- |--------|:---:|:------:|:-----:|:----------:|
46
- | Claude Code | ✓ | ✓ | ✓ | `sverklo init` |
47
- | Cursor | ✓ | — | — | `sverklo init` |
48
- | Windsurf | ✓ | — | — | `sverklo init` |
49
- | Zed | ✓ | — | — | `sverklo init` |
50
- | VS Code | ✓ | — | — | manual |
51
- | JetBrains | ✓ | — | — | manual |
52
- | Antigravity | ✓ | — | — | `sverklo init` |
53
- | OpenCode | ✓ | — | — | manual |
54
-
55
- > **First 5 minutes:** see [`FIRST_RUN.md`](FIRST_RUN.md) for three scripted prompts that demonstrate the tools sverklo adds that grep can't replace.
56
-
57
32
  ---
58
33
 
59
34
  ## Grep vs Sverklo — the same question, side by side
@@ -62,44 +37,44 @@ Every one of these is a query a real engineer asked a real AI assistant last wee
62
37
 
63
38
  | The question | With Grep | With Sverklo |
64
39
  |---|---|---|
65
- | "Where is auth handled in this repo?" | `grep -r 'auth' .` 847 matches across tests, comments, unrelated vars, and one 2021 TODO | `sverklo_search "authentication flow"` top 5 files ranked by PageRank: middleware, JWT verifier, session store, login route, logout route |
66
- | "Can I safely rename `BillingAccount.charge`?" | `grep '\.charge('` 312 matches polluted by `recharge`, `discharge`, `Battery.charge` fixtures | `sverklo_impact BillingAccount.charge` 14 real callers, depth-ranked, with file paths and line numbers |
67
- | "Is this helper actually used anywhere?" | `grep -r 'parseFoo' .` 4 matches in 3 files. Are any real, or just string mentions? Read each one. | `sverklo_refs parseFoo` 0 real callers. Zero. Walk the symbol graph, not the text. Delete the function. |
68
- | "What's load-bearing in this codebase?" | `find . -name '*.ts' \| xargs wc -l \| sort` the biggest files. Not the most important ones. | `sverklo_overview` PageRank over the dep graph. The files the rest of the repo depends on, not the ones someone wrote too much code in. |
69
- | "Review this 40-file PR — what should I read first?" | Read them in the order git diff printed them | `sverklo_review_diff` risk-scored per file (touched-symbol importance × coverage × churn), prioritized order, flagged production files with no test changes |
40
+ | "Where is auth handled in this repo?" | `grep -r 'auth' .` -- 847 matches across tests, comments, unrelated vars, and one 2021 TODO | `sverklo_search "authentication flow"` -- top 5 files ranked by PageRank: middleware, JWT verifier, session store, login route, logout route |
41
+ | "Can I safely rename `BillingAccount.charge`?" | `grep '\.charge('` -- 312 matches polluted by `recharge`, `discharge`, `Battery.charge` fixtures | `sverklo_impact BillingAccount.charge` -- 14 real callers, depth-ranked, with file paths and line numbers |
42
+ | "Is this helper actually used anywhere?" | `grep -r 'parseFoo' .` -- 4 matches in 3 files. Are any real, or just string mentions? Read each one. | `sverklo_refs parseFoo` -- 0 real callers. Zero. Walk the symbol graph, not the text. Delete the function. |
43
+ | "What's load-bearing in this codebase?" | `find . -name '*.ts' \| xargs wc -l \| sort` -- the biggest files. Not the most important ones. | `sverklo_overview` -- PageRank over the dep graph. The files the rest of the repo depends on, not the ones someone wrote too much code in. |
44
+ | "Review this 40-file PR — what should I read first?" | Read them in the order git diff printed them | `sverklo_review_diff` -- risk-scored per file (touched-symbol importance x coverage x churn), prioritized order, flagged production files with no test changes |
70
45
 
71
46
  If the answer to your question is "exact string X exists somewhere," grep wins. Use grep. If the answer is "which 5 files actually matter here, ranked by the graph," you need sverklo.
72
47
 
73
48
  ---
74
49
 
75
- ## When to reach for sverklo — and when not to
76
-
77
- We're honest about this. Sverklo isn't a magic 5× speedup and it doesn't replace grep. It's a sharper tool for specific jobs.
78
-
79
- ### The two tools that earn their keep every time
50
+ ## Works with every MCP editor
80
51
 
81
- If you only remember two, remember these. They deliver value that plain text search structurally cannot:
82
-
83
- 1. **`sverklo_refs`** proves dead code with certainty (zero references across the whole symbol graph, not just the files grep happened to scan) and answers "is this actually used anywhere?" in one call.
84
- 2. **`sverklo_audit`** one structural pass that surfaces god classes, hub files, and suspicious concentrations of complexity without you having to guess the right regex.
52
+ | Editor | MCP | Skills | Hooks | Auto-setup |
53
+ |--------|:---:|:------:|:-----:|:----------:|
54
+ | Claude Code | yes | yes | yes | `sverklo init` |
55
+ | Cursor | yes | | | `sverklo init` |
56
+ | Windsurf | yes | — | — | `sverklo init` |
57
+ | Zed | yes | — | — | `sverklo init` |
58
+ | VS Code | yes | — | — | manual |
59
+ | JetBrains | yes | — | — | manual |
60
+ | Antigravity | yes | — | — | `sverklo init` |
61
+ | Any MCP client | yes | — | — | `npx sverklo /path` |
85
62
 
86
- ### When grep is still the right tool
63
+ ---
87
64
 
88
- Sverklo shines when **you don't know exactly what to search for**. When you do, grep is fine and we'll tell you so:
65
+ ## Hero tools
89
66
 
90
- - **Exact string matching** "does this literal string exist anywhere?" → `Grep` is faster and more reliable.
91
- - **Reading file contents** — only `Read` does this. Sverklo isn't a file reader.
92
- - **Build and test verification** only `Bash` runs `npm test` or `gradle check`.
93
- - **Focused single-file diffs** for a signature change in one file, `git diff` + `Read` is hard to beat.
94
- - **Small codebases (under ~50 source files)** — the indexing and MCP roundtrip overhead doesn't pay off at that size. Just read everything. Sverklo starts earning its keep around 100+ files and really shines above 500.
67
+ | Tool | What it does |
68
+ |------|-------------|
69
+ | `sverklo_search` | Hybrid BM25 + vector + PageRank search. Find code without knowing the literal string. |
70
+ | `sverklo_refs` | All references to a symbol, with caller context. Proves dead code with certainty. |
71
+ | `sverklo_impact` | Walk the symbol graph, return ranked transitive callers the real blast radius. |
72
+ | `sverklo_review_diff` | Risk-scored review of `git diff`: touched-symbol importance x coverage x churn. |
95
73
 
96
- If a launch post tells you a tool is great for everything, close the tab.
74
+ [See all 20 tools below.](#full-tool-reference)
97
75
 
98
- ---
99
-
100
- ## Twenty tools your agent actually uses
101
-
102
- Grouped by job. Every tool runs locally, every tool is free.
76
+ <details>
77
+ <summary><h2>Full tool reference</h2></summary>
103
78
 
104
79
  ### Search — find code without knowing the literal string
105
80
  | Tool | What |
@@ -118,30 +93,10 @@ Grouped by job. Every tool runs locally, every tool is free.
118
93
  | `sverklo_deps` | File dependency graph — both directions, importers and imports |
119
94
  | `sverklo_audit` | Surface god nodes, hub files, dead code candidates in one call |
120
95
 
121
- ### Cross-repo impact analysis (v0.4.0+)
122
-
123
- Link multiple projects into a workspace and trace symbol impact across repo boundaries:
124
-
125
- ```bash
126
- # Link multiple projects into a workspace
127
- sverklo workspace init myapp ./api ./frontend ./cms
128
-
129
- # Index cross-repo relationships
130
- sverklo workspace index myapp
131
- ```
132
-
133
- Then ask your agent:
134
-
135
- ```
136
- sverklo_impact symbol:"User.email" cross_repo:true
137
- ```
138
-
139
- This walks the symbol graph across all linked repos and returns the full blast radius — which API routes, frontend components, and CMS templates touch `User.email`, ranked by depth. Currently GraphQL-first (schema stitching and federation are resolved automatically). REST/OpenAPI support is next.
140
-
141
96
  ### Review — diff-aware MR review with risk scoring
142
97
  | Tool | What |
143
98
  |------|------|
144
- | `sverklo_review_diff` | Risk-scored review of `git diff` — touched-symbol importance × coverage × churn |
99
+ | `sverklo_review_diff` | Risk-scored review of `git diff` — touched-symbol importance x coverage x churn |
145
100
  | `sverklo_test_map` | Which tests cover which changed symbols; flag untested production changes |
146
101
  | `sverklo_diff_search` | Semantic search restricted to the changed surface of a diff |
147
102
 
@@ -160,36 +115,35 @@ This walks the symbol graph across all linked repos and returns the full blast r
160
115
  | `sverklo_status` | Index health check, file counts, last update |
161
116
  | `sverklo_wakeup` | Warm the index after a long pause; incremental refresh |
162
117
 
163
- ## Example prompts that showcase sverklo
118
+ </details>
164
119
 
165
- Copy-paste these into Claude Code, Cursor, or Windsurf on any indexed project. Each one exercises a tool that plain text search can't replicate.
120
+ ---
166
121
 
167
- - **"Find everything that would break if I rename `UserRepository.findActive`. Rank by depth, show me the riskiest 5 callers first."**
168
- - **"Is `parseFoo` actually used anywhere in this repo, or is it dead code I can delete?"**
169
- - **"What are the top 10 most structurally important files in this codebase? Don't count test files."**
170
- - **"Review the current git diff. What should I read first? Which changes touch untested production code?"**
171
- - **"I'm onboarding to this repo. Give me a 5-minute mental model: what are the god classes, what are the hub files, what's dead?"**
172
- - **"Save a decision: we use Postgres advisory locks instead of Redis for cross-worker mutexes because of our existing operational familiarity. Pin it to the current SHA."**
173
- - **"What did we decide about rate limiting the public API? Check saved memories first, then the actual code."**
122
+ ## When to reach for sverklo and when not to
174
123
 
175
- If your agent isn't reaching for sverklo tools on prompts like these, check `sverklo doctor` or verify your CLAUDE.md has the sverklo section (re-run `sverklo init` — it's safe).
124
+ We're honest about this. Sverklo isn't a magic 5x speedup and it doesn't replace grep. It's a sharper tool for specific jobs.
176
125
 
177
- ## Two ready-to-paste workflow prompts
126
+ **When sverklo earns its keep:**
127
+ - You don't know exactly what to search for
128
+ - You need to prove dead code (zero references across the whole symbol graph)
129
+ - You need the blast radius of a refactor before you start
130
+ - You're reviewing a large PR and need to know what to read first
178
131
 
179
- For deeper hybrid workflows, sverklo ships two battle-tested prompt templates you can paste into any agent. They encode the "prefer sverklo for discovery, fall back to grep for exact patterns" approach that consistently produces the best results:
132
+ **When grep is still the right tool:**
133
+ - Exact string matching — "does this literal string exist?"
134
+ - Small codebases under ~50 source files — just read everything
135
+ - Single-file diffs — `git diff` + `Read` is hard to beat
136
+ - Build and test verification — only `Bash` runs `npm test`
180
137
 
181
- ```bash
182
- sverklo audit-prompt # full codebase audit — 4-phase workflow
183
- sverklo review-prompt # pull/merge request review with blast-radius analysis
184
- ```
138
+ If a launch post tells you a tool is great for everything, close the tab.
185
139
 
186
- Pipe the output into `pbcopy` / `xclip` and paste into Claude Code, or save it to a file your agent can load.
140
+ ---
187
141
 
188
142
  ## How It Works
189
143
 
190
144
  ```mermaid
191
145
  graph LR
192
- A[Your Code] --> B[Parse<br/>20+ languages]
146
+ A[Your Code] --> B[Parse<br/>10 languages]
193
147
  B --> C[Embed<br/>ONNX/Ollama]
194
148
  B --> D[Build Graph<br/>imports/exports]
195
149
  D --> E[PageRank<br/>importance]
@@ -210,24 +164,39 @@ graph LR
210
164
  5. **Remembers** decisions and patterns across sessions, linked to git state
211
165
  6. **Watches** for file changes and updates incrementally
212
166
 
167
+ ---
168
+
169
+ ## Performance
170
+
171
+ Real measurements on real codebases. Reproducible via `npm run bench` ([methodology](./BENCHMARKS.md)).
172
+
173
+ | Repo | Files | Cold index | Search p95 | Impact analysis | DB size |
174
+ |---|---:|---:|---:|---:|---:|
175
+ | [gin-gonic/gin](https://github.com/gin-gonic/gin) | 99 | 10 s | 12 ms | 0.75 ms | 4 MB |
176
+ | [nestjs/nest](https://github.com/nestjs/nest) | 1,709 | 22 s | 14 ms | 0.88 ms | 11 MB |
177
+ | [facebook/react](https://github.com/facebook/react) | 4,368 | 152 s | 26 ms | 1.18 ms | 67 MB |
178
+
179
+ - **Search p95 stays under 26 ms** even on a 4k-file monorepo
180
+ - **Impact analysis is sub-millisecond** — indexed SQL join, not a string scan
181
+ - **10 languages:** TS, JS, Python, Go, Rust, Java, C, C++, Ruby, PHP
182
+
183
+ ---
184
+
213
185
  ## Quick Start
214
186
 
187
+ ### Claude Code
188
+
215
189
  ```bash
216
190
  npm install -g sverklo
217
- cd your-project
218
- sverklo init
191
+ cd your-project && sverklo init
219
192
  ```
220
193
 
221
- This creates `.mcp.json` at your project root (the only file Claude Code reads for project-scoped MCP servers) and appends sverklo instructions to your `CLAUDE.md`. Safe to re-run.
194
+ Creates `.mcp.json` at your project root and appends sverklo instructions to `CLAUDE.md`. Safe to re-run. If sverklo doesn't appear in `/mcp` after restart, run `sverklo doctor`.
222
195
 
223
- If sverklo doesn't appear in Claude Code's `/mcp` list after restart, run:
224
- ```bash
225
- sverklo doctor
226
- ```
227
- This diagnoses MCP setup issues — checks the binary, the model, the config file location, the handshake, and tells you exactly what's wrong.
196
+ ### Cursor / Windsurf / VS Code / JetBrains
197
+
198
+ Use the full binary path (`which sverklo`) to avoid PATH issues in spawned subprocesses:
228
199
 
229
- ### Cursor / Windsurf / VS Code
230
- These IDEs use their own MCP config locations. Use the **full binary path** to avoid PATH resolution issues in spawned subprocesses:
231
200
  ```json
232
201
  {
233
202
  "mcpServers": {
@@ -238,289 +207,72 @@ These IDEs use their own MCP config locations. Use the **full binary path** to a
238
207
  }
239
208
  }
240
209
  ```
241
- Find the path with `which sverklo`. Add to:
242
- - **Cursor:** `.cursor/mcp.json`
243
- - **Windsurf:** `~/.windsurf/mcp.json`
244
- - **VS Code:** `.vscode/mcp.json`
245
- - **JetBrains:** Settings → Tools → MCP Servers
246
210
 
247
- ### Google Antigravity
248
- Antigravity uses a **global** MCP config file (no per-project config — known limitation, see [Google forum](https://discuss.ai.google.dev/t/support-for-per-workspace-mcp-config-on-antigravity/111952)). `sverklo init` writes it for you if Antigravity is installed, otherwise edit the file by hand:
211
+ Config locations: `.cursor/mcp.json`, `~/.windsurf/mcp.json`, `.vscode/mcp.json`, or JetBrains Settings -> Tools -> MCP Servers.
249
212
 
250
- `~/.gemini/antigravity/mcp_config.json` (Windows: `C:\Users\<USER>\.gemini\antigravity\mcp_config.json`)
213
+ ### Antigravity
251
214
 
252
- ```json
253
- {
254
- "mcpServers": {
255
- "sverklo": {
256
- "command": "/full/path/to/sverklo",
257
- "args": ["/absolute/path/to/your/project"]
258
- }
259
- }
260
- }
261
- ```
215
+ `sverklo init` writes the global config at `~/.gemini/antigravity/mcp_config.json`. Because Antigravity lacks per-project MCP config, you'll need to re-run `sverklo init` from each project or use separate keys (`sverklo-projA`, `sverklo-projB`).
262
216
 
263
- Restart Antigravity after editing. To verify, open the side panel → **MCP Servers** → **Manage MCP Servers** — sverklo should appear in the list. Because the config is global, if you work on multiple projects you'll need to either re-run `sverklo init` from each (it rewrites the path) or run a separate sverklo instance per project under different keys (`sverklo-projA`, `sverklo-projB`).
217
+ ### Any MCP client
264
218
 
265
- ### Any MCP Client
266
219
  ```bash
267
220
  npx sverklo /path/to/your/project
268
221
  ```
269
222
 
270
- ### Dashboard
271
- ```bash
272
- npx sverklo ui .
273
- ```
274
- Opens a web dashboard at `localhost:3847` — browse indexed files, search playground, memory viewer, dependency graph.
275
-
276
- > **First run:** The ONNX embedding model (~90MB) downloads automatically. Takes ~30 seconds on first launch, then instant.
277
-
278
- ## The web dashboard (`sverklo ui`)
223
+ > **First run:** The ONNX embedding model (~90 MB) downloads automatically. Takes ~30 seconds on first launch, then instant.
279
224
 
280
- Sverklo ships with a local web dashboard that gives you a visual window into the index the MCP tools work against. It's the fastest way to verify the index looks right, explore the structural graph of an unfamiliar codebase, or audit saved memories.
281
-
282
- ```bash
283
- sverklo ui .
284
- ```
285
-
286
- Opens `http://localhost:3847` in your browser. Everything runs locally — the dashboard reads straight from the SQLite index file at `~/.sverklo/<project-hash>/index.db`. No cloud, no network calls, no server to stand up.
287
-
288
- ![Sverklo dashboard showing the dependency graph view](./docs/dashboard.png)
289
-
290
- What you can see:
291
-
292
- - **Overview** — PageRank-ranked file list, language breakdown, chunk count, memory health
293
- - **File browser** — every indexed file with its chunks (functions, classes, types), import graph (both directions), and PageRank score
294
- - **Search playground** — run `sverklo_search` queries interactively and see the ranked hits, scores, and PageRank contribution side-by-side. Faster than typing queries into your agent when you're debugging a failing search.
295
- - **Dependency graph** — the whole repo's file-level dependency graph, nodes colored by language, sized by PageRank. Pan and zoom. The fastest way to find "the files that matter" in a repo you've never seen.
296
- - **Memory viewer** — all saved memories, grouped by tier (core / archive), with their git SHAs, tags, and staleness flags
297
- - **Memory timeline** — bi-temporal view showing invalidated memories alongside active ones, with the SHAs where each one was superseded. Click through to see which memory replaced which.
298
-
299
- The dashboard is read-only — nothing you do here changes the index. Use the MCP tools from your AI agent for that. Think of the dashboard as the "inspect" view of the tools you're already using.
300
-
301
- Keep it open in a tab alongside Claude Code or Cursor while you work. When a tool call returns a confusing result, click through to see exactly what the index thinks the codebase looks like.
302
-
303
- ## Performance
304
-
305
- Real measurements on real codebases. Every number below is reproducible with one command:
306
-
307
- ```bash
308
- git clone https://github.com/sverklo/sverklo && cd sverklo
309
- npm install && npm run build
310
- npm run bench # clones gin/nestjs/react, runs the full suite
311
- ```
312
-
313
- Full methodology in [`BENCHMARKS.md`](./BENCHMARKS.md). The detailed on-disk format is documented in [`docs/index-format.md`](./docs/index-format.md).
314
-
315
- | Repo | Files | Cold index | Search p95 | Impact analysis | DB size |
316
- |---|---:|---:|---:|---:|---:|
317
- | [gin-gonic/gin](https://github.com/gin-gonic/gin) | 99 | 10 s | 12 ms | 0.75 ms | 4 MB |
318
- | [nestjs/nest](https://github.com/nestjs/nest) | 1,709 | 22 s | 14 ms | 0.88 ms | 11 MB |
319
- | [facebook/react](https://github.com/facebook/react) | 4,368 | 152 s | 26 ms | 1.18 ms | 67 MB |
320
-
321
- - **Search latency stays under 26 ms p95** even on a 4k-file React monorepo
322
- - **Impact analysis is sub-millisecond** on every repo we tested — it's an indexed SQL join, not a string scan
323
- - **Cold-start indexing is linear in chunks** (~7 ms/chunk on Apple Silicon). Pay it once per project; incremental refresh after that only re-processes changed files
324
- - **Steady-state RAM is ~200 MB** after indexing finishes. Peak during indexing is 400–700 MB while the embedder batches chunks
325
- - **Languages:** 10 (TS, JS, Python, Go, Rust, Java, C, C++, Ruby, PHP)
326
- - **Dependencies:** zero config, zero API keys, zero cloud calls (after the one-time ~90 MB ONNX model download)
327
-
328
- ## Troubleshooting
329
-
330
- Most setup issues fall into one of five buckets. Run `sverklo doctor` first — it diagnoses 90 % of them automatically. If you still need to dig, here's the manual playbook:
331
-
332
- **Sverklo doesn't appear in Claude Code's `/mcp` list after restart.**
333
- 1. Confirm the binary is on PATH: `which sverklo` (should print an absolute path)
334
- 2. Confirm `.mcp.json` exists at the project root: `cat .mcp.json`
335
- 3. Fully quit and restart Claude Code (not just reload the window) — MCP configs are read once on startup
336
- 4. Check the sverklo MCP log in Claude Code: `View → Output → Model Context Protocol`
337
-
338
- **`sverklo init` wrote a config but the agent still can't find it.**
339
- - Cursor / Windsurf / VS Code use their own MCP config paths. See [Cursor / Windsurf / VS Code](#cursor--windsurf--vs-code) below — the config goes in `.cursor/mcp.json`, `~/.windsurf/mcp.json`, or `.vscode/mcp.json` respectively, not `.mcp.json`.
340
- - Antigravity uses a **global** config at `~/.gemini/antigravity/mcp_config.json`. See [Google Antigravity](#google-antigravity).
341
-
342
- **"Failed to start sverklo" / the handshake fails.**
343
- - Confirm Node ≥ 20: `node --version`
344
- - Try running the server manually to see the error directly: `sverklo .`
345
- - Enable debug logging: `SVERKLO_DEBUG=1 sverklo .`
346
- - If the ONNX model download failed, re-run it: `sverklo setup`
347
-
348
- **Index feels wrong or stale.**
349
- - Check status: `sverklo doctor` or call `sverklo_status` in your agent
350
- - Force a rescan: delete the index at `~/.sverklo/<project-hash>/` and restart the server
351
- - Large binary files are skipped by default (>1 MB). If you need them indexed, override via `.sverkloignore`
352
-
353
- **Slow queries.**
354
- - `npm run bench:latency` runs the MCP roundtrip profiler against your current build and prints per-tool p50/p95. Use it to confirm whether the slowdown is in a specific tool or a system-wide cost.
355
- - Large codebases take time to cold-index — but after that, incremental updates should be <10 ms per file event.
356
-
357
- Still stuck? File an issue with the output of `sverklo doctor` attached. We triage within a couple days.
225
+ ---
358
226
 
359
227
  ## Why not... (as of 2026-04)
360
228
 
361
229
  | Alternative | Local | OSS | Code search | Symbol graph | Memory | MR review | License | Cost |
362
230
  |---|---|---|---|---|---|---|---|---|
363
- | **Sverklo** | | MIT | hybrid + PageRank | | git-aware | risk-scored | MIT | $0 |
364
- | Built-in grep / Read | | | text only | | | | varies | $0 |
365
- | [Cursor's @codebase](https://docs.cursor.com/context/codebase-indexing) | cloud | | | partial | | | proprietary | with Cursor sub |
366
- | [Sourcegraph Cody](https://sourcegraph.com/cody) | cloud | source-available | | | | partial | source-available | $919/dev/mo |
367
- | [Continue.dev](https://continue.dev) | partial | | basic | | | | Apache 2.0 | $0 |
368
- | [Claude Context (Zilliz)](https://github.com/zilliztech/claude-context) | Milvus | | vector only | | | | MIT | $0 + Milvus |
369
- | [Aider repo-map](https://aider.chat/docs/repomap.html) | | | | basic | | | Apache 2.0 | $0 |
370
- | [Greptile](https://greptile.com) | ✗ cloud | ✗ | ✓ | ✓ | ✗ | ✓ | proprietary | $30/dev/mo |
371
- | [Augment](https://augmentcode.com) | ✗ cloud | ✗ | ✓ | ✓ | ✗ | partial | proprietary | $20–200/mo |
372
- | [Serena](https://github.com/oraios/serena) | ✓ | ✓ MIT | ✓ LSP-based | ✓ | ✗ | ✗ | MIT | $0 |
373
- | [GitNexus](https://github.com/AkonLabs/gitnexus) | ✓ | ✗ **NonCommercial** | ✓ | ✓ graph | ✗ | ✗ | PolyForm NC | $0 personal only |
374
- | [codebase-memory-mcp](https://github.com/DeusData/codebase-memory-mcp) | ✓ | ✓ MIT | ✓ AST | ✓ knowledge graph | ✗ | ✗ | MIT | $0 |
375
- | [CodeGraphContext](https://github.com/CodeGraphContext/CodeGraphContext) | ✓ | ✓ MIT | ✗ | ✓ graph DB | ✗ | ✗ | MIT | $0 |
376
- | [Repomix](https://github.com/yamadashy/repomix) | ✓ | ✓ MIT | ✗ dump only | ✗ | ✗ | ✗ | MIT | $0 |
377
- | [claude-mem](https://github.com/themanojdesai/claude-mem) | ✓ | ✓ | ✗ | ✗ | ✓ ChromaDB | ✗ | MIT | $0 |
378
-
379
- Sverklo is the only tool that combines **hybrid code search + symbol graph + memory + diff-aware review** in one local-first MCP server. GitNexus has the most stars (27.6k) but its **PolyForm Noncommercial license** prohibits commercial use — Sverklo is MIT, no restrictions.
380
-
381
- ## Configuration
382
-
383
- | Setting | Location |
384
- |---------|----------|
385
- | Model files | `~/.sverklo/models/` (auto-downloaded) |
386
- | Index database | `~/.sverklo/<project>/index.db` |
387
- | Project config | `.sverklo.yaml` in project root |
388
- | Custom ignores | `.sverkloignore` in project root |
389
- | Debug logging | `SVERKLO_DEBUG=1` |
390
-
391
- ### `.sverklo.yaml` (v0.3.0+)
392
-
393
- Drop a `.sverklo.yaml` in your project root to tune indexing and search behavior per-repo:
394
-
395
- ```yaml
396
- # .sverklo.yaml — customize Sverklo's behavior
397
- weights:
398
- - glob: "src/core/**"
399
- weight: 2.0 # boost core modules in search ranking
400
- - glob: "src/generated/**"
401
- weight: 0.1 # suppress generated code
402
- - glob: "vendor/**"
403
- weight: 0.2
404
-
405
- ignore:
406
- - "*.generated.ts"
407
- - ".next/**"
408
-
409
- search:
410
- defaultTokenBudget: 6000
411
- budgets:
412
- search: 8000
413
- audit: 5000
414
- ```
415
-
416
- **Weights** are multiplicative on PageRank only — they don't affect BM25 or embedding scores. Range is 0.0 to 10.0, last matching glob wins. Use them to boost code you care about and suppress generated or vendored files without fully ignoring them.
231
+ | **Sverklo** | yes | yes MIT | hybrid + PageRank | yes | git-aware | risk-scored | MIT | $0 |
232
+ | Built-in grep / Read | yes | yes | text only | no | no | no | varies | $0 |
233
+ | [Cursor @codebase](https://docs.cursor.com/context/codebase-indexing) | no (cloud) | no | yes | partial | no | no | proprietary | with Cursor sub |
234
+ | [Sourcegraph Cody](https://sourcegraph.com/cody) | no (cloud) | no | yes | yes | no | partial | source-available | $9-19/dev/mo |
235
+ | [Claude Context (Zilliz)](https://github.com/zilliztech/claude-context) | no (Milvus) | yes | vector only | no | no | no | MIT | $0 + Milvus |
236
+ | [Aider repo-map](https://aider.chat/docs/repomap.html) | yes | yes | no | basic | no | no | Apache 2.0 | $0 |
237
+ | [Greptile](https://greptile.com) | no (cloud) | no | yes | yes | no | yes | proprietary | $30/dev/mo |
417
238
 
418
- **Token budgets** control how much context each tool returns per call. The defaults were raised in v0.3.0 (search: 8000, audit: 5000). Override them here or per-call via the `budget` parameter on any search tool.
419
-
420
- ### Pluggable embeddings (v0.5.0+)
421
-
422
- Swap the default MiniLM-L6-v2 for any Ollama embedding model:
423
-
424
- ```yaml
425
- # .sverklo.yaml
426
- embeddings:
427
- provider: ollama
428
- ollama:
429
- model: nomic-embed-text
430
- baseUrl: http://localhost:11434
431
- ```
432
-
433
- Dimensions auto-detected from the first response. Falls back to bundled ONNX if Ollama isn't running.
434
-
435
- ## CLI tools (v0.5.0+)
436
-
437
- ### `sverklo review` — CI-friendly diff review
438
-
439
- ```bash
440
- sverklo review --ci --fail-on high
441
- ```
442
-
443
- Risk-scored diff review from the terminal. Auto-detects PR ref in GitHub Actions (`GITHUB_BASE_REF`). Exit code 1 when the threshold is exceeded — use as a CI quality gate.
444
-
445
- ### `sverklo audit` — codebase health report
446
-
447
- ```bash
448
- sverklo audit --format html --open
449
- ```
450
-
451
- Generates a self-contained HTML report: god nodes, hub files, orphan detection, coupling analysis, language distribution. Dark theme, shareable artifact.
452
-
453
- Formats: `markdown` (default), `html`, `json`.
454
-
455
- ### `sverklo audit --badge` — add a health grade to your README
456
-
457
- ```bash
458
- sverklo audit --badge
459
- ```
460
-
461
- Outputs a shields.io badge with your project's A–F health grade. Paste the markdown into your README:
239
+ ---
462
240
 
463
- [![Sverklo Health: B](https://img.shields.io/badge/sverklo-B-green)](https://sverklo.com)
241
+ ## Audit formats
464
242
 
465
- The grade combines four dimensions: dead code %, circular dependencies, coupling (max fan-in), and security issues. [Learn more →](https://sverklo.com/badge/)
243
+ `sverklo audit` generates codebase health reports in six formats: `markdown`, `html`, `json`, `sarif`, `csv`, and `badges`. Run `sverklo audit --format html --open` for a self-contained report with god nodes, hub files, orphan detection, coupling analysis, and language distribution. Use `sverklo audit --badge` to add an A-F health grade shield to your README.
466
244
 
467
- ### GitHub Action
245
+ ---
468
246
 
469
- Automated PR review on every pull request:
247
+ ## CLI tools
470
248
 
471
- ```yaml
472
- # .github/workflows/sverklo-review.yml
473
- name: Sverklo Review
474
- on: [pull_request]
475
- jobs:
476
- review:
477
- runs-on: ubuntu-latest
478
- steps:
479
- - uses: actions/checkout@v4
480
- with:
481
- fetch-depth: 0
482
- - uses: sverklo/sverklo/action@main
483
- with:
484
- github-token: ${{ secrets.GITHUB_TOKEN }}
485
- fail-on: high
486
- ```
249
+ Sverklo ships a CLI for CI and local use: `sverklo review --ci --fail-on high` for risk-scored diff review (auto-detects PR ref in GitHub Actions), `sverklo audit` for codebase health reports, and a [GitHub Action](./action) that posts review comments on PRs. Run `sverklo audit-prompt` or `sverklo review-prompt` to get battle-tested workflow prompts you can paste into any agent.
487
250
 
488
- Posts risk-scored review comments directly on PRs. Updates existing comments on subsequent pushes.
251
+ ---
489
252
 
490
253
  ## Telemetry
491
254
 
492
- **Off by default.** Sverklo ships zero telemetry until you explicitly run `sverklo telemetry enable`. If you never run that command, sverklo never makes a network call beyond the one-time embedding model download on first run.
255
+ **Off by default.** Sverklo makes zero network calls unless you explicitly run `sverklo telemetry enable`. If you opt in, we collect only anonymous usage metrics (no code, no queries, no file paths). Full schema and implementation details in [`TELEMETRY.md`](./TELEMETRY.md).
493
256
 
494
- If you do opt in, we collect 9 fields per event: a random install ID (generated locally), sverklo version, OS, Node major version, the event type (one of 17 fixed enum values), the tool name when applicable, the outcome (ok/error/timeout), and the duration in ms. Server-side we add a Unix timestamp.
495
-
496
- **We never collect:** code, queries, file paths, symbol names, memory contents, git SHAs, branches, repo URLs, IP addresses, hostnames, error messages, language breakdowns, or anything else that could identify you or your codebase.
497
-
498
- Every event is mirrored to `~/.sverklo/telemetry.log` **before** the network call so you can `tail -f` it and see exactly what gets sent. The endpoint is a Cloudflare Worker we own at `t.sverklo.com`, the source lives in [`telemetry-endpoint/`](./telemetry-endpoint/), retention is 90 days, and the entire client implementation is one file under 250 lines at [`src/telemetry/index.ts`](./src/telemetry/index.ts).
499
-
500
- Read [`TELEMETRY.md`](./TELEMETRY.md) for the full schema, the 17 event types, what we deliberately don't collect, and how to verify it. The design rationale and locked decisions are in [`TELEMETRY_DESIGN.md`](./TELEMETRY_DESIGN.md).
501
-
502
- ```bash
503
- sverklo telemetry status # show current state
504
- sverklo telemetry enable # opt in (interactive, prints schema first)
505
- sverklo telemetry disable # opt out, permanent per machine
506
- sverklo telemetry log # show every event that was sent
507
- ```
257
+ ---
508
258
 
509
259
  ## Open Source, Open Core
510
260
 
511
261
  The full MCP server is **free and open source** (MIT). All 20 tools, no limits, no telemetry, no "free tier" — that's not where the line is.
512
262
 
513
- **Sverklo Pro** (later this year) adds smart auto-capture of decisions, cross-project pattern learning, and larger embedding models.
263
+ **Sverklo Pro** (later this year) adds smart auto-capture of decisions, cross-project pattern learning, and larger embedding models. **Sverklo Team** adds shared team memory and on-prem deployment.
514
264
 
515
- **Sverklo Team** (later this year) adds shared team memory and on-prem deployment.
265
+ The open-core line: **Pro adds new things, never gates current things.** Anything in the OSS server today stays in the OSS server forever.
516
266
 
517
- The open-core line is **"Pro adds new things, never gates current things."** Anything in the OSS server today stays in the OSS server forever.
267
+ ---
518
268
 
519
269
  ## Links
520
270
 
521
271
  - [Website](https://sverklo.com)
522
272
  - [npm](https://www.npmjs.com/package/sverklo)
523
273
  - [Issues](https://github.com/sverklo/sverklo/issues)
274
+ - [First Run Guide](FIRST_RUN.md)
275
+ - [Benchmarks](BENCHMARKS.md)
524
276
 
525
277
  ## License
526
278