Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Typing SVG

C++17 Makefile build AUR version AUR downloads

Summary

GitStats CLI is a lightweight C++ tool that uses the GitHub GraphQL API to show user language distribution, user info, and repository info directly from the command line.

Installation

Arch Linux (AUR)

Using yay:

yay -S gitstats

Ubuntu / Debian / Linux Mint

Download the .deb package from the latest release and install it using apt (this automatically resolves required dependencies like libcurl):

wget https://github.com/andregarcia0412/gitstats-cli/releases/download/v1.1.0/gitstats_1.1.0_amd64.deb
sudo apt install ./gitstats_1.1.0_amd64.deb

Stack

  • C++17
  • libcurl (HTTP)
  • nlohmann/json (header-only)
  • Makefile build

Table of Contents

Run Locally

Prerequisites

  • C++17 compiler (g++)
  • make
  • libcurl development headers

Build and run

make
./bin/gitstats help

Optional install

make install
# After install
 gitstats help

Build (Linux/macOS/Windows)

The Makefile builds to bin/gitstats (or bin/gitstats.exe on Windows) and provides install/uninstall targets.

Linux/macOS

make
make install
  • Output: bin/gitstats
  • Install dir: ~/.local/bin

Windows (MSYS2/MinGW or similar)

make
make install
  • Output: bin/gitstats.exe
  • Install dir: %USERPROFILE%/AppData/Local/Programs/gitstats

Clean build artifacts

make clean

Uninstall

make uninstall

Usage

gitstats <command> [options]

Commands

help                                Show this help message
config <option>                     Manage local config
user <option> <user>                GitHub user operations
repository <option> <owner> <repo>  GitHub repository operations
languages <user>                    Alias for: gitstats user --languages <user>

User options

--languages, --langs <user>         Show top languages for a GitHub user
--info <user>                       Show GitHub user info

Config options

--set-token <token>                 Set GitHub token in config file
--remove-token                      Remove token from config file
--list                              List config values

Repository options

--info <owner> <repo>               Show GitHub repository info

Examples

gitstats help
gitstats config --set-token ghp_xxxxx
gitstats config --list
gitstats config --remove-token
gitstats user --languages torvalds
gitstats user --info torvalds
gitstats repository --info torvalds linux
gitstats languages torvalds

Notes

  • A GitHub token is required for GraphQL API calls.
  • Config file location: ./.config/config.json.
  • Forked repositories are ignored.
  • "Jupyter Notebook" language is excluded.

Documentation

All documentation is available via the CLI help:

gitstats help

The help output includes the full command list, options, and examples.

About

GitHub language and profile stats from the terminal.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages