Workspace automation for iTerm2 using the official Python API. Creates consistent split-pane layouts on iTerm2 startup with workspace selector, tab customization, and git worktree discovery.
Also includes TextHelix.app - a macOS app that opens text files in Helix editor via iTerm2.
If you're using Anthropic's Claude Code CLI, run:
/install-workspace-launcher
This autonomous skill installs workspace-launcher.py to iTerm2's AutoLaunch directory in one go. It handles all prerequisites (Xcode CLT, uv, Python 3.13, git), clones the repo, builds native binaries, and verifies post-conditions. Full telemetry is written to ~/.local/state/workspace-launcher-install/install-<utc-iso>.jsonl for debugging.
Modes:
| Command | Purpose |
|---|---|
/install-workspace-launcher |
Full install (detect → bootstrap → fetch → build → wire → verify) |
/install-workspace-launcher --verify |
Check existing install; no changes |
/install-workspace-launcher --uninstall |
Remove symlinks; preserve configs |
/install-workspace-launcher --dry-run |
Preview plan without making changes |
Universal toolchain required: git, uv, swiftc (Xcode CLT), POSIX sh. No Homebrew dependency — all tools are either pre-installed or auto-installed by the skill.
For debugging, check the telemetry log:
tail -f ~/.local/state/workspace-launcher-install/install-*.jsonlIf you prefer Claude's general assistance without the autonomous installer:
git clone https://github.com/terrylica/iterm2-scripts
cd iterm2-scripts
claudeThen tell Claude what you want:
| You say... | Claude will... |
|---|---|
| "Set up the workspace launcher" | Run setup.sh, configure iTerm2, create symlinks |
| "Build TextHelix.app" | Install Platypus, run build-texthelix, guide Gatekeeper bypass |
| "Create a new workspace" | Run the setup wizard or help edit TOML configs |
| "Help me customize tabs" | Explain the config format and edit files |
Claude reads the project's CLAUDE.md files automatically and knows how to:
- Install dependencies (Python, Homebrew packages)
- Configure iTerm2 Python API
- Build and troubleshoot TextHelix.app
- Customize workspace configurations
git clone https://github.com/terrylica/iterm2-scripts
cd iterm2-scripts && bash setup.sh# Run directly with uv (no installation needed)
uv run https://raw.githubusercontent.com/terrylica/iterm2-scripts/main/workspace-launcher.py/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/terrylica/iterm2-scripts/main/install.sh)"- macOS (tested on macOS 14+)
- iTerm2 (version 3.5+)
- Python 3.13 (
brew install python@3.13) - uv package manager (
brew install uv)
-
Enable Python API in iTerm2: iTerm2 → Settings → General → Magic → Enable Python API
-
Restart iTerm2 - the workspace launcher will run automatically
-
Verify setup (optional): iTerm2 → Scripts → AutoLaunch → should show
workspace-launcher.py
Configuration files live in ~/.config/workspace-launcher/:
# ~/.config/workspace-launcher/workspace-default.toml
[layout]
left_pane_ratio = 0.25
settle_time = 0.3
[commands]
left = "ls -la" # Or: br --sort-by-type-dirs-first (requires broot)
right = "zsh" # Or: claude (requires Claude Code CLI)
[[tabs]]
name = "home"
dir = "~"
[[tabs]]
name = "projects"
dir = "~/projects"- Workspace Selector: Choose from multiple workspace configurations on startup
- Tab Customization: Select which tabs to open each session, reorder tab positions
- Git Worktree Discovery: Automatically discovers worktrees from all git repos
- Scan Folders: Configure which directories to scan for repositories
- Workspace Management: Enable/disable, delete, or create workspaces via Manage menu
- Snapshot Capture: Save current iTerm2 tabs as a new workspace configuration
- Setup Wizard: Guided first-run setup and on-demand workspace creation
- Migration Support: Automatically migrates from legacy
~/.config/iterm2/path - SwiftDialog UI: Enhanced dialogs when SwiftDialog is installed
brew install swiftdialog # Workspace selector and tab customization dialogs
brew install broot # File navigator for left paneThese are installed automatically by setup.sh if Homebrew is available.
macOS application that opens text files in Helix editor via iTerm2. Useful for:
- Setting Helix as default editor for
.md,.py,.toml, etc. - Opening files from Finder in a new iTerm2 window with Helix
Build with Claude Code:
claude
# Say: "Build TextHelix.app"Or build manually:
brew install --cask platypus
# Install CLI: Platypus.app → Settings → Install Command Line Tool
./bin/build-texthelixSee platypus/CLAUDE.md for full instructions.
See CLAUDE.md for detailed instructions on:
- Project architecture and build system
- Development workflow with mise
- Contribution guidelines
MIT