{"id":50278087,"url":"https://github.com/shivansh2904/git-chronicle","last_synced_at":"2026-05-27T22:04:08.014Z","repository":{"id":358408587,"uuid":"1241246236","full_name":"Shivansh2904/git-chronicle","owner":"Shivansh2904","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-27T13:26:12.000Z","size":315,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-27T15:09:12.999Z","etag":null,"topics":["analytics","cli","commander","developer-tools","git","nodejs","simple-git","terminal","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shivansh2904.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-17T06:19:55.000Z","updated_at":"2026-05-27T13:26:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Shivansh2904/git-chronicle","commit_stats":null,"previous_names":["shivansh2904/git-chronicle"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Shivansh2904/git-chronicle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shivansh2904%2Fgit-chronicle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shivansh2904%2Fgit-chronicle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shivansh2904%2Fgit-chronicle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shivansh2904%2Fgit-chronicle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shivansh2904","download_url":"https://codeload.github.com/Shivansh2904/git-chronicle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shivansh2904%2Fgit-chronicle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33585229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","cli","commander","developer-tools","git","nodejs","simple-git","terminal","typescript"],"created_at":"2026-05-27T22:03:56.263Z","updated_at":"2026-05-27T22:04:08.006Z","avatar_url":"https://github.com/Shivansh2904.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-chronicle\n\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.4-3178c6?logo=typescript\u0026logoColor=white)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D18-339933?logo=nodedotjs\u0026logoColor=white)](https://nodejs.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n[![CI](https://github.com/Shivansh2904/git-chronicle/actions/workflows/ci.yml/badge.svg)](https://github.com/Shivansh2904/git-chronicle/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/git-chronicle?color=cb3837\u0026logo=npm)](https://www.npmjs.com/package/git-chronicle)\n\n\u003e Rich git repository analytics in your terminal — commit heatmaps, author breakdowns, language stats, file churn\n\n---\n\n## Install\n\n```bash\nnpx git-chronicle         # run instantly without installing\nnpm install -g git-chronicle  # or install globally\n```\n\n---\n\n## Usage\n\nRun from the root of any git repository:\n\n```bash\ngit-chronicle                            # full analysis (default)\ngit-chronicle analyze -n 15              # show top 15 items per section\ngit-chronicle authors --sort insertions\ngit-chronicle heatmap\ngit-chronicle --since 2024-01-01         # recent history only\ngit-chronicle --since 2023-01-01 --until 2024-01-01  # date range\ngit-chronicle --json \u003e stats.json        # export full analysis as JSON\ngit-chronicle files                      # top churned files\ngit-chronicle files -n 20               # show top 20 churned files\ngit-chronicle report                     # export Markdown report to git-chronicle-report.md\ngit-chronicle report -o REPORT.md -n 25  # custom output path and top-N depth\ngit-chronicle report --since 2024-01-01  # report for a date range\ngit-chronicle compare main feature/x        # what's new in feature/x since main\ngit-chronicle compare v1.0.0 v1.1.0         # changes between two tags\ngit-chronicle compare                       # default: main..HEAD\n```\n\n### Options\n\n| Flag | Description |\n|------|-------------|\n| `--since \u003cdate\u003e` | Limit analysis to commits after this ISO date |\n| `--until \u003cdate\u003e` | Limit analysis to commits before this ISO date |\n| `-n, --top \u003cnumber\u003e` | Number of items to display in ranked lists (default: 10) |\n| `--sort \u003cfield\u003e` | Sort authors by `commits`, `insertions`, or `deletions` |\n| `--json` | Output full analysis as JSON to stdout (pipe-friendly) |\n| `-o, --output \u003cpath\u003e` | Output file path for the `report` command (default: `git-chronicle-report.md`) |\n\n---\n\n## Demo\n\n```\n┌────────────────────────────────────────────────────┐\n│  git-chronicle · react                             │\n│  16,380 commits · 5 authors · 48 months            │\n│  Apr 2019 → Mar 2023                               │\n│  Most active: Wednesdays at 14:00                  │\n└────────────────────────────────────────────────────┘\n\nCommit Timeline\n  2019-04  ████████████████████ 42\n  2019-05  ████████████ 28\n  2019-06  ██████████████████████████ 61\n  2019-07  ████████████████ 37\n  2019-08  ██████████████████████ 52\n  2019-09  ██████████ 24\n  2019-10  ███████████████████████████████ 71\n  2019-11  ████████████████████ 44\n  ...\n\nTop Authors\n┌─────┬───────────────────┬─────────┬────────────┬───────────┬──────────┬──────────────┐\n│  #  │ Author            │ Commits │ Insertions │ Deletions │ Net      │ Active Days  │\n├─────┼───────────────────┼─────────┼────────────┼───────────┼──────────┼──────────────┤\n│  1  │ gaearon           │ 4,812   │ +312,401   │ -89,204   │ +223,197 │ 891          │\n│  2  │ sebmarkbage       │ 3,201   │ +198,230   │ -71,003   │ +127,227 │ 712          │\n│  3  │ acdlite           │ 1,890   │ +87,441    │ -34,120   │ +53,321  │ 430          │\n│  4  │ trueadm           │ 1,204   │ +63,002    │ -28,441   │ +34,561  │ 298          │\n│  5  │ josephsavona      │ 876     │ +41,230    │ -18,002   │ +23,228  │ 201          │\n└─────┴───────────────────┴─────────┴────────────┴───────────┴──────────┴──────────────┘\n\nLanguage Breakdown\n  TypeScript   ████████████████████████████████ 62.4%   (28,431 lines)\n  JavaScript   ████████ 15.1%                           ( 6,872 lines)\n  CSS          █████ 9.8%                               ( 4,461 lines)\n  Python       ███ 6.3%                                 ( 2,870 lines)\n  Markdown     ██ 4.0%                                  ( 1,823 lines)\n  Other        █ 2.4%                                   ( 1,091 lines)\n\nActivity Heatmap  (day × hour, UTC)\n       0  3  6  9  12 15 18 21\n  Mon  ░░░░░▒▒▒▓▓▓▓▓▒▒▒░░░░░░░\n  Tue  ░░░░░▒▓▓███▓▓▒▒░░░░░░░░\n  Wed  ░░░░░░▒▒▓▓▓▒▒░░░░░░░░░░\n  Thu  ░░░░░▒▒▓▓▓▓▒▒░░░░░░░░░░\n  Fri  ░░░░░▒▒▒▓▓▒▒▒░░░░░░░░░░\n  Sat  ░░░░░░░░▒▒░░░░░░░░░░░░░\n  Sun  ░░░░░░░░░░░░░░░░░░░░░░░\n\nTop Churned Files\n┌────┬──────────────────────────────────────┬─────────┬────────────┬───────────┐\n│  # │ File                                 │ Changes │ Insertions │ Deletions │\n├────┼──────────────────────────────────────┼─────────┼────────────┼───────────┤\n│  1 │ src/core/stats.ts                    │ 94      │ +3,201     │ -2,874    │\n│  2 │ src/display/chart.ts                 │ 71      │ +2,540     │ -2,103    │\n│  3 │ src/index.ts                         │ 58      │ +1,830     │ -1,421    │\n│  4 │ tests/stats.test.ts                  │ 47      │ +1,204     │ -988      │\n│  5 │ package.json                         │ 34      │ +210       │ -198      │\n└────┴──────────────────────────────────────┴─────────┴────────────┴───────────┘\n```\n\n---\n\n## How It Works\n\n1. **Log parsing** — `simple-git` runs `git log --format=... --numstat` and the output is parsed entirely in memory. No temp files, no shell piping gymnastics.\n2. **Stats engine** — `src/core/stats.ts` aggregates commit records into author stats, a 7×24 activity heatmap, monthly timelines, and file churn rankings.\n3. **Language detection** — `src/core/languages.ts` maps file extensions to language names and GitHub-style brand colours.\n4. **Rendering** — `chalk` drives all terminal colour, `cli-table3` handles the tabular author and churn views, and custom bar/sparkline helpers produce inline ASCII charts.\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/Shivansh2904/git-chronicle.git\ncd git-chronicle\nnpm install\nnpm run dev          # run from source with tsx\nnpm test             # run Vitest suite\nnpm run build        # compile to dist/\n```\n\n---\n\n## License\n\nMIT — Copyright (c) 2025 Shivansh Mishra. See [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivansh2904%2Fgit-chronicle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivansh2904%2Fgit-chronicle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivansh2904%2Fgit-chronicle/lists"}