repo-dive 0.5.0 → 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/README.md CHANGED
@@ -39,8 +39,9 @@ npx repo-dive status # show catalog coverage
39
39
  npx repo-dive collectors # list available collectors
40
40
  npx repo-dive report # export one shareable self-contained HTML file
41
41
  npx repo-dive query "SELECT metric, sum(value) FROM facts GROUP BY metric"
42
- npx repo-dive mcp # serve the cube to AI agents (Model Context Protocol)
43
- npx repo-dive gc # clean up the catalog interactively
42
+ npx repo-dive mcp # serve the cube to AI agents (Model Context Protocol)
43
+ npx repo-dive gc # clean up the catalog interactively
44
+ npx repo-dive ignore # keep other tools out of the catalog
44
45
  ```
45
46
 
46
47
  `scan` walks the repository's history and runs collectors against every commit (or a sample, per collector), writing raw snapshots into a `.repo-dive/` catalog inside the analyzed repo.
@@ -54,10 +55,13 @@ Collectors so far:
54
55
  - **directives** — eslint-disable comments by rule (block disables tracked as gray areas) and `@ts-ignore`/`@ts-expect-error`/`@ts-nocheck`
55
56
  - **dependencies** — total resolved packages from package-manager lockfiles, per package manager (pnpm, npm and yarn — classic and berry; version-aware and monorepo-aware, extensible to more managers), plus direct/dev/optional dependencies and the number of manifests read straight from `package.json` files
56
57
  - **todo-comments** — TODO/FIXME/HACK/XXX counts
57
- - **languages** — tokei language/LOC breakdown (sampled monthly; markdown counted whole)
58
+ - **languages** — lines and file count per language across a commit's source files (lockfiles, minified bundles and generated data excluded)
58
59
  - **survival** — `git blame` line survival by extension, author and age cohort (sampled monthly)
59
60
 
60
- `index` normalizes raw snapshots into `.repo-dive/index/metrics.sqlite` (a facts-by-categories cube, rebuildable at any time) plus `dashboard.json`, and `dashboard` serves a local React app with interactive charts: languages over time, monthly commits with AI-assisted share, churn, lint-suppression trends, dependency counts over time, code survival by cohort and author, and more.
61
+ 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.
62
+ `scan` warns when the catalog is missing from those; `repo-dive ignore` adds it to every one of them.
63
+
64
+ `index` normalizes raw snapshots into `.repo-dive/index/metrics.sqlite` (a facts-by-categories cube, rebuildable at any time) plus `dashboard.json`, and `dashboard` 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.
61
65
 
62
66
  ## Configuration
63
67
 
@@ -82,11 +86,21 @@ export default defineConfig({
82
86
  // How many contributors charts keep before folding the rest into "Other" (default 10).
83
87
  maxInCharts: 10,
84
88
  },
89
+ charts: {
90
+ // First day of the week in calendar-shaped charts (default "monday").
91
+ weekStartsOn: "monday",
92
+ },
93
+ catalog: {
94
+ // Where snapshots, caches and the cube live (default ".repo-dive").
95
+ dir: ".repo-dive",
96
+ },
85
97
  });
86
98
  ```
87
99
 
100
+ `charts.weekStartsOn` sets the first day of the week in calendar-shaped charts such as the commit calendar (`"monday"` by default, `"sunday"` also supported).
88
101
  `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).
89
- The config is read by `index`.
102
+ `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.
103
+ Apart from `catalog`, which every command needs, the config is read by `index`.
90
104
  See [docs/specs/07-config.md](docs/specs/07-config.md) for details.
91
105
 
92
106
  ## AI agents (MCP)