repo-dive 0.4.1 → 0.4.3
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 +32 -0
- package/dist/cli.js +400 -212
- package/dist/dashboard/assets/index-BWfLWCwb.css +2 -0
- package/dist/dashboard/assets/index-Bazp6SwA.js +9 -0
- package/dist/dashboard/index.html +2 -2
- package/package.json +9 -8
- package/dist/dashboard/assets/index-BncS6MlP.js +0 -9
- package/dist/dashboard/assets/index-KJPbCnZV.css +0 -2
package/README.md
CHANGED
|
@@ -81,6 +81,38 @@ export default defineConfig({
|
|
|
81
81
|
|
|
82
82
|
`contributors.aliases` merges the multiple identities one person commits under (work + personal email, GitHub noreply, name variants) so attribution, the contributors table and code-survival-by-contributor count them once; a group can also carry a `displayName`, a profile `url` and a `kind` (`human`/`bot`/`ai`, otherwise auto-derived — the dashboard badges bots and AI agents and lists them apart from humans). The config is read by `index`. See [docs/specs/07-config.md](docs/specs/07-config.md) for details.
|
|
83
83
|
|
|
84
|
+
## AI agents (MCP)
|
|
85
|
+
|
|
86
|
+
`repo-dive mcp` serves the metrics cube over the Model Context Protocol on stdio, so an agent can explore a repository's history by asking SQL questions. Two tools:
|
|
87
|
+
|
|
88
|
+
- **`schema`** — tables, available metrics with row counts, sample category keys per metric and the commit range; worth calling before writing queries.
|
|
89
|
+
- **`query`** — one read-only statement (`SELECT`/`WITH`/`EXPLAIN`) against the cube, returning `{ columns, rows, truncated }` (up to 200 rows).
|
|
90
|
+
|
|
91
|
+
Run `scan` and `index` first: the server exits immediately if there is no cube at `.repo-dive/index/metrics.sqlite`. The database is opened read-only, so nothing an agent asks can change the catalog.
|
|
92
|
+
|
|
93
|
+
For [Claude Code](https://code.claude.com/docs/en/mcp), run this inside the repository you want to ask questions about:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
claude mcp add repo-dive -- npx -y repo-dive mcp
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Or commit a project-scoped `.mcp.json` at the repository root, so everyone on the team gets the same server:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"repo-dive": {
|
|
105
|
+
"command": "npx",
|
|
106
|
+
"args": ["-y", "repo-dive", "mcp"]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Then ask things like "which languages grew fastest last year?" or "how has the share of AI-assisted commits changed?".
|
|
113
|
+
|
|
114
|
+
The same stdio server works with any MCP client — point yours at `npx repo-dive mcp`, adding `--repo /path/to/repo` if the client does not start it inside the repository being analyzed.
|
|
115
|
+
|
|
84
116
|
## Development
|
|
85
117
|
|
|
86
118
|
The project is written in TypeScript with [Effect](https://effect.website) v4 (beta) and its built-in CLI toolkit (`effect/unstable/cli`).
|