Gitstar
A fast, lightweight, zero-dependency command-line tool to calculate the total number of stars earned by any GitHub user or organization.
Features
- Fast & Zero Dependencies: Built entirely with Python's standard library. No external runtime dependencies.
- Cross-Platform: Full support for Linux, macOS, and Windows (with safe terminal encoding fallbacks).
- Authentication & Rate-Limit Friendly: Supports GitHub Personal Access Tokens (
--tokenorGITHUB_TOKEN/GH_TOKENenvironment variables) to bypass the unauthenticated 60 requests/hour limit. - Informative Output: Clean tabular layout ranking repositories by stars.
Installation
Install via pip:
pip install gitstar
Or upgrade to the latest version:
pip install --upgrade gitstar
Usage
Basic Usage
Find the total stars for any GitHub user or organization:
gitstar <username>
Example:
gitstar torvalds
Limiting Results
Display only the top $N$ starred repositories:
# Using positional shorthand:
gitstar torvalds 5
# Or using the -l / --limit flag:
gitstar torvalds --limit 5
Output Example
Total ⭐️ 234120
https://github.com/torvalds/linux ⭐️ 186400
https://github.com/torvalds/subsurface ⭐️ 3150
https://github.com/torvalds/pesconvert ⭐️ 285
Authentication & Rate Limits
By default, unauthenticated GitHub API requests are limited to 60 requests per hour per IP address.
To increase your limit to 5,000 requests per hour, provide a GitHub Personal Access Token using either:
-
Environment Variable (recommended):
export GITHUB_TOKEN="ghp_your_token_here" gitstar torvalds
(On Windows PowerShell:
$env:GITHUB_TOKEN="ghp_your_token_here") -
CLI Option:
gitstar torvalds --token ghp_your_token_here
CLI Options Reference
usage: gitstar [-h] [-l LIMIT] [-t TOKEN] [-v] [username] [limit]
Calculate the total stars earned by a GitHub user or organization.
positional arguments:
username GitHub username or organization
limit Number of top repositories to display (positional shorthand)
options:
-h, --help show this help message and exit
-l, --limit LIMIT Number of top repositories to display
-t, --token TOKEN GitHub Personal Access Token (defaults to GITHUB_TOKEN or GH_TOKEN)
-v, --version show program's version number and exit
License
This project is licensed under the MIT License.
Metadata
Release files for gitstar 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gitstar-1.1.0.tar.gz | 7.4 kB | Without provenance | Details for gitstar-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitstar-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for gitstar-1.1.0-py3-none-any.whl |
Total release size: 14.0 kB
Release files / gitstar-1.1.0.tar.gz
| Download URL | gitstar-1.1.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bab2dc5fb7e26d890d5182f12635da0ad038106c81292ac7e48b1ec13c85da27
|
|
BLAKE2b-256 checksum How to use checksums |
e93e4480d1ac9fea864102059040cd7da93bef999f614f8f2b540bd091505e33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Release files / gitstar-1.1.0-py3-none-any.whl
| Download URL | gitstar-1.1.0-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
44872734d4c985cb7f6437f69a6b36584edb3d085a68a4b9c294ae13ed6002a7
|
|
BLAKE2b-256 checksum How to use checksums |
4a2a7dcf390d277753c0f6bf11cbfa59304ef54f6820bf5b9e87f5340c16af6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Security for gitstar 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.