Skip to content

Latest commit

 

History

History
106 lines (73 loc) · 2.58 KB

README.md

File metadata and controls

106 lines (73 loc) · 2.58 KB

github-star

GitHub Star Statistics

🐚 A lightweight shell script to analyze and visualize the daily star statistics of GitHub repositories.

English | 简体中文

github-star-demo.mp4

✨ Features

  • 📊 Track daily star counts for any GitHub repository
  • 📈 Generate statistics and trends
  • 💻 Easy-to-use command line interface
  • 🎨 Colorful output for better visualization

🚀 Prerequisites

⚠️ Important Notes:

  • Currently only supports macOS
  • Requires GitHub CLI authentication
  • Internet connection required for API access

Required tools:

  • 🔧 macOS operating system
  • 🛠 GitHub CLI (gh)
  • 🔍 jq command line tool
  • 🐚 Bash shell environment

🔧 Installation

  1. Install GitHub CLI:
brew install gh
  1. Install jq:
brew install jq
  1. Login to GitHub:
gh auth login

📖 Usage

There are several ways to use this tool:

1. 🌐 Direct Usage (No Download Required)

# Using curl
curl -s https://raw.githubusercontent.com/elliotxx/github-star/main/github-star.sh | bash -s -- KusionStack/karpor

# Using wget
wget -qO- https://raw.githubusercontent.com/elliotxx/github-star/main/github-star.sh | bash -s -- KusionStack/karpor

# Pipe directly to bash
bash <(curl -s https://raw.githubusercontent.com/elliotxx/github-star/main/github-star.sh) KusionStack/karpor

2. 💾 Local Installation

# Download the script
curl -O https://raw.githubusercontent.com/elliotxx/github-star/main/github-star.sh

# Make the script executable
chmod +x github-star.sh

# Run the script
./github-star.sh owner/repo

# Example usage
./github-star.sh KusionStack/karpor

3. ⚡️ Alias Setup

Add one of these aliases to your shell configuration file (~/.bashrc, ~/.zshrc, etc.):

# Basic alias
alias ghstar='/path/to/github-star.sh'

# Direct from GitHub (no local file needed)
alias ghstar='curl -s https://raw.githubusercontent.com/elliotxx/github-star/main/github-star.sh | bash -s --'

# Example usage with alias
ghstar KusionStack/karpor

📊 Output Format

The script outputs data in the following format:

  • 📅 Date: The date when stars were received
  • ⭐️ Stars: Number of stars received on that date
  • 📈 Total: Cumulative total of stars
  • 🔄 Trend: Visual indicator of star growth

⚖️ License

MIT License