Skip to content

history

Report churn, hotspots and authorship over a mined history.jsonl.

Synopsis

codegraph history [history.jsonl] [--report <summary|hotspots|authors|coupling|hidden|deadweight>] [--top N] [--model FILE] [--min-support N] [--min-confidence PCT] [--serve] [--port N] [--host ADDR] [--city FILE] [--json]

Arguments

ArgumentMeaningDefault
<history.jsonl>A history.jsonl mined by codegraph scm.<current-dir>-history.jsonl

Options

OptionMeaningDefault
--report <summary|hotspots|authors|coupling|hidden|deadweight>Which report to print.summary
--top NShow only the N highest-ranked rows (hotspots defaults to 20).—
--model FILEModel for the cross-graph reports (hidden, deadweight); defaults to this directory’s default model.—
--min-support NCoupling: pairs must co-change in at least N commits.3
--min-confidence PCTCoupling: support over the rarer file’s revisions, as a percent.50
--serveServe the file-level city REPLAY of this history — buildings are files, a timeline scrubs the commits (stdout stays empty; Ctrl-C stops it).—
--port NPort for –serve; 0 picks a free one.4177
--host ADDRInterface for –serve to bind; 127.0.0.1 keeps the replay on this machine only.0.0.0.0
--city FILEWrite the laid-out replay city artifact (city.json with a replay block) to FILE.—
--jsonPrint the same information as a machine-readable JSON object on stdout.—
-h, --helpShow this help.—

Exit codes

0 ok · 1 internal error (a bug) · 2 usage error · 3 findings.

3 when the input file is not a history.jsonl.

Example

$ codegraph history /tmp/codegraph-history.jsonl --report hotspots --top 5
hotspots of codegraph (top 5 of 461 files by revisions):
  REVISIONS  CHURN  FIXES  DENSITY  AUTHORS  PATH
         42   2166      3     0.07        1  PLAN.md
         30    631      0     0.00        2  README.md
         26   1804      0     0.00        1  packages/cli/src/args.ts
         20   1324      3     0.15        1  packages/viz/src/main.ts
         17    106      0     0.00        1  packages/analyzer/src/index.ts

See also

history.jsonl · CLI conventions

Last updated on