gitfetch-rs
A blazing-fast Rust port of gitfetch - a neofetch-style CLI tool for displaying git provider statistics.

Features
- 🚀 Multi-Provider Support: GitHub, GitLab, Gitea/Forgejo, Sourcehut
- 📊 Contribution Graphs: Visualize your coding activity
- 🎨 Customizable Output: Multiple layout modes and visual options
- ⚡ Fast & Efficient: Written in Rust with SQLite caching
- 🔒 Privacy-First: Uses official CLI tools (gh, glab) for authentication
Installation
# From crates.io (recommended)
# Or build from source
Requirements
- For GitHub: GitHub CLI (gh)
- For GitLab: GitLab CLI (glab)
- For Gitea: API token (configure with
--change-provider)
Usage
# Show your GitHub stats
# Show stats for a specific user
# Change git provider
# Show only contribution graph
# Custom width and box character
Options
General
--version- Show version information--no-cache- Bypass cache and fetch fresh data--clear-cache- Clear the cache and exit--change-provider- Change the configured git provider
Visual Customization
--graph-only- Show only the contribution graph--graph-timeline- Show git timeline graph (git log --graph style)--width <N>- Custom width for contribution graph (default: 52 weeks)--height <N>- Custom height for contribution graph (default: 7 days, max: 7)--custom-box <CHAR>- Custom character for contribution blocks--no-date- Hide month/date labels
Display Control
--no-grid- Hide contribution grid/graph--no-account- Hide account information--no-achievements- Hide achievements section--no-languages- Hide language statistics--no-issues- Hide issues section--no-pr- Hide pull requests section
Layout
--spaced- Use spaced layout (custom box character + space, Kusa-style)--not-spaced- Use compact layout (background-colored blocks, default)
Simulation
--text <TEXT>- Simulate contribution graph with text (A-Z and space only)--shape <SHAPE>- Simulate contribution graph with predefined shapes (heart, octocat, etc.)
Local Analysis
--local- Analyze local git repository (requires .git folder)
Examples
# Minimal graph (half year, 3 rows)
# Spaced layout (Kusa-style)
# Compact layout (background colors, default)
# Text simulation
# Shape simulation
# Local repository analysis
# Hide specific sections
# Custom appearance
# Full width graph
Configuration
Configuration is automatically stored in platform-specific directories:
- Linux:
~/.config/gitfetch/config.toml - macOS:
~/Library/Application Support/gitfetch/config.toml - Windows:
%APPDATA%\gitfetch\config.toml
Cache database is stored in:
- Linux:
~/.local/share/gitfetch/cache.db - macOS:
~/Library/Application Support/gitfetch/cache.db - Windows:
%LOCALAPPDATA%\gitfetch\cache.db
Architecture
gitfetch-rs/
├── src/
│ ├── main.rs # Entry point
│ ├── lib.rs # Library interface
│ ├── cli/ # CLI argument parsing
│ ├── config/ # Configuration management
│ ├── cache/ # SQLite caching
│ ├── fetcher/ # API integrations
│ │ ├── github.rs # GitHub (via gh CLI + GraphQL)
│ │ ├── gitlab.rs # GitLab (REST API)
│ │ ├── gitea.rs # Gitea/Forgejo (REST API)
│ │ └── sourcehut.rs # Sourcehut (GraphQL API)
│ ├── display/ # Terminal output
│ │ ├── formatter.rs # Layout rendering
│ │ ├── graph.rs # Contribution graph
│ │ └── text_patterns.rs # Text/shape simulation
│ ├── models/ # Data structures
│ └── utils/ # Git helpers & timeline
License
This program is free software licensed under GPL-2.0-only, the same license as the original Python project.
Copyright Notice
gitfetch-rs - Rust Port
Copyright (C) 2025 AbletonPilot
Based on gitfetch by Matars
Original: https://github.com/Matars/gitfetch
Original License: GPL-2.0
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
See LICENSE for the full GPL-2.0 license text and NOTICE for complete attribution details.
Credits
- Original Project: gitfetch by Matars (GPL-2.0)
- Rust Port: gitfetch-rs by AbletonPilot
This Rust implementation is a derivative work - a complete rewrite based on the design, functionality, and visual style of the original Python version by Matars.