Skip to main content

A CLI ricing tool designed to fetch GitHub user stats

Project description

hubfetch

banner

Description

A [not very minimal] fetching tool for your GitHub profile. Flex at your friends from terminal itself without even opening a new tab.

This entire script is written purely in python and uses GitHub's REST API for acquiring details of your profile, you can opt out of certain fields and even change the image rendered in accordance to your needs by editing at ~/.config/hubfetch.json

The image rendered depends heavily on the terminal as it requires kitty's graphics protocol and full image rendering is supported in those terminals which are capable enough of supporting it.

Don't worry if your favorite terminal doesn't support kitty's graphics protocol as the script downloads chafa as fallback to display your profile picture in ASCII-block art format.

Terminals Supporting Kitty's Graphics Protocol

Previews

First Time Installation & Kitty/Non-Kitty Looks

Alt Alt Alt

https://github.com/user-attachments/assets/9d06be44-fa36-4e24-bdee-a29838a801c3

Features

  • Comprehensive GitHub Stats: Fetches real-time (ok maybe not that real-time, there is caching of data that is maintained each hour) data including repositories, total stars, forks, followers, and following count.
  • Contribution Tracking: Displays your total commits, open issues, and pull requests from the current year using GitHub's GraphQL API.
  • Image Rendering:
    • High-Res: Utilizes the Kitty graphics protocol for native, high-resolution avatar rendering.
    • Legacy/Fallback: Automatically detects terminal capabilities and falls back to chafa for high-quality ANSI symbols/block art.
  • Caching:
    • Avatar Cache: Refreshes your profile picture every 6 hours.
    • Stats Cache: Keeps your GitHub data fresh with a 1-hour expiration to minimize API calls and maximizes speed.
  • Dynamic Customization: Fully configurable via ~/.config/hubfetch/config.json as discussed earlier. Toggle individual fields, adjust image dimensions, or customize the entire color palette with bold and italic Rich styles.
  • Secure Authentication: Dedicated auth command to securely handle GitHub Personal Access Tokens (PAT) and verify credentials before setup.
  • Modern CLI Experience – Built with Click for a seamless command-line interface and Rich for beautiful, side-by-side terminal layouts.

Installation

[WIP]

Tech Stack

Python Click Rich Requests Chafa UV Hatchling Ruff Pytest

Future

Discussed in [[placeholder text till I make it public]]

All features/bug-fixes being implemented can be visible in the roadmap

A rich issue-template to raise all required changes.

License

MIT

Other

Star History Chart

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hubfetch-1.0.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hubfetch-1.0.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file hubfetch-1.0.0.tar.gz.

File metadata

  • Download URL: hubfetch-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for hubfetch-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9fbcf5e1abf22d7b64f4b99b09131607d1b6fa408c6ef2322d73eb8f83ea84f1
MD5 33ca1becad4b6afc3dc88ce2fcc3f1b5
BLAKE2b-256 70581fbe435900dfaea8a0fd66c28a85604d8f91c09a53d7baf97ac02a88e367

See more details on using hashes here.

File details

Details for the file hubfetch-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: hubfetch-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for hubfetch-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8d0c8beba14815ee31abb07a612f2ad0723b84d0fca0efb697fd6783348e177
MD5 69e20c7db0ef4e4d91d304f8df5ead6e
BLAKE2b-256 2864a4a853a5fc8f9c4a8b070d43d9e25f5d5d431442542694ac9b9fbd75f1c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page