Skip to content

Latest commit

 

History

History
85 lines (56 loc) · 2.81 KB

File metadata and controls

85 lines (56 loc) · 2.81 KB

github-discover-cli

中文 | English

一个轻量级命令行工具,帮助你发现 GitHub 上新创建且快速增长的开源仓库和热门话题。

通过 GitHub Search API,按日 / 周 / 月 / 年维度筛选高星仓库、追踪增长趋势、洞察技术热点。

功能亮点

  • 增长趋势 (trending) — 基于「日均星标数」智能排序,突出真正快速崛起的项目
  • 热门仓库 (popular) — 指定时间段内新创建的高星仓库,按星标数排序
  • 话题洞察 (topic) — 热门仓库中的高频话题,综合频率与星标数评分排名
  • 支持按编程语言过滤,输出终端表格JSON

安装

需要 Node.js 18+

git clone https://github.com/coderyi/github-discover-cli.git
cd github-discover-cli
npm install && npm run build

使用方法

trending — 增长趋势

使用「日均星标数」(带平滑因子)衡量增长速度,区别于简单的星标排序。

github-discover trending                         # 近期增长最快的仓库
github-discover trending -p monthly -l Python    # 月度,限定 Python

popular — 热门新仓库

github-discover popular                          # 过去一天的热门仓库
github-discover popular -p weekly -l Rust        # 过去一周,限定 Rust
github-discover popular -p monthly -n 10 --json  # 月度,前 10 个,JSON 输出

topic — 话题洞察

统计热门仓库中的高频话题标签,综合出现次数和关联星标总数评分。

github-discover topic                            # 近期热门话题
github-discover topic -p yearly -n 20            # 年度,前 20 个

命令参考

所有子命令均支持以下选项:

选项 简写 说明 默认值
--period <period> -p 时间维度:daily | weekly | monthly | yearly daily
--limit <number> -n 返回结果数量(1–100) 50(topic 为 30
--language <lang> -l 编程语言过滤 不限
--min-stars <number> -s 最低星标数阈值 按时间维度自动设定 *
--json 以 JSON 格式输出 false

* --min-stars 默认值:daily 60 · weekly 500 · monthly 4000 · yearly 10000

输出示例

表格模式(默认):

Name Stars Lang Created URL Description
owner1/repo1 1234 TypeScript 2026-03-09 https://github.com/owner1/repo1 description

JSON 模式 可配合 jq 做进一步处理:

github-discover trending --json | jq '.[].full_name'

许可证

MIT