macOS · Terminal.app + iTerm2

Jump to the right terminal by folder.
Never open a duplicate again.

A dozen terminals open, one per project — some running Claude, some just a shell. Stop clicking through tabs. Press a hotkey, type a few letters, hit ↵. And when you ask for a folder you already have open, it jumps to it instead of piling on another.

terminal-sessions — ⌥Space
Demo with sample folders showing recently used terminal tabs, the full list, and how to focus a specific tab

Two everyday annoyances, gone

The whole tool exists to kill exactly these.

The mess

“Which tab was that project again?”

You click through terminal after terminal hunting for the folder you were in.

Solved: one fuzzy-searchable list of every folder that has a terminal open — the right one is a couple of keystrokes away.
The duplication

“Wait, I already had this open.”

You open a second (and third) terminal for a folder you already had, and the pile grows.

Solved: asking for a folder focuses the terminal you already have there; a new one is created only when none exists.

Why you'll like it

🔎

Find by folder

Fuzzy-search every folder with an open terminal. No more tab roulette.

♻️

Reuse, don't duplicate

Focuses the existing terminal for a folder; opens a new one only if needed.

🧠

Knows what's running

A folder with a claude tab and a shell shows both — pick the exact one.

🖥️

Terminal + iTerm2

Manages both apps at once, with the exact tab brought to the front.

🔌

No third-party apps

A native menu-bar app and a shell command. Both self-contained.

⚡

No daemon

Reads live state each time — a tab you closed simply isn't in the list.

Two ways to use it — pick either

Same engine underneath, so they behave identically.

Menu-bar app ⌥Space

A native macOS app: a >_ menu-bar icon and a floating search panel.

  • Global hotkey — no Accessibility permission needed
  • Type to filter, ↑↓ to move, ↵ to focus, Esc to close
  • Multi-terminal folders expand with → to pick

Shell command tm

A bash + zsh function for people who live in the terminal.

  • tm — fuzzy-pick a folder → focus it
  • tm ~/dev/foo — reuse or open there
  • tm ls · tm doctor

Install in a minute

Needs macOS 13+, Node.js, and the Xcode command-line tools to build the app.

# clone & build the menu-bar app git clone https://github.com/DatHT/TerminalSession.git cd TerminalSession bash app/build.sh open app/build # drag "Terminal Sessions.app" into /Applications # then press ⌥Space anywhere ✦

Prefer the terminal? . "$PWD/shell/tm.sh" in your ~/.zshrc and type tm.

How it works

No daemon, nothing to sync — it just reads live state.

01

Enumerate

AppleScript lists every open Terminal.app & iTerm2 tab and its TTY.

02

Resolve

Each TTY → its foreground process → its working directory via ps + lsof.

03

Group

Tabs grouped by folder, each labelled by what's running in it.

04

Jump

Focuses the exact tab — or opens a new window cd'd into the folder.