KNLCXY/dsh-github ↗★ 0

dsh-github

调用GitHub API进行代码提交和仓库管理 适合需要Agent直接操作GitHub仓库,且要求Token安全存储的用户。

包名
dsh-github
兼容性
待验证
Harness 依赖范围
^0.1.5-rc.2 || ^0.2.0-rc.1
Cordis 依赖范围
^4.0.2
版本
0.4.1
许可证
MIT
最近更新
2026年10月23日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:KNLCXY/dsh-github

填 token(唯一的配置步骤)

打开 设置 → GitHub,把 token 粘进第一个输入框,点保存。

输入框说明
GitHub token只有示例占位符 ghp_xxxxxxxxxxxxxxxxxxxx,没有默认值;不填就是没配
API 地址留空用 https://api.github.com;只有 GitHub Enterprise 才需要改
代理留空 = 直连。GitHub 直连超时的网络填 http://127.0.0.1:7897

也可以直接写文件(等价,改完下一轮工具调用即生效,不用重启):

// ~/.dsh/storages/dsh-github/settings.json
{
  "token": "ghp_xxxxxxxxxxxxxxxxxxxx",
  "apiBase": "https://api.github.com",
  "proxyUrl": "http://127.0.0.1:7897"
}

token 怎么建、要什么权限

你想干什么最小权限
只读仓库、看 issue / PRContents: Read(+ Issues: Read)
提交文件(github_push_files)Contents: Read and write
建仓库、设 topics再加 Administration: Read and write
用 classic token 图省事勾一个 repo 就全有了
  • fine-grained: → 选仓库 → 配上面几项 → Generate
  • classic: → 勾 repo → Generate

建议设过期时间(7–30 天)。不用了随时在同一个页面 Revoke。