By 708u
Streamline git worktree management using twig CLI to create parallel feature branches, sync or carry uncommitted changes across them, overlay files for comparison, list active worktrees, and automate cleanup of merged or prunable ones for efficient parallel development.
Uses power tools
Uses Bash, Write, or Edit tools
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
A CLI tool that creates, deletes, and manages git worktrees and branches in a single command. Focused on simplifying git operations, keeping features minimal.
twig is designed to be friendly for both humans and agentic coding tools, and to integrate easily with other CLI tools:
--quiet minimizes output to paths only, making it easy to pass to other tools--verbose and interactive confirmations ensure safetyExamples:
cd $(twig add feat/x -q) # cd into the created worktree
twig list -q | fzf # select a worktree with fzf
twig list -q | xargs -I {} code {} # open all worktrees in VSCode
twig clean -v # confirm before deletion, show all skipped items
twig treats branches and worktrees as a single unified concept. Users don't need to think about whether they're managing a "branch" or a "worktree" - they simply work with named development contexts.
twig add feat/x creates both the branch and worktree togethertwig remove feat/x deletes both togethertwig remove still worksThis 1:1 mapping simplifies the mental model: one name, one workspace, one command.
twig add feat/xxx executes worktree creation, branch creation, and symlink setup all at once.
Use --source to create from any branch regardless of current worktree.
Set default_source in config to always branch from a fixed base (e.g., main).
Create new worktrees with personal settings like .envrc and Claude configs carried over. Git worktree operations don't copy gitignored files, so twig uses symlinks to share these files across worktrees. Start working immediately in new worktrees without manual setup.
Use --carry to move changes to a new worktree, or --sync to copy them to both.
Use --file with --carry to move only specific files matching a glob pattern.
Examples:
twig clean removes worktrees that are merged, have upstream gone, or are prunable.
Requires Git 2.15+.
brew install 708u/tap/twig
go install github.com/708u/twig/cmd/twig@latest
# Initialize settings
twig init
# Create a new worktree and branch
twig add feat/new-feature
# Copy uncommitted changes to a new worktree
twig add feat/wip --sync
# Move uncommitted changes to a new worktree
twig add feat/wip --carry
# List worktrees
twig list
# Clean up worktrees no longer needed
twig clean
# Delete a specific worktree
twig remove feat/done
Configure in .twig/settings.toml:
worktree_destination_base_dir: Destination directory for worktreesdefault_source: Source branch for symlinks (creates symlinks from main even when adding from a derived worktree)symlinks: Glob patterns for symlink targetsinit_submodules: Initialize submodules when creating worktreesPersonal settings can be overridden in .twig/settings.local.toml (.gitignore recommended).
extra_symlinks: Add personal patterns while preserving team settingsDetails: docs/reference/configuration.md
Shell completion is available for all commands and flags.
For example, twig remove <TAB> completes existing branch names.
Add the following to your shell configuration:
Add to ~/.bashrc:
eval "$(twig completion bash)"
Add to ~/.zshrc:
eval "$(twig completion zsh)"
Add to ~/.config/fish/config.fish:
twig completion fish | source
| Command | Description |
|---|---|
| init | Initialize settings |
| add | Create worktree and branch |
| list | List worktrees |
| remove | Delete worktree and branch (multiple supported) |
| clean | Bulk delete merged worktrees |
| sync | Sync symlinks and submodules to worktrees |
See the documentation above for detailed flags and specifications.
npx claudepluginhub 708u/twig --plugin twigDelegate Claude Code worktree lifecycle to twig CLI (requires twig installed)
Auto-format Claude Code config files on session start
Claude Code plugin for the slack-cli tool. Provides command reference and usage guidance for all slack-cli operations.
Delegate Claude Code worktree lifecycle to twig CLI (requires twig installed)
Git worktree management for parallel development workflows
Git worktree management expert for @desplega.ai/wts
Teaches Claude Code how to work with wt-managed git worktrees
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
v9.44.1 — Patch release for Gemini environment/version detection and qwen auth gating. Run /octo:setup.