A command-line tool to share your commit stats from local git repositories.
brew tap radulucut/gitbrag
brew install gitbragscoop bucket add gitbrag https://github.com/radulucut/scoop-gitbrag
scoop install gitbraggo run main.goDownload the latest binary from the releases page.
gitbrag ./ --since '2025-01-01' --author 'john@example.com' -O stats.png -B 000 -C fffgitbrag ./ --since '2025-09-01' --until '2025-10-01' -O stats.png -B fff -C 000 --lang --exclude-files '.*package-lock.json$'gitbrag ./ --since 2024-01-01gitbrag ./ --since 2024-01-01 --until 2024-12-31gitbrag ./ --since 7dgitbrag ./ --author "John Doe"gitbrag ./ --since 7d --author john@example.comgitbrag ./ -O stats.pnggitbrag ./ --output stats.png --background "#282a36"gitbrag ./ -O stats.png -B fffgitbrag ./ -O stats.png --color "#50fa7b"gitbrag ./ -O stats.png -B "#282a36" -C "f8f8f2"gitbrag ./ -O stats.png -B 000 --color fffgitbrag ./ -O stats.png --langgitbrag ./ -O stats.png --lang -B "#282a36" -C "f8f8f2"The --lang flag adds a visual bar chart showing the percentage breakdown of your top 3 programming languages plus an "Others" category. Each language is displayed with its representative color and percentage. This feature only works with PNG output (-O flag).
gitbrag ./ --exclude-files '.*\.lock$'gitbrag ./ --exclude-files 'package-lock\.json'The --exclude-files flag accepts a regular expression (https://github.com/google/re2/wiki/Syntax) pattern to exclude files from the statistics. This is useful for ignoring lock files, dependencies, or any other files you don't want to include in your commit stats.
gitbrag ./ --exclude-dirs 'node_modules|vendor'gitbrag ./ --exclude-dirs '.*test.*'The --exclude-dirs flag accepts a regular expression (https://github.com/google/re2/wiki/Syntax) pattern to exclude directories when scanning for git repositories. This is useful for skipping large dependency directories like node_modules or vendor, or excluding test directories. The pattern matches against directory names, not full paths.
gitbrag --help