Skip to content

joybiswas007/gh-traffic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📡 GitHub Traffic Stats

A simple CLI tool written in Golang to fetch and display GitHub repository traffic stats, including views and clones, in a markdown format that can be rendered beautifully in the terminal using Glow.

⚠️ Note: This project is still in heavy development. Expect things to break or change!

🚀 Features

  • Fetch views and clones data dynamically from GitHub.
  • Display data in Markdown tables.
  • Use Glow to render markdown beautifully in the terminal.

🛠️ Prerequisites

Before using the tool, ensure you have the following setup:

  1. GitHub API Token

    • Generate a fine-grained personal access token from GitHub:
      GitHub Token Guide
    • Export your token:
      export GH_API_KEY=your_github_api_key
      
  2. Set Your GitHub Username

    export GH_OWNER_UNAME=your_github_username
    
  3. Install Glow (for markdown rendering)

    https://github.com/charmbracelet/glow?tab=readme-ov-file#installation
    

📥 Installation

You can install the CLI tool using go install:

go install github.com/joybiswas007/gh-traffic@latest

Make sure $GOPATH/bin is in your PATH to run the installed binary globally.


🏃‍♂️ Running Locally

To run the tool locally without installing it globally:

  1. Clone the repository:

    git clone https://github.com/joybiswas007/gh-traffic.git
    cd gh-traffic
    
  2. Install dependencies:

    go mod tidy
    
  3. Build the application:

     make install
    
  4. Run it

        gh-traffic
    

🏃️ Usage

Run the CLI tool to fetch views and clones data:

./gh-traffic # Fetch and display Views AND Clones data

🎯 Credits

  • Built with ❤️ using Golang.
  • Markdown rendering powered by Glow.

About

A CLI tool written in Go to fetch and display GitHub repository traffic stats (views/clones).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published