(a typescript port of Erik Bernhardsson's git-of-theseus)
this port only exists because i really, really dislike python and i wanted to run git-of-theseus.
run with bun:
bunx git-of-theseusto launch the interactive cli
it will ask what repo you want to analyze, write the data into .theseus/, then ask if you want plots from the data it just made.
- bun installed
gitinstalled and available in yourPATH- the target repo needs to have actual commits, because this is powered by git history/blame
analysis writes json files into .theseus/ by default:
cohorts.json– lines grouped by when they were originally addedauthors.json– lines grouped by authorexts.json– lines grouped by file extensiondirs.json– lines grouped by top-level directorydomains.json– lines grouped by author email domainsurvival.json– line survival data used for the survival plot
plots are svg files, also in .theseus/ by default.
interactive mode is the intended path:
bunx git-of-theseusscriptable commands exist too:
bunx git-of-theseus analyze ~/code/my-repo --branch main
bunx git-of-theseus stack-plot .theseus/cohorts.json --outfile .theseus/stack_plot.svg
bunx git-of-theseus line-plot .theseus/authors.json --normalize --outfile .theseus/authors.svg
bunx git-of-theseus survival-plot .theseus/survival.json --outfile .theseus/survival.svg--outdir .theseus– change where analysis data is saved--branch main– pick the branch/ref to analyze--interval 604800– sample commits at least this many seconds apart--procs 4– run more blame jobs in parallel--all-filetypes– include everything, not just common code extensions--ignore 'dist/**'– skip paths--only 'src/**'– only include paths--ignore-whitespace– pass-wto git blame
analyze a repo and use the interactive plot prompt:
bunx git-of-theseusanalyze another repo from here:
bunx git-of-theseus analyze ~/code/my-repo --branch mainonly look at source files in one directory:
bunx git-of-theseus analyze ~/code/my-repo --branch main --only 'src/**'make an author share plot after analysis:
bunx git-of-theseus line-plot .theseus/authors.json --normalize --outfile .theseus/authors.svgNot a git repositorycheck the path you entered.~is supported, but the final path still has to be a git repo.Branch/ref "master" was not founda lot of repos usemain. pass--branch mainor choosemainin the interactive cli.- analysis is slow
yeah. git blame over history is not exactly a spa day. try increasing
--interval, adding--only 'src/**', or excluding generated folders with--ignore 'dist/**'. - plots look empty
make sure the analyzed files matched the default code extension list, or rerun with
--all-filetypes.
this uses isomorphic-git for repo traversal and the installed git binary for blame, because git already knows how to be git.
original idea and python implementation by Erik Bernhardsson. code vibed by gpt-5.5.