A CLI tool to fetch GitHub repository statistics.
pip install repostats# 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_herepython/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.
- 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
# 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
uv pip install -e ".[dev]"
# Run tests
pytest
# Format code
black .
isort .
# Type checking
mypy srcMIT
Much of the code was written by Claude 4 LLM. The code is provided under the MIT License, allowing for free use, modification, and distribution.