
Product
Socket for ClickUp Is Now Available
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.
@tmegit/opencode-worktree-session
Advanced tools
OpenCode plugin that manages Git worktrees for AI sessions
A plugin for OpenCode that automatically manages Git worktrees for every AI session created from the opencode-plugin-template.
This plugin ensures your main working directory remains clean while the AI works in an isolated branch. On session end, it automatically generates a commit message, pushes the branch, and removes the worktree.
.opencode/worktrees/.main branch to prevent accidental corruption.cwd) to the worktree automatically.Add to your opencode.json:
{
"plugin": ["@tmegit/opencode-worktree-session"]
}
opencode.feature-xyz).opencode/feature-xyz and moves the session into that path.origin.Example (save as .opencode/opencode-worktree-session-config.json):
{
"terminal": {
"mode": "custom",
"bin": "alacritty",
"args": "",
"workingDirectoryArgument": "--working-directory",
"commandFlag": "-e"
},
"postWorktree": {
"cmd": "webstorm",
"args": ""
},
"configToolsAvailable": false
}
Configure the plugin in .opencode/opencode-worktree-session-config.json.
terminal — Controls how the plugin launches a terminal.
mode — launch mode: default | custom | specificbin — terminal binaryargs — extra argsworkingDirectoryArgument — workdir flagcommandFlag — command flagterminal (specific mode) — Alacritty, iTerm, iTerm2, TerminalpostWorktree — Command run after worktree creation.
cmd — command to runargs — command argsconfigToolsAvailable — Enable or disable config helper tools (affects setpostworktree, setworktreesync, setterminal).
boolean — true/falseNote: change configToolsAvailable and restart your OpenCode session for it to take effect.
bun run typecheck - TypeScript type checkingbun run lint - Fix linting issuesbun run format - Format code with Prettierbun run test - Run testsbun run build - Build the pluginApache License 2.0
FAQs
OpenCode plugin that manages Git worktrees for AI sessions
The npm package @tmegit/opencode-worktree-session receives a total of 9 weekly downloads. As such, @tmegit/opencode-worktree-session popularity was classified as not popular.
We found that @tmegit/opencode-worktree-session demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.

Product
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.