Skip to content

host452b/star-pilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Star Pilot

A Python-powered GitHub Star auto-triage engine that classifies your starred repos into structured lists and generates dual-language navigation portals.

Python 3.12+ License: MIT GitHub Actions Stars Classified

English Portal · 中文门户 · Quick Start · How It Works


Why Star Pilot?

Most developers star hundreds of GitHub repos but never revisit them. Star Pilot solves this by automatically triaging your stars into 7 high-level categories using keyword scoring, then generating a browsable dual-language README portal — updated weekly via GitHub Actions.

Key capabilities:

  • Auto-classification — scores repos by description, topics, and language against a YAML rule engine
  • Dual-language portal — generates README.md (EN) + README_CN.md (CN) with navigation tables
  • GitHub Star List migration — creates lists via GraphQL and assigns repos automatically
  • CI/CD ready — triggers on new star events, weekly CRON, or manual dispatch

How It Works

┌──────────────┐     ┌───────────────┐     ┌──────────────┐     ┌────────────────┐
│ GitHub Stars │ ──> │ Triage Engine │ ──> │ 7 Star Lists │ ──> │ README Portal  │
│  (REST API)  │     │ (rules.yaml)  │     │  (GraphQL)   │     │  (EN + CN)     │
└──────────────┘     └───────────────┘     └──────────────┘     └────────────────┘

The triage engine loads keyword rules from config/rules.yaml, scores each starred repo, and assigns it to the highest-matching list:

List Scope Keywords
01_ai_nexus LLM, Agent, ML Frameworks, Inference llm, pytorch, transformers, agent, mcp
02_core_infra Compilers, HPC, CUDA, Profiling compiler, ebpf, kernel, profiler, llvm
03_dev_libs Python/C++ Libraries, SDKs, Testing pydantic, fastapi, linter, parser, sdk
04_ops_apps CLI, Terminal, Desktop Apps docker, cli, neovim, macos, self-hosted
05_ui_design Frontend, Graphics, Game Engines font, tailwind, game-engine, animation
06_res_vault Tutorials, Awesome Lists, Cookbooks awesome, roadmap, tutorial, cookbook
07_lab_wild Experimental, Uncategorized fallback for unmatched repos

Quick Start

git clone https://github.com/host452b/star-pilot.git
cd star-pilot
pip install -r requirements.txt

Commands

# preview: see where each repo would be classified
python main.py triage

# generate: build the dual-language README portal
python main.py readme

# migrate: create GitHub star lists + assign all repos via GraphQL
python main.py migrate

# full pipeline: triage + readme + migrate in one run
python main.py full

# cleanup: delete all star lists (stars themselves are preserved)
python main.py cleanup

Options

Flag Default Description
--token gh CLI auth GitHub Personal Access Token
--openai-key $OPENAI_API_KEY OpenAI key for CN translation
--rules config/rules.yaml Path to classification rules
--output output/ Portal output directory
--username host452b GitHub username for portal links

GitHub Actions Automation

The workflow (.github/workflows/pilot.yml) runs entirely on GitHub-hosted runners using gh CLI (pre-installed) for all API calls.

Trigger Schedule Action
Weekday CRON Mon-Fri 08:00 UTC readme — regenerate portal
Sunday CRON Sun 08:00 UTC full — triage + readme + migrate
Manual workflow_dispatch Choose triage / readme / migrate / full / cleanup

What happens each run:

  1. Fetches all starred repos via GitHub REST API (gh api --paginate)
  2. Classifies using keyword engine
  3. Generates dual-language portal
  4. Commits & pushes changes back to repo (if any)
  5. Writes a Job Summary visible in the Actions tab

Required secrets:

  • GH_PAT — Personal Access Token with user + repo scope (for star list GraphQL mutations and pushing commits)
  • OPENAI_API_KEY(optional) for Chinese translation via OpenAI API

Translation results are cached across runs via actions/cache to avoid redundant API calls.

Project Structure

star-pilot/
├── main.py                         # CLI entry point (5 commands)
├── config/rules.yaml               # keyword mapping rules (22 -> 7 lists)
├── src/
│   ├── gh_client.py                # GitHub REST + GraphQL API wrapper
│   ├── triage_logic.py             # keyword scoring classification engine
│   ├── translator.py               # EN -> CN translation (OpenAI + MD5 cache)
│   └── readme_builder.py           # dual-language portal generator
├── output/
│   ├── README.md                   # generated EN portal
│   └── README_CN.md                # generated CN portal
├── .github/workflows/pilot.yml    # CI/CD automation
└── requirements.txt                # httpx, pyyaml, openai

Customization

Edit config/rules.yaml to tune classification:

  • keywords — add domain-specific terms to any list
  • language_hints — boost score for repos in specific languages
  • overrides — force a specific repo into a specific list

Browse the Portal

English Portal
126 repos · 7 categories
中文门户
126 个项目 · 7 个分类

License

MIT