Gitfetch is a command-line information tool written in Rust, inspired by Neofetch. It provides a visually appealing way to display Git contribution information.

- Prints out contribution information similar to how Neofetch displays system information
- Automatically detects the global Git user
- Allows specifying any user and year for contribution data
- Customizable contribution graph and output color
- Git (optional, for global user detection)
yay -S gitfetchor
paru -S gitfetchbrew tap fabricsoul/gitfetch https://github.com/FabricSoul/gitfetch
brew install gitfetchInstall Gitfetch directly from crates.io using Cargo:
cargo install --locked gitfetch-
Generate a new GitHub Token with the
read:userscope to fetch data from GitHub. -
Add your token to Gitfetch:
gitfetch add-token <your-token-here>
-
Run Gitfetch:
gitfetch
-uor--user: Specify a GitHub username-yor--year: Specify a year for contribution data
Example:
gitfetch -u FabricSoul -y 2023Gitfetch can be customized using a configuration file located at ~/.config/gitfetch/config.toml. This file allows you to personalize the appearance and behavior of Gitfetch.
The config.toml file is divided into three main sections:
[graph_colors]: Defines the colors for different contribution levels in the graph.[text_colors]: Sets the color for informational text.[graph_data]: Configures the thresholds for contribution levels.
This section defines the colors for the contribution graph. Colors are specified in RGB format.
[graph_colors]
level1 = "39,168,68" # Light green for low contributions
level2 = "45,135,67" # Medium green
level3 = "31,97,51" # Dark green
level4 = "23,70,38" # Very dark green for high contributions- Each level represents a different intensity of contributions.
- Values should be comma-separated RGB values (0-255 for each component).
This section sets the color for the informational text displayed alongside the graph.
[text_colors]
info_color = "86,182,194" # Light blue for info text- Specified as comma-separated RGB values.
This section defines the thresholds for each contribution level in the graph.
[graph_data]
percentiles = [30, 60, 80, 100]- The
percentilesarray contains four values representing the breakpoints for each contribution level. - Values are percentiles of the user's contribution range.
- In this example:
- 0-30th percentile: level1 color
- 31-60th percentile: level2 color
- 61-80th percentile: level3 color
- 81-100th percentile: level4 color
Here's a complete example of a config.toml file:
[graph_colors]
level1 = "39,168,68"
level2 = "45,135,67"
level3 = "31,97,51"
level4 = "23,70,38"
[text_colors]
info_color = "86,182,194"
[graph_data]
percentiles = [30, 60, 80, 100]After modifying the config.toml file:
- Save the changes.
- Run Gitfetch again. The new configuration will be automatically applied.
To reset to the default configuration:
- Delete the
config.tomlfile. - Run Gitfetch. A new
config.tomlfile with default values will be created.
If you encounter issues with your configuration:
- Ensure all RGB values are within the 0-255 range.
- Check that the
percentilesarray has exactly four values. - Verify that the
config.tomlfile is properly formatted TOML.
If problems persist, you can temporarily rename or remove the config.toml file to use the default configuration while troubleshooting.
[... rest of the README unchanged ...]
- Customize the graph color
- Customize output text color
- Customize graph display
- Use
gitto get username - Specify a user
- Specify a year
- Display highest contribution
- Display longest streak
- Display current streak
- Add support for other Git hosting platforms
We welcome contributions to Gitfetch! Here's how you can help:
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a pull request
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
Note: Gitfetch is under active development. Features and documentation may be incomplete or subject to change. We appreciate your feedback and contributions!