A simple CLI to archive your GitHub stars.
- Python 3.6 or higher
requests, for making HTTP requests to the GitHub APIcolorama, for colored terminal output on all platforms- A GitHub Personal Access Token (PAT). The PAT must have the
read:userscope enabled.
git clone https://github.com/ree-verse/github-star-exporter.git
cd github-star-exporter
pip install .
Note
For development, you can also install it in editable mode:
pip install -e .
To run with the authenticated user:
github-star-exporter --token TOKENTo target a specific user:
github-star-exporter --token TOKEN --user octocatTo select a specific output path:
github-star-exporter --token TOKEN --output /path/to/output.jsonHere are all available commands:
$ github-star-exporter --help
usage: github-star-exporter [-h] [-t TOKEN] [-u USER] [-o OUTPUT] [-v]
Export (your) GitHub starred repositories to a JSON file.
options:
-h, --help show this help message and exit
-t TOKEN, --token TOKEN
GitHub access token (needs read:user permission)
-u USER, --user USER Target GitHub username (default: authenticated user)
-o OUTPUT, --output OUTPUT
Output JSON file (default: output.json)
-v, --version Version informationTip
You can also export all repositories owned by the user instead of starred repos.
Just change the API endpoint in the code from /starred to /repos.
Example output file:
[
{
"name": "ReXOR",
"full_name": "Ree-verse/ReXOR",
"private": false,
"html_url": "https://github.com/Ree-verse/ReXOR",
"description": "Cross-platform Rust library with CLI app implementing XOR encryption/decryption",
"fork": false,
"homepage": "https://crates.io/crates/ReXOR",
"language": "Rust",
"forks_count": 0,
"stargazers_count": 1,
"topics": [
"cli",
"decryption",
"encryption",
"security",
"xor"
],
"archived": false,
"visibility": "public",
"owner": "Ree-verse",
"pushed_at": "2025-10-22T11:58:36Z",
"created_at": "2025-10-22T09:30:23Z",
"updated_at": "2025-10-22T11:58:39Z",
"license_name": "MIT License"
}
]If you have questions, suggestions, or want to hang out with other developers, join my Discord server: Ree-verse GitHub Support.
This project was inspired by JeffCarpenter/export-stars. Many thanks to Jeff Carpenter for the inspiration.
Released under the MIT License © 2025 Ree-verse.