Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github-graph

Go CLI that draws the GitHub contribution graph in the terminal — same as the profile calendar, for the authenticated user.

Contribution graph in the terminal

Requirements

  • Go 1.22+
  • GitHub Personal Access Token (PAT)

Install

go build -o github-graph .

Or run directly:

go run .

Usage

./github-graph

On first run (no token), the CLI prompts for the token with Charm huh and saves it to:

~/.config/github-graph/token

(directory 0700, file 0600)

On later runs the token is read from that file. If the API returns 401/403, the file is deleted and the prompt appears again.

Environment override

GITHUB_TOKEN or GH_TOKEN take priority over the file and are not written to disk.

GITHUB_TOKEN=ghp_xxx ./github-graph

Create a PAT

  1. Open GitHub → Settings → Developer settings → Personal access tokens
  2. Create a classic token (or fine-grained with read access to the profile)
  3. Recommended minimum scope: read:user (the viewer calendar authenticates with this)

Stack

  • GraphQL: viewer.contributionsCollection.contributionCalendar
  • Prompt: Charm huh
  • Spinner: Charm huh/spinner
  • Grid styling: Charm lipgloss

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages