A neofetch-style CLI tool for GitHub, GitLab, Gitea, Forgejo, Codeberg, and Sourcehut statistics. Display your profile and stats from various git hosting platforms in a beautiful, colorful terminal interface.


- Neofetch-style display with ASCII art
- Comprehensive statistics from multiple git hosting platforms
- Smart SQLite-based caching system for faster subsequent runs
- Persistent configuration with default username support
- Cross-platform support (macOS and Linux)
- First-run initialization with interactive provider selection
- GitHub - Uses GitHub CLI (gh) for authentication
- GitLab - Uses GitLab CLI (glab) for authentication
- Gitea/Forgejo/Codeberg - Uses personal access tokens
- Sourcehut - Uses personal access tokens
gitfetch
can be installed without any prerequisites. During first-run setup, you'll be guided to install and authenticate with the necessary CLI tools or provide access tokens for your chosen git hosting platform.
When you run gitfetch
for the first time, you'll be prompted to:
- Choose your git hosting provider (GitHub, GitLab, Gitea/Forgejo/Codeberg, or Sourcehut)
- Install required CLI tools (if using GitHub or GitLab)
- Authenticate with your chosen platform
- Configure access tokens (if using Gitea/Forgejo/Codeberg or Sourcehut)
The setup process will provide helpful error messages and installation instructions if anything is missing.
brew tap matars/gitfetch
brew install matars/gitfetch/gitfetch
yay -S gitfetch-python
Or with other AUR helpers:
paru -S gitfetch-python
trizen -S gitfetch-python
Or manual build:
git clone https://aur.archlinux.org/gitfetch-python.git
cd gitfetch-python
makepkg -si
- Clone this repo
cd
into the repo- Then type the below command
pip install -e .
uv tool install git+https://github.com/Matars/gitfetch
pipx install git+https://github.com/Matars/gitfetch
On first run, gitfetch will initialize and ask you to configure your default GitHub username:
gitfetch
This creates:
~/.config/gitfetch/gitfetch.conf
- Configuration file~/.local/share/gitfetch/cache.db
- SQLite cache database
Use default username (from config):
gitfetch
Fetch stats for specific user:
gitfetch username
Bypass cache and fetch fresh data:
gitfetch username --no-cache
Clear cache:
gitfetch --clear-cache
gh auth login
Follow the prompts to authenticate with GitHub.
Install GitHub CLI:
- macOS:
brew install gh
- Linux: See https://github.com/cli/cli#installation
gh auth status
Configuration file location: ~/.config/gitfetch/gitfetch.conf
The configuration file is automatically created on first run. See docs/providers.md
for detailed provider configuration and docs/colors.md
for color customization options.
[DEFAULT]
username = yourusername
cache_expiry_hours = 24
provider = github
provider_url = https://api.github.com
username
: Your default username (automatically detected)cache_expiry_hours
: How long to keep cached data (default: 24 hours)provider
: Git hosting provider (github, gitlab, gitea, sourcehut)provider_url
: API URL for the provider
gitfetch supports extensive color customization. All colors use ANSI escape codes. See docs/colors.md
for detailed color configuration options.
```ini
[COLORS]
reset = \033[0m
bold = \033[1m
# ... color definitions ...
See docs/colors.md
for detailed color configuration options and customization examples.
gitfetch supports multiple Git hosting platforms:
- GitHub - Uses GitHub CLI (gh) for authentication
- GitLab - Uses GitLab CLI (glab) for authentication
- Gitea/Forgejo/Codeberg - Direct API access with personal access tokens
- Sourcehut - Direct API access with personal access tokens
See docs/providers.md
for detailed setup instructions for each provider.
Cache database location: ~/.local/share/gitfetch/cache.db
This follows XDG Base Directory specification for application data.
If you have an older version of gitfetch that stored cache in ~/.config/gitfetch/cache.db
, you can safely delete the old cache file:
rm ~/.config/gitfetch/cache.db
Using the GitHub CLI (gh) instead of direct API calls provides several benefits:
- ✅ No rate limits - Uses your authenticated GitHub account
- ✅ Automatic authentication - No need to manage tokens
- ✅ Better security - Credentials managed by gh CLI
- ✅ Simpler setup - Just run
gh auth login
- Inspired by the beautiful contribution graph design from Kusa by Ryu0118.
- Inspired by the very cool and extremely fun tool songfetch by fwtwoo.
GPL-2.0