a feature-rich session manager for tmux

cargo install tsman
Each subcommand has a short alias shown in parentheses.
s)tsman save <session_name> # save with the specified name
tsman save # save with the current session name
o)tsman open <session_name>
e)Opens the config file in $EDITOR.
tsman edit <session_name> # edit the specified session
tsman edit # edit the current session
r)Kill the running session and recreate it from its saved config. The session must be both active and saved.
tsman reload <session_name>
tsman reload # reload the current session
d)tsman delete <session_name>
Layouts capture a session's window/pane structure without working directories, so you can reuse the same arrangement across different projects.
layout s)tsman layout save <layout_name> # save with the specified name
tsman layout save # save with the current session name
layout c)All panes in the new session start in the given working directory.
tsman layout create <layout_name> <work_dir> # session name defaults to layout name
tsman layout create <layout_name> <work_dir> <session_name> # use a custom session name
layout ls)tsman layout list
layout e)tsman layout edit <layout_name>
layout d)tsman layout delete <layout_name>
m)Open the interactive TUI menu.
tsman menu
tsman menu --preview # start with the preview pane on
tsman menu --ask-for-confirmation # prompt before deleting
tsman menu -p -a # shorthand for both flags
c)tsman completions bash > ~/.local/share/bash-completion/completions/tsman
tsman completions zsh > ~/.zfunc/_tsman
tsman completions fish > ~/.config/fish/completions/tsman.fish
Navigation:
| Keybinding | Action |
|---|---|
Esc / C-c |
Exit menu |
Up / C-p |
Select previous item |
Down / C-n |
Select next item |
Session actions:
| Keybinding | Saved session | Unsaved session |
|---|---|---|
Enter |
Open session | Open session |
C-s |
- | Save session |
C-e |
Edit config file | - |
C-d |
Delete config file | Kill session |
C-k |
Kill session | Kill session |
C-r |
Rename session and update config file | Rename session |
C-o |
Reload session from saved config | - |
Layout actions (when in layouts view):
| Keybinding | Action |
|---|---|
Enter |
Create a new session from layout |
C-e |
Edit layout config file |
C-d |
Delete layout |
C-r |
Rename layout |
UI controls:
| Keybinding | Action |
|---|---|
C-l |
Toggle sessions/layouts |
C-t |
Toggle preview pane |
C-h |
Toggle help popup |
C-w |
Delete last word from input |
C-u |
Delete to line start |
Shift-Up |
Scroll preview up |
Shift-Down |
Scroll preview down |
Workdir completion controls (in layout creation):
| Keybinding | Action |
|---|---|
Tab / C-n |
Open dropdown / cycle next |
Shift-Tab / C-p |
Cycle prev |
Up / Down |
Prev / next |
Confirmation popup:
| Keybinding | Action |
|---|---|
y / Y / Enter |
Confirm |
n / N / Esc / q |
Abort |
Help popup:
| Keybinding | Action |
|---|---|
C-h / C-c / Esc / q / Enter |
Close |
tsman reads ~/.config/tsman/config.toml on startup.
Run the init command to generate one interactively:
tsman init
All fields are optional - omit any section or key to use the default value.
[menu]
preview = false # start menu with the preview pane on
ask_for_confirmation = false # prompt before deleting
show_key_presses = false # show key press hints in the menu footer
[storage]
sessions_dir = "~/.config/.tsessions" # where session YAML files are stored
layouts_dir = "~/.config/.tlayouts" # where layout YAML files are stored
Precedence (highest to lowest): CLI flag > environment variable > config file > default.
You can add keybindings/aliases to your tmux/shell config for faster usage.
~/.tmux.conf:
# open menu in a tmux popup with preview pane and delete confirmation on
# note: requires tmux v3.2+
bind -r f display-popup -E -w 80% -h 80% "tsman menu -p -a"
bind -r C-s run-shell "tsman save"
~/.zshrc:
alias mux-fd="tsman menu -p -a"
$EDITOR must be set to use the edit command.- and _.$ claude mcp add tsman \
-- python -m otcore.mcp_server <graph>