A command-line tool to count lines contributed by authors in Git repositories.
go install github.com/natfarleydev/grit@latestCount lines changed by authors matching a regex pattern:
grit count lines --author-regex <pattern> [paths...]View git log:
grit log [paths...]Examples:
# Count lines by authors named either Nathanael or Mirabel
grit count lines --author-regex '(Nathanael|Mirabel)' ./
# Count lines from a specific email domain
grit count lines --author-regex '@company\.com$' ./ ../other_repo
# Count lines from multiple repositories
grit count lines --author-regex 'John' ./ ../other_repoThe output shows the total lines added and removed by the matching authors for the current day:
+141/-38
- Go 1.21 or later