Back to Blog

How to Export GitHub Starred Repos to Markdown (Complete Guide)

GithubBackup

You've spent years starring repos on GitHub. Those starred repos represent hours of discovery — libraries you evaluated, tools you bookmarked, projects that inspired you. But what if GitHub goes down? If your account gets compromised? Or if you just want to integrate your collection with your note-taking system?

Exporting your starred repos to Markdown is the answer. It's an open format, human-readable, and compatible with virtually every note-taking and knowledge management tool. Here's how to do it.

Why Markdown?

There are plenty of export formats — JSON, CSV, SQLite databases. But Markdown has unique advantages:

  • Human-readable. Open a Markdown file in any text editor and you can immediately understand what's there.
  • Highly portable. Obsidian, Notion, Logseq, Joplin, Yuque — every knowledge management tool supports Markdown.
  • Version-control friendly. Markdown files diff cleanly in git, making it easy to track changes to your starred repo collection over time.
  • Future-proof. It's plain text. It will be readable in 20 years.

Method 1: GitHub API (Manual, Full Control)

If you're comfortable with the command line, the GitHub API gives you the most flexibility.

Step 1: Generate a GitHub personal access token at github.com/settings/tokens. You only need the public_repo scope (no write access required). Step 2: Use curl or a script to fetch your starred repos:
curl -H "Authorization: token YOUR_TOKEN" \
     -H "Accept: application/vnd.github.v3+json" \
     "https://api.github.com/user/starred?per_page=100&page=1"
Step 3: Pipe the JSON output through a formatting script. Here's a minimal Python example:
import json, sys

stars = json.load(sys.stdin)
for repo in stars:
    print(f"## [{repo['full_name']}]({repo['html_url']})")
    print(f"⭐ {repo['stargazers_count']} | 🗣 {repo['language'] or 'N/A'}")
    print(f"{repo['description'] or 'No description'}")
    print()
Step 4: Handle pagination. The GitHub API returns up to 100 repos per page. Check the Link header in the response for the next page URL, and loop until you've fetched everything.

This method works, but the downsides are clear: you need to write and maintain the script yourself, handle rate limiting (60 requests/hour unauthenticated, 5,000/hour with a token), and remember to re-run it regularly.

Method 2: GitHub Web Interface (Quick, but Limited)

For a quick one-off export with zero setup:

1. Go to github.com/?tab=stars

2. Scroll down to load all your starred repos (painful if you have thousands)

3. Use a browser extension like "Copy as Markdown" to capture the page content

4. Paste into a Markdown file

Limitations: No auto-updating. Manual scrolling. Only captures what's visible on screen.

Method 3: Open-Source Scripts (Community Options)

Several open-source scripts automate the API approach:

  • amirhmoradi/starred: A Python script that pulls all your starred repos and outputs a single Markdown file. Simple, focused, and effective.
  • starred-repo-exporter: A Python script with more formatting options, including the ability to include README excerpts.
  • gh-star-export: Uses the gh CLI for authentication, reducing setup friction.

These scripts are more convenient than hand-rolling your own, but still require manual periodic re-runs and some command-line comfort.

Method 4: One-Click Export with GithubBackup — GitHub Repo Backup & AI Analyzer

GithubBackup, a GitHub repo backup and AI analyzer tool, has Markdown export built in. After connecting your GitHub account:

1. Go to My Repos in the dashboard

2. Click Export Markdown

3. Download the generated file when it's ready

The export includes every repo in your collection — name, URL, description, star count, and AI-generated summaries, categories, and tags (Pro feature). Files are generated asynchronously (no waiting for API pagination) and stored for 7 days.

What you get: A clean, category-organized Markdown file:
# My GitHub Starred Repos

## Web Development
- **[vercel/next.js](https://github.com/vercel/next.js)** — The React Web Framework
  ⭐ 128K | TypeScript
  ...

## Artificial Intelligence
- ...
Limitations: The export is a snapshot, not live-synced. If you star new repos, you'll need to re-export. Pro members get AI summaries in their exports.

Automation: Keep Your Export Current

Whichever method you choose, the key to making exports useful is keeping them updated. Two paths:

1. Scheduled reminders. Set a recurring calendar reminder to export monthly or quarterly. Low-tech but effective.

2. CI/CD automation. If using Method 1 or 3, set up a GitHub Action that runs the export script on a schedule (e.g., weekly) and commits the Markdown file to a repo. This gives you a version-controlled history of your starred repos over time.

What to Do With Your Export

Once you have your starred repos as Markdown:

  • Import into Obsidian/Logseq for full-text search across your entire knowledge base
  • Store in a git repo for version-controlled backup
  • Archive to cloud storage (S3, R2, Google Drive) as a disaster recovery measure
  • Feed into an LLM to ask questions about your collection ("what testing libraries have I starred?")
  • Share with teammates as a curated resource list

The Takeaway

Your GitHub starred repos are a valuable knowledge asset. Exporting them to Markdown takes that asset out of a proprietary platform and puts it into a format you control.

Choose Method 1 if you want complete control, grab an open-source script if you want a middle ground, or use GithubBackup (the GitHub repo backup & AI analyzer) if you want something that just works with one click — plus AI-powered categorization and a Claude Code skill for your dev workflow.


Questions about exporting your starred repos? We're happy to help.