项目预览
项目数据
项目介绍
Star 增长趋势
本站每日记录该项目 GitHub 星标变化,观测越久曲线越完整
数据来源:GitHub API 逐日快照 · 收录于 2026-09-22 · 当前星标 ★ 11723
使用教程
环境要求
- 已安装 git(Worktrunk 封装 git worktree)
- macOS/Linux:Homebrew 或 Rust Cargo 工具链
- Windows:Winget(会额外以 git-wt 名称安装,避免与终端 wt 冲突)
- 可选:Claude Code 等 AI 代理 CLI,用于 -x 启动代理
- 可选:gh 或 glab CLI,用于 PR/MR 工作流
安装与启动步骤
-
1安装 Worktrunk
macOS/Linux 用 Homebrew;也可用 cargo install worktrunk。Windows 用 winget,Arch 用 pacman,Conda/Pixi 亦可用。
brew install worktrunk -
2安装 shell 集成
shell 集成让命令能够切换目录,安装后必须执行一次。Windows 装完用 git-wt config shell install。
wt config shell install -
3创建并切换 worktree
为新功能创建独立分支与工作目录并切换过去,路径按可配置模板自动计算,无需手写路径。
wt switch --create feature-auth -
4查看所有 worktree
列出各 worktree 的分支、改动与领先/落后状态,@ 标记当前所在 worktree。
wt list -
5并行启动多个代理
-x 在切换后执行命令,-- 之后的参数传给该命令,可为每个功能开一个代理互不干扰。
wt switch -x claude -c feature-a -- 'Add user authentication' wt switch -x claude -c feature-b -- 'Fix the pagination bug' -
6合并或清理 worktree
本地合并用 wt merge main(压缩、变基、快进合并、清理一条龙);PR 流程则推分支建 PR,合并后 wt remove。
wt merge main
如何确认成功
执行 wt list,能看到 worktree 列表且当前 worktree 前有 @ 标记,说明安装与 shell 集成均正常。
常见问题
Q:Windows 上 wt 命令和终端冲突怎么办?
A:Winget 会把 Worktrunk 装成 git-wt,直接用 git-wt 即可;或在设置→应用→高级应用设置→应用执行别名中禁用 Terminal 别名,就能用 wt。
Q:为什么安装后要跑 wt config shell install?
A:只有安装 shell 集成后,命令才能改变当前目录,wt switch 才能自动切到对应 worktree。
Q:怎么运行项目测试?
A:在源码目录执行 cargo test;shell 集成测试需额外命令,并依赖 bash、zsh、fish、nushell、pwsh 和 jq。
Q:-x 后面的参数怎么传给被调用的命令?
A:放在 -- 之后,例如 wt switch -x claude -c feature-a -- 'Add user authentication'。
注意事项
- Worktrunk 按分支名寻址 worktree,路径由可配置模板生成,传入分支名或该 worktree 路径均可。
- PR 工作流:wt step commit 提交、gh pr create 建 PR,合并后再执行 wt remove 清理。
- 可用 hooks 自动化创建、合并前后的本地流程,并支持 APFS/btrfs/XFS 上的 build 缓存共享。
- 完整文档见官网 worktrunk.dev。
核心亮点
- 用 Rust 实现,启动和操作速度快,适合高频调用
- 把原生 git worktree 的繁琐命令封装成简洁 CLI,降低并行代理的使用门槛
- 明确面向 Claude Code、Codex 等 AI 代理场景,命名和生命周期管理贴合代理工作流
不足之处
- 功能聚焦在 worktree 管理,不涉及代理编排、任务调度等更上层能力
- 相对年轻,文档和社区生态仍在成长中
适用场景
- 同时运行多个 AI 编码代理,各自在独立分支上改代码
- 为代码评审或功能实验快速创建隔离的工作目录
- 在同一个仓库里并行开发多个互不干扰的特性分支
替代项目
git-worktree(Git 原生)、gwq
上一篇:agent-slack
同类项目推荐
dev-proxy
开源
一条命令给接口注入故障,本地验证容错逻辑
Simulate API failures, throttling, and chaos — all from your command line.
skyvern
开源
说句话,AI 帮你自动操作网页,告别写脚本
Automate browser based workflows with AI
openops
开源
拖拽搭建云成本自动化流程,AI 帮你省钱省心。
The batteries-included, No-Code FinOps automation platform, with the AI you trust.
Shortcutomation
开源
用苹果快捷指令,一键自动化枯燥工作
Automate the Boring Stuff with Apple Shortcuts
n8n-skills
开源
让 AI 助手直接调用 n8n 工作流,自动化一步到位。
Designed specifically for AI assistants, the n8n Workflow Automation Skills Suite.
camofox-mcp
开源
让 AI 代理隐身浏览网页,告别验证码和封禁
Anti-detection browser MCP server for AI agents — navigate, interact, and automate ···
workflow-builder-template
开源
拖拽连线搭 AI 工作流,快速做出自动化原型
Visual AI workflow automation platform
browsers-benchmark
开源
实测各浏览器自动化引擎,看谁能绕过风控、谁最快。
Browser automation engine benchmark - Test bypass rates, performance & stealth again···
ghidra-cli
开源
终端跑 Ghidra,JSON 喂给 AI,逆向自动化一步到位
Automate Ghidra reverse engineering from the command line — headless analysis, deco···
