A Zellij plugin for managing git worktrees.
- List worktrees: View all worktrees on plugin open
- Open in new tab: Select a worktree and open it in a new tab
- Create worktrees: Create new worktrees and open them in new tabs
- Delete worktrees: Delete worktrees with confirmation
- Smart path resolution: Branch names create worktrees in parent directory; full paths are used as-is
Add to your ~/.config/zellij/config.kdl:
plugins {
worktree location="https://github.com/sharph/zellij-worktree/releases/latest/download/zellij-worktree.wasm"
}Add a keybinding:
shared_except "locked" "tab" {
bind "Ctrl w" {
LaunchOrFocusPlugin "https://github.com/sharph/zellij-worktree/releases/latest/download/zellij-worktree.wasm" {
floating true
}
}
}plugins {
worktree location="https://github.com/sharph/zellij-worktree/releases/latest/download/zellij-worktree.wasm" {
base_path "~/projects"
}
}git clone https://github.com/sharph/zellij-worktree
cd zellij-worktree
cargo build --release
mkdir -p ~/.config/zellij/plugins
cp target/wasm32-wasip1/release/zellij-worktree.wasm ~/.config/zellij/plugins/Then update your config to use the local plugin:
shared_except "locked" "tab" {
bind "Ctrl w" {
LaunchOrFocusPlugin "file:~/.config/zellij/plugins/zellij-worktree.wasm" {
floating true
}
}
}- Press your keybinding (e.g.,
Ctrl+w) - Use
j/kor arrow keys to navigate the list - Press
Enterto open the selected worktree in a new tab
- Open the plugin
- Press
nto create a new worktree - Type a branch name or full path
- Branch name: creates worktree at
base_path/<branch-name>(if configured) or../<branch-name> - Relative path (starting with
./or../): relative to repo root - Full path (starting with
/or~): uses exact path
- Branch name: creates worktree at
- Press
Enterto create the worktree and open a new tab
- Open the plugin
- Use
j/kor arrow keys to navigate to the worktree - Press
dto request deletion - Press
Enterto confirm deletion - Press
Escto cancel
| Key | Action |
|---|---|
Esc |
Close plugin / Cancel action |
Ctrl+c |
Close plugin |
Enter |
Open selected worktree / Confirm action |
j/k or ↑/↓ |
Navigate list |
n |
Create new worktree |
d |
Delete selected worktree |
- Zellij 0.42.0 or later
- Git
MIT
