Terminal utilities for window/tab manipulation, badges, notifications, and more.
brew install boochtek/tap/terminal-toolgit clone https://github.com/boochtek/terminal-tool.git
cd terminal-tool
make installterminal <command> [args]| Command | Description |
|---|---|
terminal title <text> |
Set window/tab title |
terminal reset |
Reset terminal state (colors, cursor, etc.) |
terminal info |
Show terminal information |
terminal colors |
Display color palette |
These commands work best in iTerm2 but will show a warning in other terminals:
| Command | Description |
|---|---|
terminal badge <text> |
Set corner watermark (badge) |
terminal profile <name> |
Switch to named profile |
terminal mark |
Set navigation mark at cursor |
terminal attention |
Request attention (bounce dock icon) |
terminal progress <0-100|done> |
Show progress in tab bar |
| Command | Description |
|---|---|
terminal notify <message> |
Send notification |
terminal cwd [directory] |
Set working directory for new tabs |
terminal cursor <style> |
Change cursor style |
terminal clipboard get|set |
Access system clipboard (works over SSH!) |
terminal image <file> |
Display inline image |
terminal link <url> [text] |
Create clickable hyperlink |
# Set window title
terminal title "My Project"
# Show iTerm2 badge
terminal badge "PROD"
# Reset terminal after a program misbehaves
terminal reset
# Notify when a long command completes
make build && terminal notify "Build complete!"
# Create a clickable link
terminal link "https://github.com" "GitHub"
# Display an image inline
terminal image screenshot.png
# Copy text to clipboard (works over SSH!)
echo "copied text" | terminal clipboard set
# Change cursor to a bar
terminal cursor bar
# Show terminal capabilities
terminal info
# Display color palette
terminal colorsThe cursor command accepts these styles:
block- Solid block cursorunderline- Underline cursorbar- Vertical bar cursor
Append -blink for blinking variants (e.g., block-blink).
| Feature | iTerm2 | Terminal.app | xterm | kitty |
|---|---|---|---|---|
| title | ✓ | ✓ | ✓ | ✓ |
| reset | ✓ | ✓ | ✓ | ✓ |
| info | ✓ | ✓ | ✓ | ✓ |
| colors | ✓ | ✓ | ✓ | ✓ |
| cursor | ✓ | ✓ | ✓ | ✓ |
| cwd | ✓ | ✓ | ✓ | ✓ |
| link | ✓ | ✓ | ✓ | ✓ |
| clipboard | ✓ | partial | ✓ | ✓ |
| badge | ✓ | - | - | - |
| profile | ✓ | - | - | - |
| mark | ✓ | - | - | - |
| attention | ✓ | - | - | - |
| progress | ✓ | - | - | - |
| notify | ✓ | via terminal-notifier | - | - |
| image | ✓ | - | - | partial |
For those interested in the underlying escape sequences:
| Command | Escape Sequence |
|---|---|
| title | OSC 0 (Set window/icon title) |
| badge | OSC 1337;SetBadgeFormat |
| reset | RIS (Reset to Initial State) |
| notify | OSC 9 / terminal-notifier |
| cwd | OSC 7 (Set working directory) |
| profile | OSC 1337;SetProfile |
| mark | OSC 1337;SetMark |
| attention | OSC 1337;RequestAttention |
| progress | OSC 9 |
| cursor | DECSCUSR (Set Cursor Style) |
| clipboard | OSC 52 |
| image | OSC 1337;File |
| link | OSC 8 (Hyperlink) |
- Required: Bash 3.2+
- Recommended:
terminal-notifier(fornotifycommand outside iTerm2)
Install terminal-notifier with:
brew install terminal-notifierRun tests:
make test
# or
bats test/MIT