Export your GitHub stars

GitHub has no export button for stars, but the API has everything. Each command below needs the GitHub CLI, logged in with gh auth login.

JSON, with the date you starred each repo

gh api -H "Accept: application/vnd.github.star+json" \
  "user/starred?per_page=100" --paginate > stars.json

The star+json header adds starred_at to each entry. --paginate follows every page, 100 repos at a time. For someone else's public stars, swap user/starred for users/<name>/starred.

CSV for a spreadsheet

gh api "user/starred?per_page=100" --paginate \
  --jq '.[] | [.full_name, .html_url, .stargazers_count, .language] | @csv' > stars.csv

Add any field from the repo object to the list: .description, .pushed_at, .archived, .topics.

Your Lists too

The REST API has no Lists. GraphQL does:

gh api graphql -f query='{ viewer { lists(first: 32) { nodes { name items(first: 100) { nodes { ... on Repository { nameWithOwner } } } } } } }' > lists.json

That covers the first 100 repos of each List; a bigger List needs a second page with after:.

Everything in one file, tags and notes included

Stard, a free and open-source organizer for GitHub stars, keeps a backup file with your stars, your Lists, and the tags, notes and 1–5 ratings you add in Stard. Run Stard on your machine, open Backups and press Download. The same file restores into Stard later.