Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Remove Twitter-specific demo content
Maximilian Roos5779a923097b
diff --git a/.typos.toml b/.typos.tomlindex 97fb9e8d4..d4a16e70e 100644--- a/.typos.toml+++ b/.typos.toml@@ -1,3 +1,6 @@+[files]+extend-exclude = ["docs/demos/vhs-keystrokes/"]+[default.extend-words]# Git commit hashes that typos flags as potential typosba = "ba" # Part of commit hashes like e28e0badiff --git a/docs/CLAUDE.md b/docs/CLAUDE.mdindex a8127f69b..5bf41a7c9 100644--- a/docs/CLAUDE.md+++ b/docs/CLAUDE.md@@ -269,39 +269,55 @@ Demo GIFs (~2MB each) are stored in a separate `worktrunk-assets` repo to avoid1. Build the vhs-keystrokes binary if missing (one-time setup, see below)2. Run the demo build scripts:```bash- ./docs/demos/wt-core/build- ./docs/demos/wt-merge/build- ./docs/demos/wt-select/build+ ./docs/demos/docs/build # Doc site demos (SIZE_DOCS: 1600x900, FontSize 24)+ ./docs/demos/twitter/build # Twitter demos (SIZE_TWITTER: 1200x700, FontSize 26)```3. Publish: `./dev/publish-assets`Deploy runs `fetch-assets` before building.-### vhs-keystrokes setup (REQUIRED for wt-select)+### Demo directory structure-The `wt-select` demo requires a custom VHS fork with keystroke overlay. **Check if the binary exists before regenerating demos:**+```+docs/demos/+ tapes/ # All VHS tape files (templated, shared by both builds)+ docs/build # Doc site build script (generates light + dark)+ twitter/build # Twitter build script (generates light only)+ shared/ # Python library, themes, fixtures+ vhs-keystrokes/ # Custom VHS binary (gitignored, built on demand)+```++Tape files use template variables (`{{FONTSIZE}}`, `{{WIDTH}}`, `{{HEIGHT}}`) so the same tape produces different sizes for docs vs Twitter.++### vhs-keystrokes setup (REQUIRED for wt-select demos)++The `wt-select` demos require a custom VHS fork with keystroke overlay. **Claude must build this binary before regenerating demos.**++Check if the binary exists:```bash-ls docs/demos/wt-select/vhs-keystrokes/vhs-keystrokes+ls docs/demos/vhs-keystrokes/vhs-keystrokes```-If missing, build it (requires Go):+If missing, **build it** (requires Go):```bash-cd docs/demos/wt-select+cd docs/demosgit clone -b keypress-overlay https://github.com/max-sixty/vhs.git vhs-keystrokescd vhs-keystrokes && go build -o vhs-keystrokes .```-The `wt-select/build` script will skip GIF recording if the binary is missing and only print manual test instructions. **Always ensure the binary exists before regenerating demos.**+The binary is gitignored. Build scripts skip wt-select GIF recording if missing—**always build vhs-keystrokes first** when regenerating demos.### Light/dark theme variants-Each demo build generates both light and dark GIF variants:+The docs build generates both light and dark GIF variants:- `wt-core.gif` / `wt-core-dark.gif`- `wt-merge.gif` / `wt-merge-dark.gif`- `wt-select.gif` / `wt-select-dark.gif`+Twitter build generates light only (Twitter doesn't support theme-switching media queries).+Theme definitions are in `docs/demos/shared/themes.py`, matching the CSS variables in `_variables.html`.In markdown, use `<picture>` with media queries:diff --git a/docs/demos/.gitignore b/docs/demos/.gitignorenew file mode 100644index 000000000..a94a555cf--- /dev/null+++ b/docs/demos/.gitignore@@ -0,0 +1,2 @@+# Built VHS binary with keystroke overlay+vhs-keystrokes/diff --git a/docs/demos/docs/build b/docs/demos/docs/buildnew file mode 100755index 000000000..ae17481bf--- /dev/null+++ b/docs/demos/docs/build@@ -0,0 +1,235 @@+#!/usr/bin/env python3+"""Build script for documentation site demo GIFs.++Records demos used on the main doc site:+- wt-core: Full workflow (list, switch, config, create, list --full, remove)+- wt-merge: Full merge workflow with LLM commit generation+- wt-select: Interactive worktree selector with preview panels+"""++import os+import shutil+import sys+from pathlib import Path++# Add docs/demos/ to path for shared library+SCRIPT_DIR = Path(__file__).parent+DEMOS_DIR = SCRIPT_DIR.parent+sys.path.insert(0, str(DEMOS_DIR))++from shared import (+ DemoEnv, git, prepare_demo_repo,+ check_dependencies, setup_demo_output, record_all_themes,+ SIZE_DOCS,+)++REPO_ROOT = DEMOS_DIR.parent.parent+OUT_DIR = SCRIPT_DIR / "out"+TAPES_DIR = DEMOS_DIR / "tapes"++# All tapes to record: (tape_file, output_base_name, setup_func, vhs_binary)+# Tapes are in ../tapes/ (shared with twitter build)+DEMOS = [+ ("wt-core.tape", "wt-core", "core", "vhs"),+ ("wt-merge.tape", "wt-merge", "merge", "vhs"),+ ("wt-select.tape", "wt-select", "select", "vhs-keystrokes"),+]++# Custom VHS binary with keystroke overlay (for wt-select)+VHS_KEYSTROKES = os.environ.get(+ "VHS_KEYSTROKES",+ str(DEMOS_DIR / "vhs-keystrokes" / "vhs-keystrokes")+)+++def prepare_core(env: DemoEnv):+ """Set up repo for wt-core demo with hooks, mocks, and billing branch."""+ hooks_config = '''[post-start]+deps = "npm install"+build = "npm run build"+dev = "npm run dev"+db = "docker compose up -d postgres"++[pre-remove]+cleanup = "flyctl scale count 0"+'''+ prepare_demo_repo(env, REPO_ROOT, hooks_config=hooks_config)++ # Mock CLIs for hooks+ bin_dir = env.home / "bin"++ npm_mock = bin_dir / "npm"+ npm_mock.write_text("""#!/bin/bash+if [[ "$1" == "install" ]]; then+ echo "added 847 packages in 3.2s"+elif [[ "$1" == "run" && "$2" == "build" ]]; then+ echo "vite v5.4.2 building for production..."+ echo "✓ 142 modules transformed"+ echo "dist/index.js 45.2 kB │ gzip: 14.8 kB"+elif [[ "$1" == "run" && "$2" == "dev" ]]; then+ echo ""+ echo " VITE v5.4.2 ready in 342 ms"+ echo ""+ echo " ➜ Local: http://localhost:3000/"+fi+""")+ npm_mock.chmod(0o755)++ docker_mock = bin_dir / "docker"+ docker_mock.write_text("""#!/bin/bash+if [[ "$1" == "compose" && "$2" == "up" ]]; then+ echo "[+] Running 1/1"+ echo " ✔ Container postgres Started"+fi+""")+ docker_mock.chmod(0o755)++ flyctl_mock = bin_dir / "flyctl"+ flyctl_mock.write_text("""#!/bin/bash+if [[ "$1" == "scale" && "$2" == "count" && "$3" == "0" ]]; then+ echo "Scaling app to 0 machines"+fi+""")+ flyctl_mock.chmod(0o755)++ # User config with approved commands+ config_dir = env.home / ".config" / "worktrunk"+ project_id = str(env.bare_remote).removesuffix(".git")+ (config_dir / "config.toml").write_text(f'''[projects."{project_id}"]+approved-commands = ["npm install", "npm run build", "npm run dev", "docker compose up -d postgres", "flyctl scale count 0"]+''')++ # Add billing branch (at same commit as main = merged)+ branch = "billing"+ path = env.work_base / f"acme.{branch}"+ git(["-C", str(env.repo), "worktree", "add", "-q", "-b", branch, str(path), "main"])+ git(["-C", str(path), "push", "-u", "origin", branch, "-q"])+++def prepare_merge(env: DemoEnv):+ """Set up repo for wt-merge demo with LLM mock."""+ prepare_demo_repo(env, REPO_ROOT)++ # User config with llm commit generation+ config_dir = env.home / ".config" / "worktrunk"+ project_id = str(env.bare_remote).removesuffix(".git")+ (config_dir / "config.toml").write_text(f'''[commit-generation]+command = "llm"+args = ["-m", "claude-haiku-4.5"]++[projects."{project_id}"]+approved-commands = ["cargo nextest run"]+''')++ # Add uncommitted changes to hooks branch for commit demo+ hooks_path = env.work_base / "acme.hooks"+ if hooks_path.exists():+ new_file = hooks_path / "src" / "validation.rs"+ new_file.write_text('''//! Input validation utilities.++/// Validates that a number is positive.+pub fn is_positive(n: i32) -> bool {+ n > 0+}++/// Validates that a string is not empty.+pub fn is_non_empty(s: &str) -> bool {+ !s.trim().is_empty()+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn test_is_positive() {+ assert!(is_positive(1));+ assert!(!is_positive(0));+ assert!(!is_positive(-1));+ }+}+''')+ git(["-C", str(hooks_path), "add", "src/validation.rs"])++ # Mock llm CLI+ bin_dir = env.home / "bin"+ bin_dir.mkdir(exist_ok=True)+ llm_mock = bin_dir / "llm"+ llm_mock.write_text("""#!/bin/bash+sleep 0.5+echo "feat(validation): add input validation utilities"+echo ""+echo "Add validation module with is_positive and is_non_empty helpers"+echo "for validating user input. Includes comprehensive test coverage."+""")+ llm_mock.chmod(0o755)+++def prepare_select(env: DemoEnv):+ """Set up repo for wt-select demo (standard setup)."""+ prepare_demo_repo(env, REPO_ROOT)+++SETUP_FUNCS = {+ "core": prepare_core,+ "merge": prepare_merge,+ "select": prepare_select,+}+++def main():+ import argparse+ parser = argparse.ArgumentParser()+ parser.add_argument("--only", help="Only record specific demo (e.g., wt-select)")+ args = parser.parse_args()++ check_dependencies(["wt", "vhs", "starship"])+ setup_demo_output(OUT_DIR)++ # Filter demos if --only specified+ demos_to_record = DEMOS+ if args.only:+ demos_to_record = [(t, n, s, v) for t, n, s, v in DEMOS if n == args.only]+ if not demos_to_record:+ print(f"Unknown demo: {args.only}")+ print(f"Available: {', '.join(n for _, n, _, _ in DEMOS)}")+ return++ # Check vhs-keystrokes availability for wt-select+ vhs_keystrokes_available = Path(VHS_KEYSTROKES).exists()+ if not vhs_keystrokes_available:+ print(f"Note: vhs-keystrokes not found at {VHS_KEYSTROKES}")+ print("wt-select demo will be skipped. See docs/demos/vhs-keystrokes/README.md")++ # Record each demo+ for tape_file, output_name, setup_key, vhs_type in demos_to_record:+ tape_path = TAPES_DIR / tape_file+ if not tape_path.exists():+ print(f"Skipping {output_name}: {tape_file} not found")+ continue++ # Check if this demo needs vhs-keystrokes+ if vhs_type == "vhs-keystrokes" and not vhs_keystrokes_available:+ print(f"Skipping {output_name}: requires vhs-keystrokes")+ continue++ vhs_binary = VHS_KEYSTROKES if vhs_type == "vhs-keystrokes" else "vhs"++ output_gifs = {+ "light": OUT_DIR / f"{output_name}.gif",+ "dark": OUT_DIR / f"{output_name}-dark.gif",+ }+ print(f"\n{'='*60}")+ print(f"Recording {output_name}...")+ print(f"{'='*60}")++ # Create fresh environment for each demo+ env = DemoEnv(name=output_name, out_dir=OUT_DIR, repo_name="acme")+ SETUP_FUNCS[setup_key](env)++ print(f"Demo repo: {env.repo}")+ record_all_themes(env, tape_path, output_gifs, REPO_ROOT, vhs_binary=vhs_binary, size=SIZE_DOCS)+++if __name__ == "__main__":+ main()diff --git a/docs/demos/review.html b/docs/demos/review.htmlnew file mode 100644index 000000000..9762578e4--- /dev/null+++ b/docs/demos/review.html@@ -0,0 +1,245 @@+<!DOCTYPE html>+<html lang="en">+<head>+ <meta charset="UTF-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0">+ <title>Worktrunk Twitter Demo Review</title>+ <style>+ * { box-sizing: border-box; }+ body {+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;+ background: #1a1a1a;+ color: #e0e0e0;+ margin: 0;+ padding: 20px;+ }+ h1 {+ text-align: center;+ margin-bottom: 10px;+ }+ .subtitle {+ text-align: center;+ color: #888;+ margin-bottom: 30px;+ }+ .controls {+ text-align: center;+ margin-bottom: 20px;+ }+ .controls button {+ background: #333;+ color: #e0e0e0;+ border: 1px solid #555;+ padding: 8px 16px;+ margin: 0 5px;+ cursor: pointer;+ border-radius: 4px;+ }+ .controls button:hover {+ background: #444;+ }+ .controls button.active {+ background: #0066cc;+ border-color: #0066cc;+ }+ .grid {+ display: grid;+ grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));+ gap: 20px;+ max-width: 1600px;+ margin: 0 auto;+ }+ .demo {+ background: #252525;+ border-radius: 8px;+ overflow: hidden;+ }+ .demo-header {+ padding: 12px 16px;+ background: #333;+ display: flex;+ justify-content: space-between;+ align-items: center;+ }+ .demo-title {+ font-weight: 600;+ font-size: 14px;+ }+ .demo-tweet {+ font-size: 12px;+ color: #888;+ }+ .demo-content {+ padding: 10px;+ min-height: 300px;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .demo-content img {+ max-width: 100%;+ height: auto;+ border-radius: 4px;+ }+ .demo-content.missing {+ color: #666;+ font-style: italic;+ }+ .demo-footer {+ padding: 8px 16px;+ background: #2a2a2a;+ font-size: 12px;+ color: #888;+ }+ .status {+ display: inline-block;+ padding: 2px 8px;+ border-radius: 3px;+ font-size: 11px;+ margin-left: 8px;+ }+ .status.exists { background: #1a4d1a; color: #4ade80; }+ .status.new { background: #4d3d1a; color: #fbbf24; }+ .status.missing { background: #4d1a1a; color: #f87171; }+ .refresh-note {+ text-align: center;+ color: #666;+ font-size: 12px;+ margin-top: 20px;+ }+ </style>+</head>+<body>+ <h1>Worktrunk Twitter Demos</h1>+ <p class="subtitle">Review page for Twitter thread launch demos</p>++ <div class="controls">+ <button class="active" onclick="setTheme('light')">Light Theme</button>+ <button onclick="setTheme('dark')">Dark Theme</button>+ <button onclick="refreshAll()">Refresh All</button>+ </div>++ <div class="grid" id="demos"></div>++ <p class="refresh-note">Images auto-refresh every 30 seconds. Click "Refresh All" to force refresh.</p>++ <script>+ const demos = [+ {+ id: 'wt-demo',+ title: 'wt-core.gif',+ tweet: 'Tweet 1: Intro',+ source: 'wt-core',+ file: '../static/assets/wt-core',+ status: 'exists'+ },+ {+ id: 'wt-switch',+ title: 'wt-switch.gif',+ tweet: 'Tweet 3: Switch',+ source: 'wt-core',+ file: '../static/assets/wt-switch',+ status: 'new'+ },+ {+ id: 'wt-list-remove',+ title: 'wt-list-remove.gif',+ tweet: 'Tweet 4: List & Remove',+ source: 'wt-core',+ file: '../static/assets/wt-list-remove',+ status: 'new'+ },+ {+ id: 'wt-hooks',+ title: 'wt-hooks.gif',+ tweet: 'Tweet 5: Hooks',+ source: 'wt-core',+ file: '../static/assets/wt-hooks',+ status: 'new'+ },+ {+ id: 'wt-list',+ title: 'wt-list.gif',+ tweet: 'Tweet 6: List Progressive',+ source: 'wt-core',+ file: '../static/assets/wt-list',+ status: 'new'+ },+ {+ id: 'wt-select',+ title: 'wt-select-short.gif',+ tweet: 'Tweet 8: Select',+ source: 'wt-select',+ file: '../static/assets/wt-select-short',+ status: 'new'+ },+ {+ id: 'wt-commit',+ title: 'wt-commit.gif',+ tweet: 'Tweet 9: Commit',+ source: 'wt-merge',+ file: '../static/assets/wt-commit',+ status: 'new'+ },+ {+ id: 'wt-merge',+ title: 'wt-merge.gif',+ tweet: 'Tweet 10: Merge',+ source: 'wt-merge',+ file: '../static/assets/wt-merge',+ status: 'exists'+ },+ ];++ let currentTheme = 'light';++ function getGifPath(demo) {+ const suffix = currentTheme === 'dark' ? '-dark' : '';+ return `${demo.file}${suffix}.gif`;+ }++ function renderDemos() {+ const container = document.getElementById('demos');+ const timestamp = Date.now();++ container.innerHTML = demos.map(demo => `+ <div class="demo" id="demo-${demo.id}">+ <div class="demo-header">+ <span>+ <span class="demo-title">${demo.title}</span>+ <span class="status ${demo.status}">${demo.status}</span>+ </span>+ <span class="demo-tweet">${demo.tweet}</span>+ </div>+ <div class="demo-content" id="content-${demo.id}">+ <img src="${getGifPath(demo)}?t=${timestamp}"+ alt="${demo.title}"+ onerror="this.parentElement.innerHTML='<span class=missing>Not yet created</span>'" />+ </div>+ <div class="demo-footer">+ Source: ${demo.source} • ${demo.file}.gif+ </div>+ </div>+ `).join('');+ }++ function setTheme(theme) {+ currentTheme = theme;+ document.querySelectorAll('.controls button').forEach(btn => {+ btn.classList.toggle('active', btn.textContent.toLowerCase().includes(theme));+ });+ renderDemos();+ }++ function refreshAll() {+ renderDemos();+ }++ // Initial render+ renderDemos();++ // Auto-refresh every 30 seconds+ setInterval(refreshAll, 30000);+ </script>+</body>+</html>diff --git a/docs/demos/wt-select/CLAUDE.md b/docs/demos/shared/CLAUDE.mdsimilarity index 97%rename from docs/demos/wt-select/CLAUDE.mdrename to docs/demos/shared/CLAUDE.mdindex 6cc390f9e..3d2777e7e 100644--- a/docs/demos/wt-select/CLAUDE.md+++ b/docs/demos/shared/CLAUDE.md@@ -62,13 +62,13 @@ Inline viewing options:The demo requires a custom VHS fork that displays keystroke overlays. **You must build this before running the demo:**```bash-cd docs/demos/wt-select+cd docs/demosgit clone -b keypress-overlay https://github.com/max-sixty/vhs.git vhs-keystrokescd vhs-keystrokesgo build -o vhs-keystrokes .```-The build script looks for the binary at `docs/demos/wt-select/vhs-keystrokes/vhs-keystrokes`.+The build scripts look for the binary at `docs/demos/vhs-keystrokes/vhs-keystrokes`.**Why custom VHS?** The fork adds a large keystroke overlay in the center of the screen, showing what keys are being pressed. This is essential for demo GIFs where viewers need to see navigation keys (↓, Ctrl+D, etc.).diff --git a/docs/demos/shared/__init__.py b/docs/demos/shared/__init__.pyindex 1d24adf8a..419ff9cad 100644--- a/docs/demos/shared/__init__.py+++ b/docs/demos/shared/__init__.py@@ -4,6 +4,9 @@ from .lib import (REAL_HOME,FIXTURES_DIR,DemoEnv,+ DemoSize,+ SIZE_TWITTER,+ SIZE_DOCS,run,git,render_tape,@@ -27,6 +30,9 @@ __all__ = ["REAL_HOME","FIXTURES_DIR","DemoEnv",+ "DemoSize",+ "SIZE_TWITTER",+ "SIZE_DOCS","run","git","render_tape",diff --git a/docs/demos/shared/lib.py b/docs/demos/shared/lib.pyindex 2a859d092..b68442a66 100644--- a/docs/demos/shared/lib.py+++ b/docs/demos/shared/lib.py@@ -439,12 +439,26 @@ def run_fish_script(return clean_ansi_output(result.stdout + result.stderr)+@dataclass+class DemoSize:+ """Canvas and font size for demo recording."""+ width: int+ height: int+ fontsize: int+++# Predefined sizes for different contexts+SIZE_TWITTER = DemoSize(width=1200, height=700, fontsize=26) # Big text for mobile+SIZE_DOCS = DemoSize(width=1600, height=900, fontsize=24) # More content for docs++def record_all_themes(demo_env: "DemoEnv",tape_template: Path,output_gifs: dict[str, Path],repo_root: Path,vhs_binary: str = "vhs",+ size: DemoSize = None,):"""Record demo GIFs for all themes.@@ -454,7 +468,11 @@ def record_all_themes(output_gifs: Dict of theme_name -> output GIF path (e.g., {"light": path, "dark": path})repo_root: Path to worktrunk repo root (for target/debug)vhs_binary: VHS binary to use (default "vhs", can be path to custom build)+ size: Canvas and font size (default SIZE_DOCS)"""+ if size is None:+ size = SIZE_DOCS+tape_rendered = demo_env.out_dir / ".rendered.tape"starship_config = demo_env.out_dir / "starship.toml"docs_assets = repo_root / "docs" / "static" / "assets"@@ -470,6 +488,10 @@ def record_all_themes("OUTPUT_GIF": output_gif,"TARGET_DEBUG": repo_root / "target" / "debug","THEME": format_theme_for_vhs(theme),+ "ANTHROPIC_API_KEY": os.environ.get("ANTHROPIC_API_KEY", ""),+ "WIDTH": size.width,+ "HEIGHT": size.height,+ "FONTSIZE": size.fontsize,}if not render_tape(tape_template, tape_rendered, replacements):diff --git a/docs/demos/wt-core/demo.tape b/docs/demos/tapes/wt-core.tapesimilarity index 95%rename from docs/demos/wt-core/demo.taperename to docs/demos/tapes/wt-core.tapeindex ce7488217..6cb475005 100644--- a/docs/demos/wt-core/demo.tape+++ b/docs/demos/tapes/wt-core.tape@@ -4,10 +4,10 @@ Require wtRequire gitSet Shell "fish"-Set FontSize 24+Set FontSize {{FONTSIZE}}Set FontFamily "Geist Mono, Berkeley Mono, Fira Code, JetBrains Mono, Menlo, Apple Color Emoji"-Set Width 1600-Set Height 900+Set Width {{WIDTH}}+Set Height {{HEIGHT}}Set Theme {{THEME}}Set Padding 18Set LineHeight 1.12@@ -65,7 +65,7 @@ Sleep 2.5s# 5. Show full list with CI statusType "wt list --full"Enter-Sleep 2.5s+Sleep 3s# 6. Switch to billing (already merged)Type "wt switch billing"diff --git a/docs/demos/wt-merge/demo.tape b/docs/demos/tapes/wt-merge.tapesimilarity index 89%rename from docs/demos/wt-merge/demo.taperename to docs/demos/tapes/wt-merge.tapeindex 4d05b16be..40da0bcf3 100644--- a/docs/demos/wt-merge/demo.tape+++ b/docs/demos/tapes/wt-merge.tape@@ -4,10 +4,10 @@ Require wtRequire gitSet Shell "fish"-Set FontSize 24+Set FontSize {{FONTSIZE}}Set FontFamily "Geist Mono, Berkeley Mono, Fira Code, JetBrains Mono, Menlo, Apple Color Emoji"-Set Width 1600-Set Height 900+Set Width {{WIDTH}}+Set Height {{HEIGHT}}Set Theme {{THEME}}Set Padding 18Set LineHeight 1.12@@ -56,11 +56,9 @@ Type 'echo "- Q4 report ready" >> notes.md'EnterSleep 0.8s-Type "wt list"-Enter-Sleep 1.6s-+# Pre-enter pause: merge output scrolls past visible areaType "wt merge"+Sleep 1sEnterSleep 8sdiff --git a/docs/demos/wt-select/demo.tape b/docs/demos/tapes/wt-select.tapesimilarity index 95%rename from docs/demos/wt-select/demo.taperename to docs/demos/tapes/wt-select.tapeindex 77e5a69ca..baf3c91ee 100644--- a/docs/demos/wt-select/demo.tape+++ b/docs/demos/tapes/wt-select.tape@@ -4,10 +4,10 @@ Require wtRequire gitSet Shell "fish"-Set FontSize 19+Set FontSize {{FONTSIZE}}Set FontFamily "Geist Mono, Berkeley Mono, Fira Code, JetBrains Mono, Menlo, Apple Color Emoji"-Set Width 1600-Set Height 800+Set Width {{WIDTH}}+Set Height {{HEIGHT}}Set Theme {{THEME}}Set Padding 18Set LineHeight 1.12diff --git a/docs/demos/wt-core/build b/docs/demos/wt-core/builddeleted file mode 100755index 9b3154ed8..000000000--- a/docs/demos/wt-core/build+++ /dev/null@@ -1,124 +0,0 @@-#!/usr/bin/env python3-"""Build script for wt-core demo GIF.--This demo shows the core workflow with hooks:-1. wt list - see current worktrees with variety-2. wt switch - switch between worktrees-3. Show the post-start/pre-remove config-4. wt switch --create - create worktree with post-start running-5. wt list --full - show CI status-6. wt remove - remove worktree with pre-remove hook-"""--import sys-from pathlib import Path--# Add docs/demos/ to path for shared library-SCRIPT_DIR = Path(__file__).parent-DEMOS_DIR = SCRIPT_DIR.parent-sys.path.insert(0, str(DEMOS_DIR))--from shared import (- DemoEnv, git, prepare_demo_repo,- check_dependencies, setup_demo_output, build_shell_env, run_fish_script, record_all_themes,-)--REPO_ROOT = DEMOS_DIR.parent.parent-OUT_DIR = SCRIPT_DIR / "out"-TAPE_TEMPLATE = SCRIPT_DIR / "demo.tape"--OUTPUT_GIFS = {- "light": OUT_DIR / "wt-core.gif",- "dark": OUT_DIR / "wt-core-dark.gif",-}---def prepare_repo(env: DemoEnv):- """Set up the demo repository with branches and worktrees."""- hooks_config = '''[post-start]-dev = "npm run dev"--[pre-remove]-cleanup = "flyctl scale count 0"-'''- prepare_demo_repo(env, REPO_ROOT, hooks_config=hooks_config)-- # Demo-specific: mock CLIs for hooks- bin_dir = env.home / "bin"-- npm_mock = bin_dir / "npm"- npm_mock.write_text("""#!/bin/bash-if [[ "$1" == "run" && "$2" == "dev" ]]; then- echo ""- echo " VITE v5.4.2 ready in 342 ms"- echo ""- echo " ➜ Local: http://localhost:3000/"- echo " ➜ Network: http://192.168.1.42:3000/"-fi-""")- npm_mock.chmod(0o755)-- flyctl_mock = bin_dir / "flyctl"- flyctl_mock.write_text("""#!/bin/bash-if [[ "$1" == "scale" && "$2" == "count" && "$3" == "0" ]]; then- echo "Scaling app to 0 machines"-fi-""")- flyctl_mock.chmod(0o755)-- # Demo-specific: user config with approved commands- config_dir = env.home / ".config" / "worktrunk"- project_id = str(env.bare_remote).removesuffix(".git")- (config_dir / "config.toml").write_text(f'''[projects."{project_id}"]-approved-commands = ["npm run dev", "flyctl scale count 0"]-''')-- # Add billing branch (at same commit as main = merged)- create_branch_billing(env)---def create_branch_billing(env: DemoEnv):- """Create billing branch that's already merged (at same commit as main)."""- branch = "billing"- path = env.work_base / f"acme.{branch}"- git(["-C", str(env.repo), "worktree", "add", "-q", "-b", branch, str(path), "main"])- git(["-C", str(path), "push", "-u", "origin", branch, "-q"])---def record_text(demo_env: DemoEnv):- """Record text output by running demo commands."""- commands = [- "wt list",- "wt switch alpha",- "cat .config/wt.toml",- "wt switch --create api",- "wt list --full",- "wt switch billing",- "wt remove",- ]-- env = build_shell_env(demo_env, REPO_ROOT)- script = "\n".join(f"echo '$ {cmd}'\n{cmd}\necho ''" for cmd in commands)- output = run_fish_script(demo_env, script, env)- (OUT_DIR / "run.txt").write_text(output)---def main():- check_dependencies(["wt", "vhs", "starship", "bat"])- setup_demo_output(OUT_DIR)-- # Create separate environments for text and VHS recording- text_env = DemoEnv(name="text", out_dir=OUT_DIR, repo_name="acme")- vhs_env = DemoEnv(name="vhs", out_dir=OUT_DIR, repo_name="acme")-- prepare_repo(text_env)- record_text(text_env)-- prepare_repo(vhs_env)- record_all_themes(vhs_env, TAPE_TEMPLATE, OUTPUT_GIFS, REPO_ROOT)-- print(f"\nText log saved to {OUT_DIR / 'run.txt'}")---if __name__ == "__main__":- main()diff --git a/docs/demos/wt-merge/build b/docs/demos/wt-merge/builddeleted file mode 100755index ec52d0a03..000000000--- a/docs/demos/wt-merge/build+++ /dev/null@@ -1,91 +0,0 @@-#!/usr/bin/env python3-"""Build script for wt-merge demo GIF."""--import sys-from pathlib import Path--# Add docs/demos/ to path for shared library-SCRIPT_DIR = Path(__file__).parent-DEMOS_DIR = SCRIPT_DIR.parent-sys.path.insert(0, str(DEMOS_DIR))--from shared import (- DemoEnv, prepare_demo_repo,- check_dependencies, setup_demo_output, build_shell_env, run_fish_script, record_all_themes,-)--REPO_ROOT = DEMOS_DIR.parent.parent-OUT_DIR = SCRIPT_DIR / "out"-TAPE_TEMPLATE = SCRIPT_DIR / "demo.tape"--OUTPUT_GIFS = {- "light": OUT_DIR / "wt-merge.gif",- "dark": OUT_DIR / "wt-merge-dark.gif",-}---def prepare_repo(env: DemoEnv):- """Set up the demo repository using shared setup plus wt-specific config."""- prepare_demo_repo(env, REPO_ROOT)-- # wt-merge demo-specific: user config with llm commit generation- config_dir = env.home / ".config" / "worktrunk"- project_id = str(env.bare_remote).removesuffix(".git")- (config_dir / "config.toml").write_text(f'''[commit-generation]-command = "llm"-args = ["-m", "claude-haiku-4.5"]--[projects."{project_id}"]-approved-commands = ["cargo nextest run"]-''')---def record_text(demo_env: DemoEnv):- """Record text output by running demo commands."""- # Extract commands from tape- commands = []- for line in TAPE_TEMPLATE.read_text().splitlines():- if line.startswith("Type "):- cmd = line[5:].strip().strip('"').strip("'")- # Skip setup commands- if not any(cmd.startswith(p) for p in ["set -gx", "export ", "eval ", "cd ", "clear", "exit", "starship init", "wt config shell init"]):- commands.append(cmd)-- env = build_shell_env(demo_env, REPO_ROOT, extra={- "COLUMNS": "160",- "NEXTEST_STATUS_LEVEL": "none",- "NEXTEST_FINAL_STATUS_LEVEL": "flaky",- "NEXTEST_NO_FAIL_FAST": "1",- })-- # Build script with delays after merge commands- script_lines = []- for cmd in commands:- script_lines.append(cmd)- if cmd.startswith("wt merge"):- script_lines.append("sleep 2")-- output = run_fish_script(demo_env, "\n".join(script_lines), env)- output = output.replace("^D", "") # Clean EOF marker- (OUT_DIR / "run.txt").write_text(output)---def main():- check_dependencies(["wt", "vhs", "starship"])- setup_demo_output(OUT_DIR)-- # Create separate environments for text and VHS recording- text_env = DemoEnv(name="text", out_dir=OUT_DIR, repo_name="acme")- vhs_env = DemoEnv(name="vhs", out_dir=OUT_DIR, repo_name="acme")-- prepare_repo(text_env)- record_text(text_env)-- prepare_repo(vhs_env)- record_all_themes(vhs_env, TAPE_TEMPLATE, OUTPUT_GIFS, REPO_ROOT)-- print(f"\nText log saved to {OUT_DIR / 'run.txt'}")---if __name__ == "__main__":- main()diff --git a/docs/demos/wt-select/build b/docs/demos/wt-select/builddeleted file mode 100755index 6b67bc77e..000000000--- a/docs/demos/wt-select/build+++ /dev/null@@ -1,62 +0,0 @@-#!/usr/bin/env python3-"""Build script for wt select demo GIF.--Uses the shared prepare_demo_repo() infrastructure with alpha/beta/hooks branches,-same as wt-core and wt-merge demos.--See CLAUDE.md for full setup details.-"""--import os-import shutil-import sys-from pathlib import Path--# Add docs/demos/ to path for shared library-SCRIPT_DIR = Path(__file__).parent-DEMOS_DIR = SCRIPT_DIR.parent-sys.path.insert(0, str(DEMOS_DIR))--from shared import (- DemoEnv,- prepare_demo_repo,- check_dependencies, setup_demo_output, record_all_themes,-)--REPO_ROOT = DEMOS_DIR.parent.parent-OUT_DIR = SCRIPT_DIR / "out"-TAPE_TEMPLATE = SCRIPT_DIR / "demo.tape"--OUTPUT_GIFS = {- "light": OUT_DIR / "wt-select.gif",- "dark": OUT_DIR / "wt-select-dark.gif",-}--# Custom VHS binary with keystroke overlay-VHS_BINARY = os.environ.get("VHS_KEYSTROKES", str(SCRIPT_DIR / "vhs-keystrokes" / "vhs-keystrokes"))---def main():- check_dependencies(["git"])- setup_demo_output(OUT_DIR)-- # Create demo environment (uses shared infrastructure like other demos)- demo_env = DemoEnv(name="select", out_dir=OUT_DIR, repo_name="acme")- prepare_demo_repo(demo_env, REPO_ROOT)-- print(f"\nDemo repo created at: {demo_env.repo}")- print(f"Worktrees at: {demo_env.work_base}")-- # Record if VHS is available- vhs_available = Path(VHS_BINARY).exists() if "/" in VHS_BINARY else shutil.which(VHS_BINARY)- if vhs_available:- record_all_themes(demo_env, TAPE_TEMPLATE, OUTPUT_GIFS, REPO_ROOT, vhs_binary=VHS_BINARY)- else:- print(f"\nSkipping GIF recording ({VHS_BINARY} not available)")- print("\nTo test manually:")- print(f" cd {demo_env.repo}")- print(f" HOME={demo_env.home} wt select")---if __name__ == "__main__":- main()