Skip to content

justinjdickow/tabdriver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tabdriver

Let Claude Code (or you) drive iTerm2 tabs and split panes from the command line: open tabs, split them, cd somewhere, launch dev servers, read their output back, and close them. Zero dependencies — it's a single zsh script built on iTerm2's AppleScript API.

tabdriver list                                   # windows/tabs/sessions (id + title)
tabdriver new-tab [--dir DIR]                    # prints new session id
tabdriver new-window [--dir DIR]
tabdriver split <id> (--right|--below) [--dir DIR]
tabdriver run <id> <command...>                  # sends command + Enter
tabdriver read <id> [--lines N]                  # dump pane contents
tabdriver wait <id> --for REGEX [--timeout SEC]  # poll output for readiness
tabdriver name <id> <label>                      # set tab title
tabdriver close <id>

Every creating command prints the new session's UUID; all other commands address sessions by that id, so scripts (and Claude) can track exactly which pane is which.

Example

P=~/code/myapp
T1=$(tabdriver new-tab --dir "$P"); tabdriver name "$T1" "api :5001"
tabdriver run  "$T1" dotnet run --project Api/Api.Web
tabdriver wait "$T1" --for 'Now listening on' --timeout 120

Using it with Claude

Once the skill is installed, you don't run any of the above yourself — just tell Claude Code things like:

"Start my dev stack in 4 tabs" · "Split this tab and tail the API logs" · "Is the Vite server still running? Check its tab."

Claude opens the tabs, names them, launches the commands, watches each pane's output until it sees a readiness line, and reports back what's running where.

Install (Claude skill + CLI)

The Claude Code skill lives in-repo at .claude/skills/tabdriver/, so just opening this repo in Claude Code enables it for this project.

To make it available in every project (and put tabdriver on your PATH):

./install.sh

This symlinks the skill into ~/.claude/skills/tabdriver and the CLI into ~/bin/tabdriver (if ~/bin exists). Because they're symlinks, git pull in this repo updates the installed copy.

To uninstall:

./uninstall.sh

Requirements & notes

  • macOS + iTerm2 (running). No brew/pip packages needed.
  • First mutating call triggers a one-time macOS prompt: "Terminal wants to control iTerm2" — click Allow (System Settings → Privacy & Security → Automation if you missed it).
  • read returns the visible scrollback snapshot — great for readiness checks and diagnosis, not a complete log stream.
  • Split semantics: --right = side by side, --below = stacked.

License

MIT

About

Let Claude Code drive your iTerm2 tabs. A zero-dependency zsh CLI + Claude skill that opens tabs, splits panes, runs commands, and reads output back to verify servers actually started. Say "start my dev stack in 4 tabs" and Claude opens, names, launches, and confirms each one. Built on iTerm2's AppleScript API — nothing to install.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages