graftfork

中文文档
0.4.2发布于 2026/11/04Apache-2.0ES Module零依赖

graftfork.com的命令行:连接一个副本,同步它,看看为什么它保留,并采取每一个移动。瘦客户机;同步运行在graftfork.com。

中文使用文档

graftfork

下面的命令行 graftfork (移植)。Graft将您的更改保存在每个开源项目上 上游版本:它将您的更改移动到新版本上,运行您的测试,并为您保留移动的分支 除非每次改变都成功了,测试也通过了。否则你的副本会留在原处,格拉弗会告诉你原因。

这个包是graftfork.com的HTTP API的瘦客户端。同步在graftfork.com上运行,而不是在您的机器上。

npm install -g graftfork          # Node 22.18 or newer; the command is `graft` (or `graftfork`)
export GRAFT_TOKEN=graft_...      # make a token at https://graftfork.com/app#settings (GRAFTFORK_TOKEN works too)

graft copies                      # your copies and where each one is
graft connect you/project         # connect a repository Graft's GitHub app is installed on
graft sync                        # start a sync now (inside the clone, or pass the copy)
graft why                         # why the copy stayed, and what to do next
graft pull                        # fetch the latest move as graft/<release>; your branch is untouched
graft upstream "fix the parser"   # Graft builds that one change alone on your release and runs your tests;
                                  # this fetches graft/upstream/<change>. Nothing is pushed: you open the PR
graft upstream-status <build>     # an upstream build's status, tests and links
graft upstream-pr <build> <url>   # the pull request you opened; Graft tells you when it's merged
graft upgrade <dependency>        # upgrade one dependency (npm or Python), delivered only if the tests pass
graft upgrades                    # your upgrades and what their tests said
graft check <base> <head> --wait  # check a change against the project's own tests: exit 0 pass, 1 fail, 2 couldn't run
graft checks                      # your recent change checks
graft verify-record <file>        # check a signed run record or agent change record; no token needed.
                                  # A link works too: a raw file, a GitHub file, or a GitHub folder
graft agent-record <org>          # an organization's signed agent change record, as JSON
graft regen connect <repo> ...    # connect a spec (a duramen record); Graft rebuilds its implementation blind
graft regen run <spec>            # rebuild it now
graft regen status [id]           # your specs, a spec's rebuilds, or one rebuild and how to take it
graft regen report <spec>         # the spec's grade and why, before anything is spent

也 graft whoami, graft status 和 graft usage; --json 打印API的答案,并且 graft --help 列出每个命令及其选项。

哪个版本有什么:0.1.0有拷贝、连接、同步、状态、为什么、拉、使用、whoami和验证记录;0.1.1 添加agent-record;0.2.0增加了check(s), upgrade(s)和upstream, upstream-status和upstream-pr;0.3.0补充道 重新连接,运行,状态和报告;0.3.1拒绝未知选项,增加——version和每命令——help,以及 清楚地说明为什么verify-record失败(——keys离线检查)。0.4.0增加了还原,设置,重新起草,重新排序和 重新断开连接,——max-usd同步和升级,JSON错误和退出码3/4/5的代理,和嫁接拉,从来没有 覆盖本地工作。0.4.2添加了 graftfork 命令(与 graft;在0.4.1中,它什么都不做),在链接上验证-记录 GRAFTFORK_TOKEN令牌的名称,以及命名graftfork及其版本的User-Agent。

用npx命名这个包: npx graftfork verify-record <file>. npm包调用 graft 是别人的。API文档: https://graftfork.com/docs/api. 电邮支援: [email protected]. apache - 2.0。

版本与发布记录

graftfork 共发布 8 个版本,首次发布于 2026/10/31;过去 12 个月发布了 8 个版本。

版本发布日期距今
0.4.2latest2026/11/04今天
0.4.12026/11/04今天
0.4.02026/11/03今天
0.3.12026/11/022 天前
0.3.02026/11/012 天前
0.2.02026/10/313 天前

关于 graftfork 的常见问题

graftfork 是什么?

graftfork.com的命令行:连接一个副本,同步它,看看为什么它保留,并采取每一个移动。瘦客户机;同步运行在graftfork.com。

如何安装 graftfork?

在项目目录运行 npm install graftfork,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 graft、graftfork,可以用 npx graft 直接运行。

graftfork 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/graftfork 是否存在。

graftfork 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

graftfork 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

graftfork 可以商用吗?

graftfork 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

graftfork 还在维护吗?

最新版本 0.4.2 发布于 2026/11/04(今天);至今共发布 8 个版本,其中过去 12 个月发布了 8 个;首次发布于 2026/10/31。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。