Loading...
Loading...
Compare original and translation side by side
wt <command> --helpwt <command> --help~/.config/worktrunk/config.toml~/.config/worktrunk/config.toml~/.config/worktrunk/config.tomlreference/config.md~/.config/worktrunk/config.tomlreference/config.md.config/wt.toml.config/wt.toml<repo>/.config/wt.tomlreference/hook.md<repo>/.config/wt.tomlreference/hook.mdreference/llm-commits.mdwhich claude codex llm aichat 2>/dev/nullreference/llm-commits.md[commit.generation]
command = "..." # see reference/llm-commits.md for tool-specific commandswt config showwt config createwt step commit --show-prompt | head # verify prompt builds
wt merge # in a repo with uncommitted changesreference/llm-commits.mdwhich claude codex llm aichat 2>/dev/nullreference/llm-commits.md[commit.generation]
command = "..." # 请查看reference/llm-commits.md获取对应工具的命令wt config showwt config createwt step commit --show-prompt | head # 验证提示信息是否正常生成
wt merge # 在有未提交变更的仓库中执行ls package.json Cargo.toml pyproject.tomlpackage.jsonpost-createpre-commitpre-mergepost-startpost-switchpost-mergepre-removenpm run lint # verify exists
which cargo # verify tool exists.config/wt.toml# Install dependencies when creating worktrees
post-create = "npm install"
# Validate code quality before committing
[pre-commit]
lint = "npm run lint"
typecheck = "npm run typecheck"
# Run tests before merging
pre-merge = "npm test"wt switch --create test-hooksreference/hook.mdls package.json Cargo.toml pyproject.tomlpackage.jsonpost-createpre-commitpre-mergepost-startpost-switchpost-mergepre-removenpm run lint # 验证命令存在
which cargo # 验证工具已安装.config/wt.toml# 创建工作树时安装依赖
post-create = "npm install"
# 提交前验证代码质量
[pre-commit]
lint = "npm run lint"
typecheck = "npm run typecheck"
# 合并前运行测试
pre-merge = "npm test"wt switch --create test-hooksreference/hook.mdcat .config/wt.tomlpost-createpost-startpost-switchpre-commitpre-mergepost-mergepre-remove# Before
post-create = "npm install"
# After (adding db:migrate)
[post-create]
install = "npm install"
migrate = "npm run db:migrate"cat .config/wt.tomlpost-createpost-startpost-switchpre-commitpre-mergepost-mergepre-remove# 转换前
post-create = "npm install"
# 转换后(添加db:migrate)
[post-create]
install = "npm install"
migrate = "npm run db:migrate"undefinedundefined
**Dangerous patterns** — Warn users before creating hooks with:
- Destructive commands: `rm -rf`, `DROP TABLE`
- External dependencies: `curl http://...`
- Privilege escalation: `sudo`
**危险模式提示** — 在创建包含以下内容的钩子前,请向用户发出警告:
- 破坏性命令:`rm -rf`、`DROP TABLE`
- 外部依赖:`curl http://...`
- 权限提升:`sudo`reference/llm-commits.mdreference/config.md#worktree-path-templatereference/llm-commits.md#templatesreference/config.md#command-settingsreference/config.md#user-hooksreference/llm-commits.mdreference/config.md#worktree-path-templatereference/llm-commits.md#templatesreference/config.md#command-settingsreference/config.md#user-hooksreference/hook.mdreference/hook.md#configurationreference/hook.md#template-variablesreference/config.md#dev-server-urlreference/hook.mdreference/hook.md#configurationreference/hook.md#template-variablesreference/config.md#dev-server-urlundefinedundefinedundefinedundefinedgrep -A 20 "## Setup" reference/llm-commits.md
grep -A 30 "### post-create" reference/hook.md
grep -A 20 "## Warning Messages" reference/shell-integration.mdgrep -A 20 "## Setup" reference/llm-commits.md
grep -A 30 "### post-create" reference/hook.md
grep -A 20 "## Warning Messages" reference/shell-integration.md$TMUXtmux new-session -d -s <branch-name> "wt switch --create <branch-name> -x claude -- '<task description>'"$ZELLIJzellij run -- wt switch --create <branch-name> -x claude -- '<task description>'tmux new-session -d -s fix-auth-bug "wt switch --create fix-auth-bug -x claude -- \
'The login session expires after 5 minutes. Find the session timeout config and extend it to 24 hours.'"zellij run -- wt switch --create fix-auth-bug -x claude -- \
'The login session expires after 5 minutes. Find the session timeout config and extend it to 24 hours.'$TMUXtmux new-session -d -s <branch-name> "wt switch --create <branch-name> -x claude -- '<task description>'"$ZELLIJzellij run -- wt switch --create <branch-name> -x claude -- '<task description>'"tmux new-session -d -s fix-auth-bug "wt switch --create fix-auth-bug -x claude -- \
'登录会话5分钟后过期,请找到会话超时配置并将其延长至24小时。'"zellij run -- wt switch --create fix-auth-bug -x claude -- \
'登录会话5分钟后过期,请找到会话超时配置并将其延长至24小时。'"