Fectivnfy112357/github-explore:gh CLI 的 GitHub 发现与管理封装

前言

在 DSH / 智能体开发场景里,让智能体“搜索 GitHub”时,通常不只希望拿到一批仓库名,而是希望结果经过过滤、去重、相关度排序,并且能输出适合进入上下文窗口的摘要。

Fectivnfy112357/github-explore 是一个面向 AI coding agents 的 DSH 插件,定位是 Discovery + management wrappers around the gh CLI for AI coding agents。下面介绍它的功能、安装方式和典型用法。

这是什么

Fectivnfy112357/github-exploreFectivnfy112357 维护,采用 MIT 许可。

它围绕 gh CLI 提供 GitHub 发现与管理封装,包装 gh searchgh repo view,不新增新的 CLI 入口。使用它需要 gh CLI,并要求 Python 3.10+。

核心功能

下面列出已核实的插件能力:

  • Multi-axis exploration:支持 parallel axes、relevance scoring、canonical anchor recall、awesome-list signals。
  • Smart defaults:默认过滤 forks 和 archived repos,执行最小 star 下限,按 fullName 去重,并渲染 layered markdown summary。
  • Layered output:summary 输出到 stdout,full report 输出到临时文件。
  • --schema 支持:适用于 find_reposexplorerepo_summary;其他脚本镜像 gh search 的 camelCase 字段。
  • 不新增 CLI surface:能力均围绕 gh searchgh repo view 封装。

安装与启用

如果通过 DSH 插件方式安装,使用仓库 shorthand:

dsh plugin --profile web add Fectivnfy112357/github-explore

该插件会在运行时通过 ctx.skills 注册 skill。

使用前,先确认 gh CLI 已认证:

gh auth status

如果后续不再使用,可以移除插件:

dsh plugin --profile web remove github-explore

典型用法

以下命令来自已核实用法示例。执行前请确保当前工作目录包含对应的 scripts/ 目录,并且 gh 已完成认证。

基础仓库检索

按语言和最低 star 下限检索仓库:

python scripts/find_repos.py "vector database" --language python --min-stars 500

多轴探索

为同一主题定义多个检索轴,再合并结果:

python scripts/explore.py "multi-agent" --axis "framework|multi-agent framework in:readme; collaborative agents in:readme" --axis "protocol|A2A agent protocol in:readme; agent-to-agent communication in:readme"

机器可读输出

需要机器可读输出时,显式传入 --format json;管道不会自动切换输出格式。

查看输出结构

--schema 支持以下脚本:

  • find_repos
  • explore
  • repo_summary

输出位置

插件会把 summary 输出到 stdout,并把 full report 自动写入临时文件:

%TEMP%/gh-explore-{topic}-{ts}.md

适用场景与注意

适合需要把 GitHub 项目发现、摘要、JSON 输出纳入 DSH 智能体工作流的场景。

使用前注意:

  • 依赖 gh CLI,需要先完成认证。
  • 需要 Python 3.10+。
  • 插件以当前 DSH 进程权限运行,安装前建议检查源码和许可证。
  • 许可证为 MIT。
  • 输出会分层:stdout 摘要和临时文件完整报告。

链接

GitHub 仓库:

https://github.com/Fectivnfy112357/github-explore
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye