把 GitHub Star 从“杂乱收藏夹”整理成清晰的 Star Lists。
这是一个安全优先的 TypeScript CLI 工具。它会先读取你的 GitHub 星标仓库,按规则自动分类,生成本地报告和写入计划。只有你确认后执行 apply --yes,它才会去 GitHub 创建或更新 Star Lists。
- Star 了很多仓库,回头找东西很痛苦。
- 想把 AI、代理网络、学习资料、RAG、自动化工具等仓库分门别类。
- 想先看分类结果,再决定是否写入 GitHub。
- 不想让工具乱删自己手动创建的 Star Lists。
- 想用规则分类为主,必要时再接 LLM 增强。
- 拉取当前用户的 GitHub Stars。
- 根据 repo name、description、topics、language 自动分类。
- 支持自定义分类、关键词、清单名和描述。
- 可选接入 OpenAI-compatible LLM,但默认关闭。
- 导出 Markdown / CSV 报告,方便人工复核。
- 生成
apply-plan.json,预览 GitHub 写入动作。 - 执行
apply --yes后创建或更新 GitHub Star Lists。 - 默认清单为 private。
- 只管理本工具负责的分类清单,保留用户已有清单。
默认行为是“先预览,后应用”:
plan只生成计划,不修改 GitHub。apply --yes才会写入 GitHub。- 新建 Star Lists 默认是私有。
- 保留你手动创建的其他清单。
- 报告和错误信息会脱敏常见 GitHub token。
- LLM 默认关闭;开启后也只发送公开仓库元数据。
当前项目还没有发布到 npm。先用源码方式运行:
git clone https://github.com/ybbms777/github-star-auto-organizer.git
cd github-star-auto-organizer
npm install
npm run build
npm link登录 GitHub:
gh auth login
gh auth refresh -s user生成配置并开始整理:
star-organizer init
star-organizer fetch
star-organizer classify
star-organizer plan先检查这些文件:
classification.mdclassification.csvapply-plan.jsonrun-report.md
确认没问题后,再写入 GitHub:
star-organizer apply --yes| 文件 | 作用 |
|---|---|
starred-repos.json |
本地缓存的 GitHub Star 数据 |
classification.md |
适合直接阅读的分类报告 |
classification.csv |
适合表格筛选和人工复核 |
apply-plan.json |
写入 GitHub 前的详细计划 |
run-report.md |
apply 后的执行报告 |
这些运行产物默认被 .gitignore 忽略,避免把个人 Star 数据提交到仓库。
| 命令 | 作用 |
|---|---|
star-organizer init |
生成 star-organizer.config.yaml |
star-organizer fetch |
拉取星标到 starred-repos.json |
star-organizer classify |
生成 classification.csv 和 classification.md |
star-organizer plan |
生成 apply-plan.json 和预览报告,不写 GitHub |
star-organizer apply --yes |
按计划创建或更新 GitHub Star Lists |
star-organizer report |
从本地缓存重新导出分类报告 |
内置分类使用中英双语清单名,方便中英文项目混合整理:
AI Agent / AI代理Proxy & Network / 代理网络AI Creation / AI创作Writing / 小说写作Automation / 自动化采集Web Admin / Web后台Learning / 学习资料LLM & RAG / 大模型与RAGFinance / 金融量化Productivity / 翻译OCRDevOps / 工程基础设施Security / 安全逆向Game & ACG / 游戏ACGAccount & Privacy / 账号隐私Uncategorized / 待复核
默认配置文件是 star-organizer.config.yaml:
github:
auth: auto
tokenEnv: GITHUB_TOKEN
listPrivate: true
preserveUserLists: true
managedListPrefix: ""
llm:
enabled: false
baseUrl: https://api.openai.com/v1
apiKeyEnv: OPENAI_API_KEY
model: gpt-4.1-mini
batchSize: 20
output:
cachePath: starred-repos.json
classificationCsvPath: classification.csv
classificationMdPath: classification.md
applyPlanPath: apply-plan.json
runReportPath: run-report.mdLLM 默认关闭。开启后,只发送这些公开字段:
- repo full name
- description
- language
- topics
- GitHub URL
- homepage
- archived / fork 状态
不会发送:
- GitHub token
- 星标时间
- 用户已有清单名
- 本地路径
npm install
npm run check测试覆盖:
- 规则分类优先级
- 手动覆盖规则
- LLM fallback
- 清单同步策略
- mock GitHub apply 流程
- token 脱敏
MIT