{"id":25661837,"url":"https://github.com/avdaredevil/git-loc","last_synced_at":"2026-05-17T04:34:45.755Z","repository":{"id":42290771,"uuid":"243810187","full_name":"avdaredevil/git-loc","owner":"avdaredevil","description":"Get Github PR line-of-change stats for all Repos you work with on Github","archived":false,"fork":false,"pushed_at":"2023-05-08T04:13:33.000Z","size":47,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T12:23:52.130Z","etag":null,"topics":["delta","git","line-of-code","lines-of-code","perf","performance-review","prs","stats"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avdaredevil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-28T16:46:43.000Z","updated_at":"2022-02-02T04:17:38.000Z","dependencies_parsed_at":"2022-08-27T04:22:31.963Z","dependency_job_id":null,"html_url":"https://github.com/avdaredevil/git-loc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdaredevil%2Fgit-loc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdaredevil%2Fgit-loc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdaredevil%2Fgit-loc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avdaredevil%2Fgit-loc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avdaredevil","download_url":"https://codeload.github.com/avdaredevil/git-loc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240261481,"owners_count":19773474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["delta","git","line-of-code","lines-of-code","perf","performance-review","prs","stats"],"created_at":"2025-02-24T03:23:54.606Z","updated_at":"2026-05-17T04:34:40.736Z","avatar_url":"https://github.com/avdaredevil.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Git-Loc\n**CLI for reading your PR contribution stats across various repo's.** This tool is written as a single-entrypoint CLI, much like `git` with commands and options as the primary driver for interaction (rather than seperate scripts).\n\n***Note:** This will ONLY track activity that you did using PRs, direct commits to `master` will not count!*\n\n## General Usage\n### CLI Flags\n#### Get-Github-Data\nFetch github contribution data for user\n```shell\ngit-stats get-github-data [ldap] [repos..]                                           [aliases: get-data, get-prs]\n```\n| Key | Type | Default Value | Description |\n| --- | --- | --- | --- |\n| `ldap` | `string` | avdaredevil | Which user to get data for |\n| `repos` | `string[]` | * | The Kubeflow repos to scan in |\n| `files-to-ignore` | `string[]` | * | Files or regexes (marked as `r///\u003cregex\u003e/`, ex. `r///\\.jpg$/`) |\n| `default-repo-namespace` | `string` | kubeflow | If repo is a single word, look under this Github Org / User |\n| `pr-cache-freshness` | `number` | 1 | How old can the last PR be be before the cache is marked dirty, and I fetch newer PRs only (in days) |\n| `expire-cache` | `boolean` | false | Expire the cache, fetch all github PR data from scratch, and re-cache |\n| `verbose` | `boolean` | false | Increase the output verbosity of this tool. This includes throttle errors, passive debug logs, etc |\n| `input-folder` | `string` | . | Input folder to use (uses $cwd, unless overridden) |\n| `casual-commit-threshold` | `number` | 500 | How much can max(loc_a, loc_d) be before it seems to be an auto-generated file? (Will generate a warning) |\n| `github-api-token-file` | `string` | 1 | You need to create a github personal access token at https://github.com/settings/tokens, because github has a very strict limit on anonymous API usage. |\n\n#### Calculate\nCalculate contributions for user for a give time-range\n```shell\ngit-stats calculate [from] [to]                                                                  [aliases: count]\n```\n| Key | Type | Default Value | Description |\n| --- | --- | --- | --- |\n| `from` | `string` | 6 months ago | \u003ccode\u003e\u0026lt;num\u003e \u003cyears\u0026#124;quarters\u0026#124;months\u0026#124;weeks\u0026#124;days\u0026#124;hours\u003e ago\u003c/code\u003e OR *A date like input (what date to look from)* |\n| `to` | `string` | 0 months ago | \u003ccode\u003e\u0026lt;num\u003e \u003cyears\u0026#124;quarters\u0026#124;months\u0026#124;weeks\u0026#124;days\u0026#124;hours\u003e ago\u003c/code\u003e OR *A date like input (what date to look from)* |\n\n### Setup\n```bash\n$ npm i -g git-loc\n```\n\n### Running (with installation)\n```bash\n$ git-loc -h   # For help\n$ git-loc get-github-data [github_user] [repos]\n$ git-loc calculate \"1 year ago\" \"2 quarters ago\"\n```\n\n### Running (without installation)\n```bash\n$ cd \u003c/path/to/git_loc (cloned)\u003e\n$ npm start -- get-github-data \u003cargs\u003e\n```\n\n---\n***By**: [Apoorv Verma [AP]](http://linked.in/in/apoorvverma)*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdaredevil%2Fgit-loc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favdaredevil%2Fgit-loc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favdaredevil%2Fgit-loc/lists"}