repo-dive 0.8.0 → 0.10.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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  _Dive into a git repo's history: per-commit snapshots, an indexed metrics catalog and an interactive dashboard_ <!-- markdownlint-disable-line MD036 -- a tagline, not a heading -->
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/repo-dive?logo=npm&color=3c7ef6&labelColor=333)](https://www.npmjs.com/package/repo-dive)
6
- [![npm downloads](https://img.shields.io/npm/dm/repo-dive?logo=npm&color=3c7ef6&labelColor=333)](https://www.npmjs.com/package/repo-dive)
6
+ [![npm downloads](https://img.shields.io/npm/dt/repo-dive?logo=npm&color=3c7ef6&labelColor=333)](https://www.npmjs.com/package/repo-dive)
7
7
  [![License](https://img.shields.io/badge/license-BSD--3--Clause-3c7ef6?logo=opensourceinitiative&logoColor=white&labelColor=333)](LICENSE.md)
8
8
  [![Effect](https://img.shields.io/badge/Effect-v4-3c7ef6?logo=effect&logoColor=white&labelColor=333)](https://effect.website)
9
9
  [![MCP](https://img.shields.io/badge/MCP-ready-3c7ef6?logo=modelcontextprotocol&logoColor=white&labelColor=333)](#ai-agents-mcp)
@@ -21,12 +21,26 @@ One command runs the whole pipeline — scan, index, dashboard — and opens the
21
21
 
22
22
  - **Map**: walk the repo's commits (all or sampled) and let pluggable collectors capture raw snapshots per commit — language/LOC breakdowns, author stats, lint diagnostics and more.
23
23
  - **Reduce**: index those snapshots into a local metrics store shaped like a data cube — numbers at intersections of open-ended categories (author, language, date, lint rule, …).
24
- - **Explore**: query the cube to draw charts, build presentations and ask AI questions about how the codebase evolved.
24
+ - **Explore**: query the cube to draw charts, export shareable reports and ask AI questions about how the codebase evolved.
25
25
 
26
26
  Everything is local-first, incremental and resumable: results live in a catalog folder inside the repo being analyzed and are refined over multiple runs.
27
27
 
28
28
  See [docs/specs](docs/specs/README.md) for the architecture and [docs/research/prior-art.md](docs/research/prior-art.md) for a survey of existing tools and why none of them fills this niche.
29
29
 
30
+ ## Examples
31
+
32
+ Live dashboards for a few popular repositories, produced by running the tool on their full history:
33
+
34
+ - [curl](https://kachkaev.github.io/repo-dive/examples/curl/) (C, since 1999)
35
+ - [effect](https://kachkaev.github.io/repo-dive/examples/effect/) (TypeScript, since 2020)
36
+ - [ollama](https://kachkaev.github.io/repo-dive/examples/ollama/) (Go, since 2023)
37
+ - [prettier](https://kachkaev.github.io/repo-dive/examples/prettier/) (JavaScript, since 2016)
38
+ - [react](https://kachkaev.github.io/repo-dive/examples/react/) (JavaScript, since 2013)
39
+ - [transformers](https://kachkaev.github.io/repo-dive/examples/transformers/) (Python, since 2018)
40
+ - [vite](https://kachkaev.github.io/repo-dive/examples/vite/) (TypeScript, since 2020)
41
+
42
+ Each one is a single self-contained HTML file exported with `repo-dive report` and redeployed weekly by [a scheduled workflow](.github/workflows/examples.yaml) — see [examples](examples/README.md) for how they are defined.
43
+
30
44
  ## Usage
31
45
 
32
46
  Run from inside the repository you want to analyze (or pass `--repo /path/to/repo`).
@@ -55,13 +69,13 @@ Collectors so far:
55
69
  - **churn** — lines added/deleted per commit, by file extension
56
70
  - **file-types** — file count and bytes per extension at each commit's tree
57
71
  - **directives** — eslint-disable comments by rule (block disables tracked as gray areas) and `@ts-ignore`/`@ts-expect-error`/`@ts-nocheck`
58
- - **dependencies** — resolved package totals from lockfiles, per package manager (pnpm, npm and yarn classic and berry), plus direct/dev/optional dependencies and manifest counts read straight from `package.json` files; version-aware, monorepo-aware and extensible to more managers
72
+ - **dependencies** — resolved package totals from lockfiles, per package manager (pnpm, npm, yarn classic and yarn berry), plus direct/dev/optional dependencies and manifest counts read straight from `package.json` files; version-aware, monorepo-aware and extensible to more managers
59
73
  - **todo-comments** — TODO/FIXME/HACK/XXX counts
60
74
  - **languages** — lines and file count per language across a commit's source files (lockfiles, minified bundles and generated data excluded)
61
75
  - **survival** — `git blame` line survival by extension, author and age cohort (sampled monthly)
62
76
 
63
77
  The catalog hides itself from git, but other tools that walk the repository (prettier, markdownlint, cspell, docker builds) each read one ignore file at its root.
64
- `scan` warns when the catalog is missing from those; `repo-dive ignore` adds it to every one of them.
78
+ `scan` warns when the catalog is missing from those; `repo-dive ignore` adds it to every one that needs it, writing the entry in the shape the file is already written in and skipping the files whose tool learns about the catalog elsewhere.
65
79
 
66
80
  `index` normalizes raw snapshots into `.repo-dive/index/metrics.sqlite` — a facts-by-categories cube, rebuildable at any time — plus `dashboard.json`.
67
81
  `dashboard` then serves a local React app with interactive charts: languages over time, a GitHub-style commit calendar, monthly commits with AI-assisted share, churn, lint-suppression trends, dependency counts over time, code survival by cohort and author, and more.
@@ -102,7 +116,8 @@ export default defineConfig({
102
116
 
103
117
  `charts.weekStartsOn` sets the first day of the week in calendar-shaped charts such as the commit calendar (`"monday"` by default, `"sunday"` also supported).
104
118
  `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.
105
- A group can also carry a `displayName`, a profile `url` and a `kind` — `human`/`bot`/`ai`, otherwise auto-derived, with the dashboard badging bots and AI agents and listing them apart from humans.
119
+ A group can also carry a `displayName`, a profile `url` and a `kind` (`human`/`bot`/`ai`, otherwise auto-derived).
120
+ The dashboard badges bots and AI agents, listing them apart from humans.
106
121
  `catalog.dir` moves the catalog; point it outside the repository (e.g. `"../repo-dive-catalogs/my-repo"`) to leave the analyzed working tree untouched altogether, ignore files included.
107
122
  Apart from `catalog`, which every command needs, the config is read by `index`.
108
123
  See [docs/specs/07-config.md](docs/specs/07-config.md) for details.
@@ -163,8 +178,7 @@ CI runs the same report on every push and adds it to the job summary, comparing
163
178
 
164
179
  ## Acknowledgements
165
180
 
166
- Thanks to [@WillJack20](https://github.com/WillJack20) for suggesting the name **repo-dive**.
167
- The project was published as [repo-insighter](https://www.npmjs.com/package/repo-insighter) before 0.4.0.
181
+ Thanks to [@WillJack20](https://github.com/WillJack20) for suggesting the name `repo-dive`, formerly [repo-insighter](https://www.npmjs.com/package/repo-insighter).
168
182
 
169
183
  ## License
170
184