Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Source docs/demos/tapes/shared-setup.tape
Output "{{OUTPUT_GIF}}"
# OMNIBUS DEMO: Comprehensive worktrunk showcase
#
# Design principles:
# 1. Simple features before complex ones
# - list, switch (navigation) → create, commit, merge (workflows)
# 2. Logical story arc
# - Overview → work on branches → create feature → complete it → cleanup
# 3. Merge comes AFTER making changes (not on pre-existing uncommitted changes)
# 4. Each Zellij tab shows a distinct workflow
#
# Tab structure:
# TAB 1: wt switch (picker: CI streaming in, alt-p reveal, diff paging → api)
# → claude (simple task)
# TAB 2: [NEW TAB] wsl abbreviation (wt switch -x claude --create) → claude
# TAB 3: [NEW TAB] wt switch --create → wt step commit → git push → wt remove → wt list --full
# Then back to TAB 1: [NEW PANE] git diff → wt merge (on Claude's completed work)
#
# Features demonstrated:
# - wt list / wt list --full (URLs, CI status, diff stats)
# - wt switch (interactive picker: streaming CI, alt-p column reveal, diff paging)
# - wsl abbreviation (wt switch --execute=claude --create)
# - wt switch --create (with post-start hooks)
# - wt step commit (LLM commit message, standalone)
# - wt merge (on uncommitted work - commits, rebases, merges, cleans up)
# - wt remove (cleanup)
# - Multi-agent Claude Code in parallel tabs
Require zellij
Source docs/demos/tapes/shared-commands.tape
Env ANTHROPIC_API_KEY "{{ANTHROPIC_API_KEY}}"
Env CLAUDE_CODE_OAUTH_TOKEN "{{CLAUDE_CODE_OAUTH_TOKEN}}"
# Start Zellij before showing
Type "zellij"
Enter
Sleep 3s
# Dismiss plugin permission dialog (zellij-tab-name asks for permissions on first run)
# The permission is cached per-plugin-path, but on macOS Zellij uses native cache APIs
# that ignore $HOME, so we can't pre-populate the cache in the demo's temp directory.
# If no dialog appears (cache hit), "y" goes to shell, so we follow with Enter + clear.
Type "y"
Enter
Sleep 500ms
Type "clear"
Enter
Sleep 500ms
# ==== TAB 1: Interactive picker and Claude agent ====
# wt switch (no args) - opens interactive picker. The rows paint from local git
# immediately; each row's CI status is still in flight behind them.
Type "wt switch"
Show
Sleep 300ms
Enter
Sleep 500ms
# alt-p hides the preview, widening the same rows to full width so the CI
# column is visible while it is still filling in. The picker demo
# (wt-switch-picker) is the full tour; this is the glance at it.
Alt+p
Sleep 2.5s
Alt+p
Sleep 800ms
# Filter to api. Typed before any cursor movement: narrowing the list keeps the
# cursor's row *index*, so the exact branch-name match has to be the top row for
# this to land on api — which it is from the cursor's opening position.
Type "api"
Sleep 1.2s
# Page through api's diff without leaving the list.
Ctrl+d
Sleep 700ms
Ctrl+d
Sleep 1.8s
# Select it
Enter
Sleep 1.5s
# Launch Claude agent on api (one edit that completes during the demo).
# Skip test-running here; the merge's pre-merge hook demonstrates the tests.
Type "claude 'Add one test for the add function in src/lib.rs. Do not run commands or tests.'"
Enter
Sleep 5.5s
# ==== TAB 2: wsl abbreviation (creates billing, launches Claude) ====
# [NEW TAB] via session manager (Ctrl+Space → tab mode → new)
# Direct Ctrl+t is intercepted by Claude Code's TUI, so use session manager.
Ctrl+Space
Sleep 200ms
Type "tn"
Sleep 2s
# wsl abbreviation expands to: wt switch --execute=claude --create
# Type "ws" then "l" to trigger expansion, then add branch name and instructions
Type "ws"
Type "l"
Sleep 200ms
Type " billing -- 'Make one small currency-formatting edit in src/lib.rs. Do not run commands or tests.'"
Sleep 500ms
Enter
Sleep 6s
# ==== TAB 3: Create, commit, push, remove workflow ====
# This tab shows wt step commit as a standalone feature, then cleanup
# [NEW TAB] via session manager
Ctrl+Space
Sleep 200ms
Type "tn"
Sleep 2s
# wt switch --create - shows post-start hooks running
Type "wt switch --create feature"
Enter
Sleep 4.5s
# Make a change
Type "echo '// User settings module' >> src/lib.rs"
Enter
Sleep 800ms
# wt step commit - LLM generates commit message (standalone feature)
Type "wt step commit"
Enter
Sleep 4s
# Push to origin (feature branch is now ready)
Type "git push -u origin feature"
Sleep 500ms
Hide
Enter
Sleep 2s
# The demo remote is a local bare repository. Clear its temporary filesystem
# path before resuming the visible recording.
Type "clear"
Enter
Sleep 300ms
Show
# wt remove - done with feature, clean up
Type "wt remove"
Enter
Sleep 3s
# wt list --full - show remaining worktrees
Type "wt list --full"
Enter
Sleep 3.5s
# ==== Back to TAB 1: Merge Claude's completed work ====
# Agent finished - open new pane to show changes and merge. Hide the tab
# transition while clearing the agent transcript so background tool output
# does not compete visually with the diff and merge.
Hide
Ctrl+Space
Sleep 200ms
Type "t1"
Sleep 2s
Ctrl+l
Sleep 500ms
# Open new pane for git diff and merge (like original zellij demo)
# Use session manager (Ctrl+Space → pane mode → new) since Ctrl+n is
# intercepted by Claude Code's TUI running in the active pane.
Ctrl+Space
Sleep 200ms
Type "on"
Sleep 1.2s
Show
# Show what Claude changed
Type "git diff"
Enter
Sleep 3s
# wt merge - handles uncommitted changes, rebases, merges, cleans up
# Pre-merge hook runs tests, then commit, rebase, merge, cleanup
# (heavy output command - pre-enter pause)
Sleep 1s
Type "wt merge"
Enter
Sleep 11s
# ==== Cycle through all tabs to show parallel work ====
# TAB 2: billing agent working
Hide
Ctrl+Space
Sleep 200ms
Type "t2"
Sleep 1s
Ctrl+l
Sleep 500ms
Show
Sleep 1.5s
# TAB 3: show final state with wt list --full
Hide
Ctrl+Space
Sleep 200ms
Type "t3"
Sleep 1s
Show
# Show comprehensive list of all worktrees (post-merge state)
Type "wt list --full"
Enter
Sleep 3s
# Done!
Type "done!"
Sleep 1.5s
Hide
# Clean up zellij after recording stops
Ctrl+Space
Sleep 200ms
Type "q"
Sleep 500ms