跳转到内容

Opencode Worktree

此内容尚不支持你的语言。

Opencode Worktree is a community plugin (part of the KDCO/OCX ecosystem, not affiliated with OpenCode) providing git worktrees that spawn their own terminal for AI-driven development.

When to use this

ApproachBest forTradeoffs
Manual git worktreeOne-off experiments, full controlManual setup, no auto-cleanup, context switching
OpenCode Desktop UIVisual workflowTied to the desktop app, less automation
This pluginAI-driven workflows, CLI-first usersAdds a plugin dependency to your project

How it works

When the AI calls worktree_create, your terminal spawns automatically with OpenCode already running inside and files synchronized. When it calls worktree_delete, changes commit automatically and the worktree cleans itself up.

Installation

ocx add kdco/worktree --from https://registry.kdco.dev

If you don’t have OCX installed, get it from the OCX repository. Optional: install kdco-workspace for the full experience — it bundles worktrees with background agents, planning tools, and notifications. Manual installation (copying src/ to .opencode/plugin/) loses OCX’s dependency management and automatic updates.

Pairing

Works great standalone, and pairs especially well with cmux for agentic workflows; tmux is also supported.