A fisher plugin for git worktree management — create, switch, and clean up worktrees with an auto-configured multi-pane workspace (Zellij or cmux).
Each flock new opens a new Zellij tab with four panes: your AI coding assistant (Claude or Codex) in the main pane, plus a stacked sidebar with a terminal, lazygit, and lazydocker — all scoped to the worktree directory.
fisher install roderik/flockRequired: git, gh, fzf, jq, worktrunk (wt binary)
Optional:
zellijorcmux— multi-pane workspace support (degrades to bare terminal without)lazygit— git pane in workspacelazydocker— Docker pane in workspacelinearCLI — Linear ticket integrationclaudeorcodex— AI assistant launched in main panebtop— system monitor in dashboard layout
flock new [branch|PR|ticket] # Create or open a worktree
flock delete # Delete a worktree via fzf picker
flock delete --all # Delete all worktrees
flock tab-setup # Set up workspace in the current dirWithout arguments, opens an fzf picker showing existing worktrees and open GitHub PRs.
flock new # fzf picker: worktrees + open PRs
flock new my-feature # create worktree on branch my-feature
flock new 42 # check out PR #42
flock new https://github.com/org/repo/pull/42
flock new PAP-123 # create worktree from Linear ticket
flock new https://linear.app/org/issue/PAP-123/my-ticket
flock new -x my-feature # same, but launch codex instead of claudeOpens an fzf picker listing all worktrees (current branch preselected). Removes the worktree, its local branch, closes the worktree's Zellij tab (stopping all running processes), and prunes remote refs.
flock delete # pick one worktree to delete
flock delete --all # delete all worktrees and close all tabsOpens a new workspace tab (Zellij or cmux) scoped to the current directory with the AI assistant auto-launched in the main pane.
flock tab-setup
flock tab-setup -x # launch codex instead of claudezj [session] # start or attach to a local zellij session
zjr [host] # start or attach to a remote zellij sessionBoth use the flock-dashboard layout for new sessions (btop + terminal). zjr defaults to $FLOCK_REMOTE_HOST.
| Subcommand | f* |
wt* |
|---|---|---|
flock new |
fn |
wtn |
flock delete |
fdel |
wtd |
flock delete --all |
fdela |
|
flock tab-setup |
fs |
wts |
wt* abbreviations are retained for backward compatibility.
| Variable | Default | Purpose |
|---|---|---|
$FLOCK_REMOTE_HOST |
daystrom |
Remote host used by zjr |
set -gx FLOCK_REMOTE_HOST myserverTwo layouts are included and auto-installed to ~/.config/zellij/layouts/ on shell start:
Used by flock new and flock tab-setup for each worktree tab:
| Area | Pane | Description |
|---|---|---|
| Left 70% (focused) | Main | AI assistant (Claude or Codex) |
| Right 30% (stacked) | Terminal | Plain shell |
| Git | lazygit |
|
| Docker | lazydocker |
Used by zj / zjr for new Zellij sessions:
- Left 50% —
btopsystem monitor - Right 50% — Terminal (focused)
MIT
