Skip to content

Latest commit

 

History

29 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitviz

Go Version GitHub Release License: MIT

gitviz visualizes commit activity from your local Git repositories as a GitHub-style contribution graph in the terminal.

gitviz demo

Quick Start

Register repositories first, then render the graph.

gitviz -add ~/src
gitviz

By default, gitviz reads your commit email from:

git config user.email

You can pass an email explicitly when needed.

gitviz -graph your.email@example.com

Registered repositories are stored in:

~/.gitlocalstats

Try Without Installing

If you use Nix with flakes enabled, run the latest version from GitHub without installing it.

nix run --refresh github:anton-fuji/gitviz

Pass options after --.

nix run --refresh github:anton-fuji/gitviz -- -days 365 -color blue

Install

Nix

nix profile install github:anton-fuji/gitviz

Homebrew

brew tap anton-fuji/gitviz
brew install gitviz

Go

git clone https://github.com/anton-fuji/gitviz.git
cd gitviz
go install .

Usage

Register Repositories

Scan a parent directory and save all Git repositories found under it.

gitviz -add /path/to/projects

gitviz skips repeated entries when updating ~/.gitlocalstats.

Show The Graph

gitviz

Show activity for a specific email.

gitviz -graph your.email@example.com

Show a longer range.

gitviz -days 365

Show commit counts inside each cell.

gitviz -numbers

Combine options.

gitviz -days 365 -numbers -color purple

Color Themes

The default theme is green. Today is always emphasized with a pink accent.

Theme Command
Green gitviz -graph your.email@example.com -color green
Blue gitviz -graph your.email@example.com -color blue
Purple gitviz -graph your.email@example.com -color purple
Orange gitviz -graph your.email@example.com -color orange
Gray gitviz -graph your.email@example.com -color gray

Color themes work in both compact mode and -numbers mode.

gitviz -graph your.email@example.com -color orange
gitviz -graph your.email@example.com -numbers -color orange

See color.md for screenshots of every color theme.

Options

Flag Default Description
-add <path> none Scan a directory and register Git repositories.
-graph <email> git config user.email Email address used to filter commits.
-days <number> 183 Number of days to show.
-numbers false Show commit counts inside graph cells.
-color <theme> green Graph color theme: green, blue, purple, orange, gray.

Development

go test ./...
go run . -graph your.email@example.com

With Nix:

nix develop
nix run . -- -graph your.email@example.com

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages