Organize GitHub starred repositories into intelligent Star Lists with LLMs and embeddings.
Project description
gh-stars-organizer
gh-stars-organizer is a production-grade CLI that helps developers clean up and navigate huge GitHub star collections using LLM classification, embeddings, local caching, and GitHub Star Lists automation.
Problem Statement
Most developers star hundreds of repositories, then struggle to rediscover useful ones. This tool solves that by:
- Fetching all starred repositories
- Classifying them into meaningful categories
- Creating/reusing GitHub Star Lists automatically
- Building semantic search with embeddings
- Generating actionable developer insights
How It Works
- Fetch stars via
gh api graphql - Classify repositories with an OpenAI-compatible LLM
- Generate embeddings for semantic similarity
- Cache everything in local SQLite
- Build/update FAISS index
- Create and populate GitHub Star Lists
- Produce
stars-insights.mdrecommendations
Architecture
flowchart TD
A["GitHub GraphQL API"] --> B["Fetch Stars"]
B --> C["LLM Classification"]
C --> D["Embeddings Generation"]
D --> E["Local SQLite Cache"]
E --> F["Create/Reuse GitHub Star Lists"]
F --> G["Assign Repositories to Lists"]
E --> H["Generate Insights Report"]
Features
- GitHub stars sync with pagination support
- LLM classification with custom categories
- Embedding-based semantic search
- Automatic GitHub Star List creation and assignment
- Insights report: top categories, technologies, cleanup suggestions
- Repo discovery engine:
- archived candidates
- inactive repositories
- potential duplicate clusters
- Local SQLite cache for classifications and embeddings
- Rate limiting and retries for GitHub and LLM APIs
Installation
Prerequisites
- Python 3.11+
- GitHub CLI (
gh) authenticated (gh auth status) - GitHub CLI token with
userscope for GitHub List updates (gh auth refresh -s user) OPENAI_API_KEY(or compatible API key)
Install from source
git clone https://github.com/<your-org>/gh-stars-organizer.git
cd gh-stars-organizer
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Configuration
Default config path: ~/.gh-stars-organizer/config.yaml
Generate default config:
gh-stars-organizer config --init
Example values are in examples/config.yaml.
CLI Usage
gh-stars-organizer sync
gh-stars-organizer preview
gh-stars-organizer organize
gh-stars-organizer insights
gh-stars-organizer search "vector database for RAG"
gh-stars-organizer tui
Commands
gh-stars-organizer organizegh-stars-organizer previewgh-stars-organizer insightsgh-stars-organizer search <query>gh-stars-organizer configgh-stars-organizer syncgh-stars-organizer tui
TUI Mode
Launch the interactive terminal UI:
gh-stars-organizer tui
It provides:
- One-click sync, preview, organize, and insights actions
- Semantic search panel
- Live status updates while operations run
GitHub List API Note
This tool uses GitHub User Lists GraphQL APIs (lists, createUserList, updateUserListsForItem) for organization.
If your gh token is missing user scope, organization falls back to local categorized files under ~/.gh-stars-organizer/lists.
Example CLI Output
Fetching starred repositories...
Fetched 742 repositories.
Classifying repositories...
langchain-ai/langchain -> genai-llm-agents
fastapi/fastapi -> backend-api-frameworks
vercel/next.js -> frontend-ui-frameworks
Creating list: genai-llm-agents
Done. Created 8 lists and processed 742 repository assignments.
Insights Report
Running gh-stars-organizer insights creates stars-insights.md with:
- Most Starred Categories
- Top Technologies
- Archived/inactive/duplicate recommendations
Project Structure
gh-stars-organizer/
├── gh_stars_organizer/
│ ├── cli.py
│ ├── github_client.py
│ ├── classifier.py
│ ├── embeddings.py
│ ├── cache.py
│ ├── organizer.py
│ ├── insights.py
│ ├── config.py
│ └── models.py
├── tests/
├── examples/
├── README.md
├── pyproject.toml
└── LICENSE
Development
Run tests:
pytest -q
GitHub Actions Workflows
CI(.github/workflows/ci.yml): runs tests on Python 3.11/3.12 and validates package build on every push/PR.Publish(.github/workflows/publish.yml): builds and publishes to PyPI on GitHub Release publish (or manual dispatch).
PyPI Publishing Setup
Use PyPI Trusted Publishing:
- In PyPI, create a trusted publisher for this GitHub repository and workflow
publish.yml. - In GitHub, keep the
pypienvironment (or create it) and allow this workflow to run. - Create a GitHub Release to trigger publish.
Contribution Guide
See CONTRIBUTING.md.
Publish to PyPI
python -m build
twine upload dist/*
Future Extensions
Designed to support:
- automatic repository tagging
- GitHub Copilot integration
- developer skill graph
- AI recommendation workflows
- VSCode extension integration
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gh_stars_organizer-0.1.0.tar.gz.
File metadata
- Download URL: gh_stars_organizer-0.1.0.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51e94be6e60eecbf769b72daa4175fa7da5ed8c50e3f717b1bd18a353cd40314
|
|
| MD5 |
ce54e00747bcffa3f6b3531870b23dec
|
|
| BLAKE2b-256 |
fb4077e6eca97c4793c175cec71f8bdb60418afb2df0281da028957ea9286428
|
Provenance
The following attestation bundles were made for gh_stars_organizer-0.1.0.tar.gz:
Publisher:
publish.yml on vins13pattar/gh-stars-organizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_stars_organizer-0.1.0.tar.gz -
Subject digest:
51e94be6e60eecbf769b72daa4175fa7da5ed8c50e3f717b1bd18a353cd40314 - Sigstore transparency entry: 1059369643
- Sigstore integration time:
-
Permalink:
vins13pattar/gh-stars-organizer@95cb692bee936b579f566d63826d08d102631809 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/vins13pattar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@95cb692bee936b579f566d63826d08d102631809 -
Trigger Event:
release
-
Statement type:
File details
Details for the file gh_stars_organizer-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gh_stars_organizer-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b44116bb704f9eaa95f5a1b25cf19bddb075966fbd01a81bc399343b7d138e1
|
|
| MD5 |
f4e071a1a2019130c6ee49afdef51118
|
|
| BLAKE2b-256 |
5a370fbb815222a2b52ebbd5a95ea7bbf36744b53c784843a758e1652aac39df
|
Provenance
The following attestation bundles were made for gh_stars_organizer-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on vins13pattar/gh-stars-organizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_stars_organizer-0.1.0-py3-none-any.whl -
Subject digest:
5b44116bb704f9eaa95f5a1b25cf19bddb075966fbd01a81bc399343b7d138e1 - Sigstore transparency entry: 1059369648
- Sigstore integration time:
-
Permalink:
vins13pattar/gh-stars-organizer@95cb692bee936b579f566d63826d08d102631809 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/vins13pattar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@95cb692bee936b579f566d63826d08d102631809 -
Trigger Event:
release
-
Statement type: