r/tmux

TSM – pure-bash tmux session manager: SSH auto-attach + interactive session switcher, zero dependencies
▲ 30 r/tmux+1 crossposts

TSM – pure-bash tmux session manager: SSH auto-attach + interactive session switcher, zero dependencies

https://github.com/Aws505/tsm

I got tired of typing `tmux attach` every time I SSH into my server, then hunting for the right session. So I built **tsm** — a self-contained tmux workspace manager.

Every SSH login (including from a phone) automatically attaches to a dedicated "main" session that runs an interactive menu. Pick a workspace, switch to it. `Prefix+m` brings you back to the menu from anywhere.

The menu looks like this:

┌──────────────────────────────────────────┐

│ TMUX SESSION MANAGER │

└──────────────────────────────────────────┘

current: main 14:32 ^a·m

wlan0 192.168.1.42 · tailscale0 100.100.0.1

▶ [1] code Project workspace idle

[2] dev Claude active (1)

[3] codex Codex active (1)

[4] other General shell stopped

──────────────────────────────────────────

↑/↓ navigate Enter/[num] select

[r] refresh [s] start all [q] quit

Arrow keys or number keys to navigate. Selecting a stopped session starts it then switches. No fzf, no fuzzy search — just a fixed set of named workspaces that are always running.

**Key features:**

- Auto-attaches on every SSH login — no manual `tmux attach` ever

- All sessions defined in one config file (bash arrays, no YAML/Ruby/Python)

- Sessions can auto-run a command on start — I have one that launches Claude Code, one that launches Codex, just by setting `INIT_CMDS=( "" "claude" "codex" "" )`

- Per-session env vars injected before the startup command, inherited by every pane

- Zero dependencies — pure bash + tmux

**How it compares:**

| | TSM | tmuxinator/tmuxp | tmux-sessionizer | tmux-resurrect |

|--|-----|-----------------|-----------------|----------------|

| SSH auto-attach | ✓ built-in | ✗ | ✗ | ✗ |

| Interactive menu | ✓ built-in | ✗ | ✓ needs fzf | ✗ |

| Single config file | ✓ | ✗ per-project | ✗ | ✗ |

| Zero dependencies | ✓ pure bash | ✗ Ruby/Python | ✗ needs fzf | ✓ |

| Per-session env vars | ✓ | partial | ✗ | ✗ |

It doesn't do multi-pane layouts (use tmuxinator for that) or fuzzy project search (use tmux-sessionizer). Pair with tmux-resurrect if you need sessions to survive reboots.

**Quick start:**

git clone https://github.com/Aws505/tsm ~/tsm

cd ~/tsm

cp conf/sessions.conf.example conf/sessions.conf

$EDITOR conf/sessions.conf

bash install.sh

Works well from iOS/Android terminal apps (Terminus, Blink) — `Ctrl+a` prefix and mouse support make it usable on a phone keyboard.

Happy to answer questions or take feedback!

u/ECE420 — 13 days ago
The ultimate tmux cheatsheet just got better. Major updates made.
▲ 45 r/linux4noobs+1 crossposts

The ultimate tmux cheatsheet just got better. Major updates made.

Ok I posted not too long ago my first cut at a new modern tmux cheatsheet. It got a great response from the community so thank you. I love building these things and had received a few requests to add features to it (most popular was custom key bindings). I took the great feedback and implemented several new features. I also tweaked some UI/UX elements for quality-of-life improvements. As I said, I love to build this sort of thing & my goal is to try to maximize simplicity while also providing maximum functionality!

https://tmuxcheatsheet.org

This latest iteration features:

  • All the common and often used tmux commands are included (first load are defaults)
  • Ability now to change defaults to your own custom bindings
  • Change your prefix to your custom binding. Reflects the custom prefix in all cards!
  • You can change as many bindings as you like. Edit anytime. Revert to default.
  • Custom bindings are color-coded so they clearly stand out against defaults
  • You can reset all custom bindings at once to the defaults.
  • Each card clearly lists the aliases of the command if such alias exists. Copy of the command will always default to the shortest version of the command (i.e. tmux a, tmux at, tmux attach, tmux attach-session will always copy tmux-a to clipboard)
  • Import/Export custom bindings. Once bindings are setup we suggest Export of them. We will outpout to a json file you save to your drive. If your browser LocalStorage ever gets smoked (clear browser, new computer, OS reinstall, etc) you can simply import the json file and all your custom settings return.
  • Filter commands by Sessions, Windows, Panes, Copy Mode, Miscellaneous, Custom Bindings (you can also pair Custom bindings filter with any of the others)
  • Search all commands and descriptions lightning fast. Each key press filters the command cards in real-time.
  • Hit the '/' anytime to bring focus to the search box
  • Desktop, Tablet, and Mobile responsive
  • Dark/Light mode toggle
  • Copy any command to your clipboard from the card with a click, including any custom bindings
  • No login required. No clutter.
  • Easy to remember domain name (bookmark and save)
  • One hidden easter egg on the page somewhere! (for fun)

I included links at the bottom of the tmux cheatsheet for my Neovim Cheatsheet, Git & Git CLI Cheatsheet, Atuin Cheatsheet and Zellij cheatsheet. They have similar functionality where applicable and unique functionality also, where it's most applicable for the specific program. This tmux cheatsheet and these other sheets require no login and are made to support the community, both newcomers (to learn) and experts (for reference use). Feel free to share and bookmark as you like. I will continue to maintain these sheets and yes, I do use them all myself! I've always found cheatsheets to be my favorite resource when learning or using these CLI tools with so many commands.

If any errors or bugs are found, post them here or DM me anytime. I will quickly address these. If there are any suggestions, please post or DM as well. That's all! Enjoy and Happy tmux'ing!

u/marcvv — 1 day ago
[Update]: tsman v0.7.0: layout templates, visual overhaul and UX improvements
▲ 15 r/tmux

[Update]: tsman v0.7.0: layout templates, visual overhaul and UX improvements

Since my last post I continued working on tsman, adding new features and making tweaks based on my experience using it.

What's New:

Layout Templates:

  • use tsman layout save [name] to capture the window/pane structure of your current session as a reusable template.
  • create new sessions from these templates by simply providing a name and a working directory.
  • if you are in the tui menu you can see a preview of the layout structure.

TUI Visual Overhaul:

  • matched characters are highlighted when fuzzy-searching.
  • active sessions are highlighted while inactive ones are dimmed.
  • clearer visual markers for active vs. saved sessions.
  • a more polished overall UI.

CLI & Configuration:

  • customize storage paths, and basic options (like show_preview) via ~/.config/tsman/config.toml.
  • generate completions for your shell of choice using tsman completions [shell_name] (bash, fish, zsh and powershell are supported).

Quality of Life:

  • tab-completion for directories when creating sessions.
  • new actions to rename, reload sessions.

Improved MacOS compatibility

Take a look:

Crates.io: https://crates.io/crates/tsman

GitHub: https://github.com/GabrielTecuceanu/tsman

I want to continue working on the project and I'd love to here some of your feedback.

u/carrolls_tortoise — 11 hours ago
Week