A streamlined tool that fetches your GitHub starred repositories, categorizes them using any OpenAI-compatible LLM (like Ollama, OpenRouter, or OpenAI), and generates a beautiful browsable HTML wiki page.
- Fetch All Stars: Downloads all your starred repos with descriptions, READMEs, and metadata
- Smart Caching: Everything is cached - gracefully handles interruptions and continues where it left off
- LLM Categorization: Uses any OpenAI-compatible LLM to intelligently categorize your stars
- Browsable Wiki: Generates a self-contained HTML page with sidebar navigation
- Archive Support: Automatically separates archived/deleted repos into a separate archive page
- Progress Tracking: Beautiful progress bars show you exactly what's happening
- Graceful Exits: Press Ctrl+C anytime - progress is saved automatically
pip install -r requirements.txtCopy the template and edit with your details:
cp config.yaml.template config.yamlEdit config.yaml and add your:
- GitHub personal access token (get one here)
- LLM provider details (see examples below)
python organize.pyThe script will:
- Fetch all your starred repos (with caching)
- Categorize them using the LLM (with caching)
- Generate HTML files in
output/
Open output/index.html in your browser to browse your organized stars!
python organize.pyFetches all starred repos (uses cache for existing ones), categorizes uncategorized repos, and generates HTML.
python organize.py --recategorizeClears all categories and re-categorizes all repos from cached star data. Does not re-fetch from GitHub - uses existing cache. Perfect when you want to try different categorization without hitting GitHub API limits.
python organize.py --updateChecks GitHub for new/removed stars:
- Fetches new repos you've starred since last run
- Removes repos you've unstarred
- Preserves existing categorizations
- Only categorizes newly added repos
This is the most efficient way to keep your wiki up-to-date!
github_token: ghp_your_token_here
llm:
base_url: http://localhost:11434/v1
api_key: ollama
model: llama3.1github_token: ghp_your_token_here
llm:
base_url: https://openrouter.ai/api/v1
api_key: sk-or-v1-your_key_here
model: anthropic/claude-3.5-sonnetgithub_token: ghp_your_token_here
llm:
base_url: https://api.openai.com/v1
api_key: sk-your_openai_key_here
model: gpt-4o-minigithub-stars-organizer/
โโโ organize.py # Main script
โโโ config.yaml # Your configuration (not in git)
โโโ config.yaml.template # Configuration template
โโโ requirements.txt # Python dependencies
โโโ cache/ # Cached data (not in git)
โ โโโ stars.json # Cached repo data
โ โโโ categories.json # Cached categorizations
โโโ output/ # Generated HTML (not in git)
โโโ index.html # Main browsable wiki
โโโ archive.html # Archived repos (if any)
-
Fetch Phase: The script fetches all your starred repos from GitHub, including:
- Name, description, URL
- Programming language
- Star count
- README content (first 5000 chars)
- Archive status
- Everything is cached in
cache/stars.json
-
Categorize Phase: For each uncategorized repo, the LLM:
- Receives repo details and existing categories
- Assigns to an existing category OR creates a new one
- Generates a 2-3 sentence description
- Results cached in
cache/categories.json
-
Generate Phase: Creates self-contained HTML files:
index.html- Main wiki with sidebar navigationarchive.html- Archived/deleted repos (if any)- All CSS and JavaScript inline (no external dependencies)
Press Ctrl+C at any time - the script saves progress immediately and exits cleanly. Next run continues from where you left off.
- Repos are only fetched once (unless you delete the cache)
- Categorization happens incrementally (only new repos)
- Re-running is fast if you just want to regenerate HTML
The LLM is instructed to:
- Prefer existing categories when appropriate
- Only create new categories when necessary
- Use clear, descriptive category names
- This keeps your categories organized and prevents duplication
Repos marked as archived on GitHub are automatically separated into archive.html for reference.
Use the built-in recategorize mode:
python organize.py --recategorizeThis clears all categories and re-categorizes from cache (no GitHub API calls).
Set up a cron job or scheduled task:
# Update daily at 2 AM
0 2 * * * cd /path/to/github-stars-organizer && python organize.py --updateDelete all cache and output, then re-run:
rm -rf cache/ output/
python organize.pyEdit config.yaml:
readme_max_chars: 10000 # Send more README content to LLM- Python 3.9+
- GitHub Personal Access Token
- Access to an OpenAI-compatible LLM API
"GitHub API error": Check your GitHub token has the correct permissions "LLM error": Verify your LLM API is running and credentials are correct Script is slow: First run takes time (fetching all stars + categorization). Subsequent runs are much faster due to caching.
MIT License - see LICENSE file for details.
Built with:
- PyGithub - GitHub API
- OpenAI Python - Universal LLM client
- Rich - Beautiful terminal output
- PyYAML - YAML configuration
Note: This is a complete rewrite of the original project, focusing on simplicity, reliability, and a better user experience.