dsh-greasyfork
IdentifiedPush userscripts to GreasyFork the way you push code — read your scripts and version history, publish new scripts and updates, edit descriptions, search the site, and check account info, with credenti
dsh-greasyfork
把用户脚本像 git push 一样推到 GreasyFork 的 DeepSeek Harness 插件。
设置入口:设置 → GreasyFork。
能做什么
| 工具 | 作用 |
|---|---|
greasyfork_list | 列出自己发布的脚本 / 按关键词搜索站内脚本 / 热门 / 库脚本 |
greasyfork_status | 读某个脚本的名称、版本、版本历史、作者、链接(不需要登录) |
greasyfork_preflight | 发布前预检:元数据解析、版本冲突、namespace 变更、体积、@match 数量 |
greasyfork_push | 发布新脚本、发新版本(带 changelog)、dryRun 预览、sync 让站点从 GitHub 拉更新 |
greasyfork_auth | 凭证状态 / 保存 / 校验 / 清除 |
greasyfork_guide | 内置操作手册 |
命令行同样可用:
node lib/cli.js auth status
node lib/cli.js preflight --file my.user.js
node lib/cli.js push --file my.user.js --script-type public
node lib/cli.js push --file my.user.js --script-id 123456 --changelog "修复 X"
凭证:只手动录入,不驱动浏览器
2.0 起彻底移除了「自动开浏览器读 Cookie」那条路 —— 它会和用户自己的窗口抢 profile,还会被 Cloudflare 的 Turnstile 卡住。
现在的流程:
- 浏览器装 Cookie-Editor(或 EditThisCookie)。
- 登录
greasyfork.org。 - 扩展里点 Export → JSON,复制整段内容。
- 设置 → GreasyFork → 粘贴 → 校验并保存。
支持的粘贴格式(都会自动识别):
- Cookie-Editor / EditThisCookie 的 JSON 数组
- JSON 对象
{ "name": "value" }或{ "cookies": [...] } - Netscape
cookies.txt(7 列制表符) - DevTools 请求头里的整行
Cookie: a=1; b=2 - 多行
name=value - 单个
_greasyfork_session=...
凭证写在 ~/.dsh/greasyfork/credentials.json(权限 0600),不进配置、不进日志,任何工具输出都不会回显原文。
有效期
_greasyfork_session 是 Rails 的会话 Cookie,站点不下发过期时间,所以插件显示为「会话型」:
只要不在别的浏览器/设备上重新登录把会话顶掉,它就长期有效。带 expirationDate 的导出(如 Cookie-Editor 的 JSON)会显示具体剩余天数。
实现要点
- 发布走 GreasyFork 的网页表单(站点没有写接口):
POST /:locale/script_versions与POST /:locale/scripts/:id/versions。 script_version[attachments][]是params.expect的必填键,缺失会让站点直接返回 HTTP 500 —— 插件会显式带上空值。- 站点用 Cloudflare,Node 直连偶尔被挑战;此时校验会明确回报「判断不了」而不是「凭证失效」。
开发
npm test # 107 个用例,全部离线
npm run dev:sync # 把 lib/ 同步到 dsh profile
License
MIT
Versions
| Latest version | Published | Size |
|---|---|---|
| 2.0.1 | — | — |
Comments
Loading…
Similar plugins
by jeffreyren1
Customize DeepSeek Harness without forking it—load, edit, manage, and hot-reload trusted JavaScript and TypeScript userscripts from the Web UI.自定义 DeepSeek Harness,无需 Fork——直接在 Web UI 中加载、编辑、管理并热重载可信的 JavaScript 和 TypeScript 用户脚本。
★ 1
MIT
TypeScript
Sep 28, 2026
dsh plugin --profile web add dsh-custom-jsby 0x7a76
配置一组额外可写根:fs 工具与受限 shell 首次尝试即可写、无需审批,带 Web 设置页与按目录结构锚定的路径模式。 · DSH plugin: configured extra writable roots for the fs tools and the sandboxed shell, with a Web settings page and structure-anchored path patterns.
★ 0
MIT
TypeScript
Nov 6, 2026
dsh plugin --profile web add dsh-extra-pathsby kaixinguo360
Custom script manager for DSH: turn verified operations into reusable scripts that run directly via /script or register as agent tools, with parameterized scripts, declared expected outcomes, and exec
★ 1
JavaScript
Sep 8, 2026
dsh plugin --profile web add dsh-script-managerTrack DeepSeek Harness's own releases and update in one click: reads the npm dist-tags and the GitHub changelog, shows every change between the running build and the target, grades the risk, then hand
★ 0
MIT
TypeScript
dsh plugin --profile web add @zhengjunyao/dsh-updaterby EAbird-Z
Script Library for DeepSeek Harness — a per-machine registry of reusable scripts. One click scans for what you wrote since last time, you add one sentence per script, and the agent can find and call i
★ 0
MIT
JavaScript
Nov 15, 2026
dsh plugin --profile web add dsh-script-libraryby 1497105876
在 dsh 官方设置页左侧栏添加「文字注入」:把文字注入系统提示词或会话上下文,内容存于独立文件,支持热加载与历史备份。Text injection into the system prompt or session context from a DSH Settings page, persisted in a standalone file with hot-reload and history.
★ 0
MIT
JavaScript
Oct 30, 2026
dsh plugin --profile web add @gw/dsh-text-inject