Skip to main content

A CLI tool to fetch GitHub repository statistics

Project description

⚡️ repostats

A CLI tool to fetch GitHub repository statistics.

Installation

pip install repostats

Usage

# Basic usage
repostats python/cpython

# With GitHub token for higher rate limits
export GITHUB_TOKEN=your_token_here
repostats python/cpython

# Or pass token directly
repostats python/cpython --token your_token_here

Example output

python/cpython statistics
-------------------------
Stars       : 58,000
Forks       : 29,000
Open issues : 992
Watchers    : 3,400
Language    : Python
Created     : 2007-02-20T00:00:00Z
Updated     : 2024-01-15T12:34:56Z

The command exits with code 1 when the GitHub API request fails (for example, when the repository is missing or you hit a rate limit), which makes it easy to integrate into scripts.

Features

  • Fetch repository statistics including stars, forks, issues, and more
  • Support for GitHub API token authentication
  • Clean, accessible output that works well in plain-text terminals
  • Helpful error messages and non-zero exit codes on failure
  • Cross-platform compatibility

Development

# Clone the repository
git clone https://github.com/sahansera/repostats.git
cd repostats

# Create virtual environment
uv venv
source .venv/bin/activate

# Install in development mode
make install-dev

# Run tests
make test

# Format code
make format

# Type checking
make type-check

# See all available commands
make help

License

MIT

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

repostats-1.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

repostats-1.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file repostats-1.1.0.tar.gz.

File metadata

  • Download URL: repostats-1.1.0.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for repostats-1.1.0.tar.gz
Algorithm Hash digest
SHA256 81dc60eb136ef19f3caee75b20b0675d1161d480fa87d59da6adbd1bdd5d11fd
MD5 117283cf284c8b6741efed8c9a8dbdc2
BLAKE2b-256 98d76e8f1b2e43b3cd7198ee20722a5879d70ffdef676476b01aa778e8bfa2ae

See more details on using hashes here.

File details

Details for the file repostats-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: repostats-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for repostats-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c355cfaaab9b92fc86c2fbfeb8ff0af6dc3f729882e4a1fb5e38c190fd55fa82
MD5 00466cba32de83e38d3d0e1e67d2cb01
BLAKE2b-256 f024d6b1de07d74c8fa2b089689f053e9c9d548e5719fd5b1f3f8c292a7d67dc

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