---
description: Open REEL Kanban board in a new terminal tab
argument-hint: [spec-directory]
allowed-tools:
  - Bash
---

# Kanban — Terminal Kanban Board

Opens the REEL Kanban TUI in a new iTerm tab.

**Argument**: Spec directory path (default: `spec/`)

---

## Launch

Detect the terminal from `$TERM_PROGRAM` and open a new tab with the Kanban board.

Replace `WORKING_DIR` with the current working directory (get it via Bash `pwd`) and `SPEC_DIR` with the argument (default `spec/`).

### iTerm (`TERM_PROGRAM=iTerm.app`)

```bash
osascript -e '
tell application "iTerm"
  tell current window
    create tab with default profile
    tell current session
      write text "cd WORKING_DIR && ~/.claude/scripts/kanban.sh SPEC_DIR"
    end tell
  end tell
end tell
'
```

### Apple Terminal (`TERM_PROGRAM=Apple_Terminal`)

```bash
osascript -e '
tell application "Terminal"
  activate
  do script "cd WORKING_DIR && ~/.claude/scripts/kanban.sh SPEC_DIR"
end tell
'
```

### Other terminals

Cannot open a new tab automatically. Tell the user:

"Your terminal (`$TERM_PROGRAM`) doesn't support automatic tab creation. Run this in a new tab manually:"

```
~/.claude/scripts/kanban.sh SPEC_DIR
```

Do not attempt to run the command — it needs an interactive terminal.

---

For iTerm and Apple Terminal, after launching tell the user: "Kanban board opened in a new terminal tab."
