Skip to main content

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

  1. Fetch stars via gh api graphql
  2. Classify repositories with an OpenAI-compatible LLM
  3. Generate embeddings for semantic similarity
  4. Cache everything in local SQLite
  5. Build/update FAISS index
  6. Create and populate GitHub Star Lists
  7. Produce stars-insights.md recommendations

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 user scope 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 organize
  • gh-stars-organizer preview
  • gh-stars-organizer insights
  • gh-stars-organizer search <query>
  • gh-stars-organizer config
  • gh-stars-organizer sync
  • gh-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:

  1. In PyPI, create a trusted publisher for this GitHub repository and workflow publish.yml.
  2. In GitHub, keep the pypi environment (or create it) and allow this workflow to run.
  3. 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

gh_stars_organizer-0.1.0.tar.gz (18.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_stars_organizer-0.1.0-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

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

Hashes for gh_stars_organizer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 51e94be6e60eecbf769b72daa4175fa7da5ed8c50e3f717b1bd18a353cd40314
MD5 ce54e00747bcffa3f6b3531870b23dec
BLAKE2b-256 fb4077e6eca97c4793c175cec71f8bdb60418afb2df0281da028957ea9286428

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_stars_organizer-0.1.0.tar.gz:

Publisher: publish.yml on vins13pattar/gh-stars-organizer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gh_stars_organizer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gh_stars_organizer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b44116bb704f9eaa95f5a1b25cf19bddb075966fbd01a81bc399343b7d138e1
MD5 f4e071a1a2019130c6ee49afdef51118
BLAKE2b-256 5a370fbb815222a2b52ebbd5a95ea7bbf36744b53c784843a758e1652aac39df

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page