Automatically organize your GitHub starred repositories into smart categories using AI
Tired of scrolling through hundreds of starred repos? This CLI tool uses Gemini 2.5 Flash to intelligently categorize your GitHub stars into 18 organized lists β automatically.
- π€ AI-Powered β Gemini 2.5 Flash analyzes repos by description, language, and topics
- β‘ Blazing Fast β Processes 200 repos in ~12 seconds with batch optimization
- π° Cost-Effective β ~$0.08 per 200 repos on paid tier, free tier works great
- πΎ Smart Caching β Only analyzes new repos, reuses previous categorizations
- π Auto-Sync β GitHub Actions workflow for daily automated updates
- π 18 Categories β From "AI & LLM" to "Trading & Finance" with emoji prefixes
- π― Batch Processing β 10 repos per GraphQL request for optimal performance
- π Retry Logic β Automatic exponential backoff for rate limit handling
- Node.js 20+
- GitHub CLI authenticated
- Gemini API key (free tier available)
# Clone and setup
git clone https://github.com/Brayan233/github-stars-categorizer.git
cd github-stars-categorizer
pnpm install
# Configure
cp .env.example .env
# Add your GEMINI_API_KEY to .env# Categorize all your stars
pnpm categorize
# Dry run first (recommended)
pnpm categorize --dry-run
# Test with a few repos
pnpm categorize --dry-run --limit 10
# Skip cache to re-analyze everything
pnpm categorize --skip-cache
# Keep existing lists instead of clearing
pnpm categorize --keep-listsYour stars are organized into 18 smart categories:
| Category | Examples |
|---|---|
| π€ AI & LLM | LangChain, OpenAI Node, Vercel AI SDK |
| π¨ UI & Design Systems | shadcn/ui, Tailwind, Radix UI |
| βοΈ Frontend Frameworks | Next.js, Remix, Svelte |
| π Backend & Runtimes | Deno, Hono, tRPC, Payload CMS |
| π³ DevOps & Containers | Kubernetes, Docker, OrbStack |
| π» CLI & Terminal | Starship, Zed, Warp |
| π Web Scraping & APIs | Puppeteer, Axios, Crawl4AI |
| π Logging & Debug | PostHog, Sentry, Plausible |
| π Databases & Auth | Prisma, NextAuth, Neon |
| π Learning Resources | Awesome lists, tutorials, cheatsheets |
| π§° Utilities & Libraries | Lodash, Ramda, type-fest |
| ... and 7 more! |
Benchmark (196 repos):
- Total time: ~12 seconds
- Cost: ~$0.081 (Gemini Flash paid tier)
- Avg latency: ~1s per repo
- Failures: 0
How it's optimized:
- β‘ 40 concurrent workers (1,000 RPM limit)
- π¦ Batch GitHub API requests (10 repos/request)
- πΎ Permanent analysis cache
- π Smart retry with exponential backoff
Automate daily categorization with the included workflow:
# .github/workflows/categorize-stars.yml already configured!
# Runs daily at 2 AM UTCSetup:
- Add
GEMINI_API_KEYto repository secrets - Push the workflow file
- Enable Actions in your repo settings
See GITHUB-ACTIONS-SETUP.md for full guide.
graph LR
A[Fetch Stars] --> B[Check Cache]
B -->|New| C[Analyze with Gemini]
B -->|Cached| D[Reuse Result]
C --> E[Save Cache]
D --> F[Batch Assign to Lists]
E --> F
F --> G[Done!]
- Fetch starred repos from GitHub API (cached 24h)
- Analyze with Gemini Flash (~1s per repo, thinking disabled for speed)
- Cache results permanently (only new repos analyzed on re-runs)
- Sync to GitHub Lists in batches of 10
All settings optional (sane defaults provided):
# Required
GEMINI_API_KEY=your_key_here
# Optional (defaults shown)
CACHE_MAX_AGE_HOURS=360 # 15 days
CATEGORIZER_CONCURRENCY=40
GEMINI_MODEL=gemini-2.5-flash
RETRY_DELAY_MS=1000
RETRY_MAX_ATTEMPTS=5Model options:
gemini-2.5-flashβ Fast & cheap (~1s/repo) β Recommendedgemini-2.5-proβ Slower but more accurate (~15s/repo)
First run (200 repos):
- Takes ~12 seconds total
- Costs ~$0.08 (Flash paid tier)
- Free tier: ~2-3 minutes (10 RPM limit)
Subsequent runs (+10 new repos):
- Only analyzes NEW repos (~1 second)
- Reuses cache for existing 190 repos
- Almost instant! β‘
Save money:
# Run weekly instead of daily
0 2 * * 0 pnpm categorize # Every Sunday- READY-TO-USE.md β Quick start guide
- GITHUB-ACTIONS-SETUP.md β Automation guide
- POSTHOG-SETUP.md β Analytics setup (optional)
- CHANGELOG.md β Version history
"Configuration Error: GEMINI_API_KEY is required"
# Get API key from https://aistudio.google.com/apikey
echo "GEMINI_API_KEY=your_key" >> .env"gh: command not found"
# Install GitHub CLI
brew install gh # macOS
# Then authenticate
gh auth loginRate limit errors
- Free tier: Reduce
CATEGORIZER_CONCURRENCYto 5 - Or wait 1 minute and retry (automatic exponential backoff)
Contributions welcome! Feel free to:
- Report bugs
- Suggest new categories
- Improve performance
- Add features
MIT Β© Brayan Oduro
Made with β€οΈ using Gemini 2.5 Flash
