Skip to content

hmmhmmhm/tmux-attach-browser

Repository files navigation

tmux-attach-browser

Choose or create a tmux session with one command.

CI Release Go License

Install

Already have tmux on your PATH? Install the latest release on macOS, Linux, or Windows WSL2:

curl -fsSL https://raw.githubusercontent.com/hmmhmmhm/tmux-attach-browser/main/install.sh | sh

The installer verifies the release checksum and places tab in ~/.local/bin. It never runs sudo.

Run tab

Demo showing tab browsing an existing tmux session and creating a new one

That is the whole workflow:

  1. Run tab to see your tmux sessions.
  2. Select a session and press Enter to enter it.
  3. Press n to create a session in the current directory.

To skip the browser and open a named session directly:

tab work

When tab runs inside tmux, it switches the current client to your chosen session instead of nesting another tmux client.

Keys

Key Action
Up, Down, j, k Select a session
Enter Enter the selected session
n Create a session in the current directory
/ Filter sessions by name
r Refresh the session list
? Show or hide expanded help
Esc Cancel filtering or session creation; quit from the session list
q, Ctrl+C Quit
Install tmux
# macOS
brew install tmux

# Ubuntu or Debian, including WSL2
sudo apt update && sudo apt install tmux

# Fedora
sudo dnf install tmux

# Arch Linux
sudo pacman -S tmux
Other installation options

Choose another writable installation directory:

curl -fsSL https://raw.githubusercontent.com/hmmhmmhm/tmux-attach-browser/main/install.sh | TAB_INSTALL_DIR="$HOME/bin" sh

Add the directory to your PATH if your shell does not already include it.

Install with Go 1.25 or newer:

go install github.com/hmmhmmhm/tmux-attach-browser/cmd/tab@latest

Native Windows PowerShell is intended for MSYS2 or Cygwin environments where tmux.exe is already available:

curl.exe -fsSL https://raw.githubusercontent.com/hmmhmmhm/tmux-attach-browser/main/install.ps1 | powershell -NoProfile -ExecutionPolicy Bypass -Command -

WSL2 remains the recommended Windows setup.

Troubleshooting

tab: command not found

The default installer destination is ~/.local/bin. Add it to your shell profile, then open a new terminal:

export PATH="$HOME/.local/bin:$PATH"

tmux is not installed or is not on PATH

Install tmux using the commands above, then confirm that tmux -V works in the same terminal.

tab: connect to session: exit status 1

The session may have ended after the list was loaded. Run tab again or press r before selecting.

Build and verify
git clone https://github.com/hmmhmmhm/tmux-attach-browser.git
cd tmux-attach-browser
go test -race ./...
go vet ./...
go build -o tab ./cmd/tab

Built with Bubble Tea. Contributions are described in CONTRIBUTING.md. Licensed under the MIT License.

About

Browse, create, and attach to tmux sessions with one tab command

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages