gitfamiliar 0.9.0 → 0.11.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 +48 -35
- package/dist/bin/gitfamiliar.js +1095 -695
- package/dist/bin/gitfamiliar.js.map +1 -1
- package/dist/{chunk-NGCQUB2H.js → chunk-3SYLST7V.js} +11 -11
- package/dist/chunk-3SYLST7V.js.map +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-NGCQUB2H.js.map +0 -1
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
[Quick Start](#-quick-start) · [Scoring Modes](#-scoring-modes) · [Team Features](#-team-features) · [HTML Dashboard](#-html-dashboard) · [CLI Reference](#-cli-reference)
|
|
14
14
|
|
|
15
|
+

|
|
16
|
+
|
|
15
17
|
</div>
|
|
16
18
|
|
|
17
19
|
---
|
|
@@ -23,22 +25,30 @@ Built for engineers joining a new project, it gives you and your team an objecti
|
|
|
23
25
|
|
|
24
26
|
## Demo
|
|
25
27
|
|
|
28
|
+
Try it instantly without a git repository:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx gitfamiliar --demo # terminal output
|
|
32
|
+
npx gitfamiliar --demo --html # interactive HTML dashboard
|
|
33
|
+
npx gitfamiliar --demo --hotspot # hotspot analysis
|
|
34
|
+
npx gitfamiliar --demo --team # team comparison
|
|
26
35
|
```
|
|
27
|
-
$ npx gitfamiliar
|
|
28
36
|
|
|
29
|
-
|
|
37
|
+
The demo uses a fictional project "acme-web-app" with 4 team members:
|
|
30
38
|
|
|
31
|
-
|
|
39
|
+
```
|
|
40
|
+
$ npx gitfamiliar --demo
|
|
41
|
+
|
|
42
|
+
GitFamiliar — acme-web-app (Committed mode)
|
|
32
43
|
|
|
33
|
-
|
|
34
|
-
auth/ ████████░░ 80% (4/5 files)
|
|
35
|
-
api/ ███░░░░░░░ 30% (6/20 files)
|
|
36
|
-
components/ █░░░░░░░░░ 12% (3/25 files)
|
|
37
|
-
utils/ ██████████ 100% (8/8 files)
|
|
38
|
-
tests/ ░░░░░░░░░░ 0% (0/14 files)
|
|
39
|
-
config/ ██████░░░░ 60% (3/5 files)
|
|
44
|
+
Overall: 22/31 files (68%)
|
|
40
45
|
|
|
41
|
-
|
|
46
|
+
.github/ ░░░░░░░░░░ 0% (0/2 files)
|
|
47
|
+
frontend/ █░░░░░░░░░ 15% (1/7 files)
|
|
48
|
+
components/ ░░░░░░░░░░ 0% (0/4 files)
|
|
49
|
+
src/ ██████████ 100% (18/18 files)
|
|
50
|
+
routes/ ██████████ 100% (4/4 files)
|
|
51
|
+
services/ ██████████ 100% (3/3 files)
|
|
42
52
|
```
|
|
43
53
|
|
|
44
54
|
Use `--html` to generate an **interactive unified dashboard** in the browser:
|
|
@@ -83,7 +93,7 @@ npm install -g gitfamiliar
|
|
|
83
93
|
|
|
84
94
|
## Scoring Modes
|
|
85
95
|
|
|
86
|
-
### `
|
|
96
|
+
### `committed` — default
|
|
87
97
|
|
|
88
98
|
> Best for: **New team members** tracking onboarding progress.
|
|
89
99
|
|
|
@@ -93,7 +103,7 @@ Files are "written" or "not written". A file counts as written if you have at le
|
|
|
93
103
|
familiarity = written_files / total_files
|
|
94
104
|
```
|
|
95
105
|
|
|
96
|
-
### `
|
|
106
|
+
### `code-coverage`
|
|
97
107
|
|
|
98
108
|
> Best for: **Tech leads** assessing code ownership and bus factor.
|
|
99
109
|
|
|
@@ -105,7 +115,7 @@ score(project) = sum(your_lines) / sum(all_lines)
|
|
|
105
115
|
```
|
|
106
116
|
|
|
107
117
|
```bash
|
|
108
|
-
gitfamiliar --mode
|
|
118
|
+
gitfamiliar --mode code-coverage
|
|
109
119
|
```
|
|
110
120
|
|
|
111
121
|
### `weighted`
|
|
@@ -159,13 +169,13 @@ gitfamiliar --user "Alice" --user "Bob" # specific users
|
|
|
159
169
|
gitfamiliar --team # all contributors
|
|
160
170
|
```
|
|
161
171
|
|
|
162
|
-
###
|
|
172
|
+
### Contributors Per File
|
|
163
173
|
|
|
164
174
|
Visualize bus factor — how many people know each part of the codebase:
|
|
165
175
|
|
|
166
176
|
```bash
|
|
167
|
-
gitfamiliar --
|
|
168
|
-
gitfamiliar --
|
|
177
|
+
gitfamiliar --contributors-per-file
|
|
178
|
+
gitfamiliar --contributors-per-file --html
|
|
169
179
|
```
|
|
170
180
|
|
|
171
181
|
| Risk Level | Contributors | Meaning |
|
|
@@ -181,7 +191,7 @@ Find files that are frequently changed but poorly understood:
|
|
|
181
191
|
```bash
|
|
182
192
|
gitfamiliar --hotspot # personal hotspots
|
|
183
193
|
gitfamiliar --hotspot team # team hotspots
|
|
184
|
-
gitfamiliar --hotspot --
|
|
194
|
+
gitfamiliar --hotspot --since 30 # last 30 days only
|
|
185
195
|
gitfamiliar --hotspot --html # scatter plot visualization
|
|
186
196
|
```
|
|
187
197
|
|
|
@@ -202,17 +212,19 @@ gitfamiliar --html --mode weighted # unified, weighted as default scorin
|
|
|
202
212
|
|
|
203
213
|
| Tab | Visualization | Description |
|
|
204
214
|
|:---|:---|:---|
|
|
205
|
-
| **Scoring** | D3 treemap + sub-tabs |
|
|
206
|
-
| **
|
|
207
|
-
| **
|
|
215
|
+
| **Scoring** | D3 treemap + sub-tabs | Committed, Code Coverage, Weighted modes with real-time weight sliders |
|
|
216
|
+
| **Contributors** | D3 treemap + risk sidebar | Contributors per file — bus factor risk analysis |
|
|
217
|
+
| **Team** | D3 treemap + user dropdown | Compare familiarity across all contributors |
|
|
208
218
|
| **Hotspots** | D3 scatter plot + sidebar | High change frequency × low familiarity = risk |
|
|
209
219
|
|
|
220
|
+

|
|
221
|
+
|
|
210
222
|
### Individual HTML Reports
|
|
211
223
|
|
|
212
224
|
```bash
|
|
213
225
|
gitfamiliar --html --hotspot # hotspot scatter plot only
|
|
214
|
-
gitfamiliar --html --
|
|
215
|
-
gitfamiliar --html --team #
|
|
226
|
+
gitfamiliar --html --contributors-per-file # contributors treemap only
|
|
227
|
+
gitfamiliar --html --team # team comparison treemap only
|
|
216
228
|
gitfamiliar --html --user "Alice" --user "Bob" # specific users comparison
|
|
217
229
|
```
|
|
218
230
|
|
|
@@ -255,17 +267,18 @@ third_party/
|
|
|
255
267
|
Usage: gitfamiliar [options]
|
|
256
268
|
|
|
257
269
|
Options:
|
|
258
|
-
-m, --mode <mode>
|
|
259
|
-
-u, --user <user>
|
|
260
|
-
-e, --expiration <policy>
|
|
261
|
-
--html
|
|
262
|
-
-w, --weights <w1,w2>
|
|
263
|
-
--team
|
|
264
|
-
--
|
|
265
|
-
--hotspot [mode]
|
|
266
|
-
--
|
|
267
|
-
|
|
268
|
-
-
|
|
270
|
+
-m, --mode <mode> Scoring mode: committed | code-coverage | weighted (default: "committed")
|
|
271
|
+
-u, --user <user> Git user name/email (repeatable for comparison)
|
|
272
|
+
-e, --expiration <policy> Expiration: never | time:Nd | change:N% | combined:Nd:N%
|
|
273
|
+
--html Generate HTML report (alone = unified dashboard)
|
|
274
|
+
-w, --weights <w1,w2> Weights for weighted mode (must sum to 1.0)
|
|
275
|
+
--team Compare all contributors
|
|
276
|
+
--contributors-per-file Analyze contributors per file (bus factor)
|
|
277
|
+
--hotspot [mode] Hotspot analysis: personal (default) or team
|
|
278
|
+
--since <days> Hotspot analysis period in days (default: 90)
|
|
279
|
+
--demo Show demo with sample data (no git repo needed)
|
|
280
|
+
-V, --version Output version number
|
|
281
|
+
-h, --help Display help
|
|
269
282
|
```
|
|
270
283
|
|
|
271
284
|
---
|
|
@@ -276,7 +289,7 @@ Options:
|
|
|
276
289
|
import { computeFamiliarity } from 'gitfamiliar';
|
|
277
290
|
|
|
278
291
|
const result = await computeFamiliarity({
|
|
279
|
-
mode: '
|
|
292
|
+
mode: 'committed',
|
|
280
293
|
expiration: { policy: 'never' },
|
|
281
294
|
weights: { blame: 0.5, commit: 0.5 },
|
|
282
295
|
html: false,
|