Skip to main content

A tool to fetch GitHub stargazers and plot growth over time.

Project description

GitHub Stargazers Growth Plotter Banner

📈 GitHub Stargazers Growth Plotter

Python GitHub CLI Matplotlib License: MIT

Note: As the stargazers API for 3rd party repos gets deprecated or restricted, repository owners can use this tool to easily fetch and publish their own repository's growth charts!

🚀 GitHub Stargazers Growth Plotter is an automated tool that fetches the stargazers history of any GitHub repository, caches it locally, and generates a stunning SVG growth plot. Designed for repository owners, this script can auto-publish charts directly to your README.md for maximum visibility and better SEO indexing of project metrics.

✨ Features

  • 🔐 Automated Authentication: Seamlessly integrates with your active GitHub CLI (gh) token. Zero manual token configuration required!
  • 🎯 Zero-Config Context: Automatically detects your current repository from your git config if run without arguments.
  • 🗄️ Local Caching: Caches historical stargazer data in a CSV file and dynamically appends it to your .gitignore to prevent accidental commits.
  • 📊 High-Quality Plotting: Renders beautiful, scalable vector .svg plots optimized for web display, saving them cleanly in an assets/ directory.
  • 📝 Auto-Publishing: With a simple flag, automatically inject your latest growth chart into your README.md within a perfectly centered HTML block.

🛠️ Prerequisites

  1. Python 3.x: Ensure Python is installed on your system.
  2. GitHub CLI (gh): You must have the GitHub CLI installed and authenticated.
    gh auth login
    
  3. Installation: Install the tool via PyPI:
    pip install github-growth-plotter
    
    (To install from source locally, clone the repo and run pip install .)

🚀 Usage Guide

1️⃣ Run for the current repository

If you are already inside a Git repository folder, you can simply run:

github-growth-plot

This detects the repository, downloads the stargazers to a CSV, and outputs the SVG plot in the assets/ directory.

2️⃣ Run for a specific repository

You can specify any repository using the standard owner/repo format:

github-growth-plot "google/jax"

3️⃣ Auto-publish to README

Want to display the chart on your project's main page? Pass the --publish flag:

github-growth-plot --publish

This automatically appends the following HTML snippet to the bottom of your README.md:

<p align="center">
  <img src="./assets/<username>_<reponame>_growth.svg" alt="<owner>/<repo>" width="100%" />
</p>

📂 Generated Files

When executed, the script generates and manages the following files:

  • 🖼️ assets/<username>_<reponame>_growth.svg: The generated vector graph showing star growth over time.
  • 📄 <username>_<reponame>_stargazers.csv: Raw historical star data (automatically ignored via .gitignore).
  • 🙈 .gitignore: Updated automatically to ignore the generated CSV file.

Made with ❤️ for Open Source Maintainers.

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

github_growth_plotter-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

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

github_growth_plotter-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file github_growth_plotter-0.1.0.tar.gz.

File metadata

  • Download URL: github_growth_plotter-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for github_growth_plotter-0.1.0.tar.gz
Algorithm Hash digest
SHA256 705ce499a1e90affadc6f44ca1a87e78f33855590b6b1b517ee269ac32a729ea
MD5 4f4ef0006ddb6983b1257284f46586b8
BLAKE2b-256 a8b39b875bea17988c31289b8476be3a4e53ed0559b727203f9c7765e793353e

See more details on using hashes here.

File details

Details for the file github_growth_plotter-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for github_growth_plotter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 768243920d79b5781899ea001e3e1c2265c0f1c88afe9aff5c13be5131031969
MD5 a16e8c89107e924729902ab87e126f8f
BLAKE2b-256 8d22704e5f94c3c1a84c6547864ef811d85fbd68f35be249fcf1a0de4a4191d1

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