11 unstable releases (3 breaking)
Uses new Rust 2024
| 0.5.6 | Oct 22, 2025 |
|---|---|
| 0.5.5 | Aug 13, 2025 |
| 0.4.0 | Aug 7, 2025 |
| 0.3.1 | Aug 5, 2025 |
| 0.2.1 | Aug 3, 2025 |
#874 in Command line utilities
162 downloads per month
4MB
1.5K
SLoC
tsman
A lightweight session manager for tmux
Features • Installation • Usage • Configuration
Navigation
Edit
Delete/Save
✨Features
- Quickly save/restore/delete tmux sessions.
- Manually tweak session config files for better control.
- Manage sessions from the interactive TUI menu:
- Use the keybindings to trigger actions (Save/Open/Edit/Delete).
- Fuzzily find sessions (powered by fuzzy-matcher).
- View the sessions structure in the preview panel.
⚡Requirements
- tmux >= v3.2 (recommended for the display-popup feature).
📦Installation
cargo install tsman
🚀Usage
Save current session
tsman save <session_name> # uses the specified name
tsman save # uses the current name of the session
Open a session
tsman open <session_name>
Edit a session config file
The file is opened for editing in $EDITOR.
tsman edit <session_name> # edit the config file of the specified session
tsman edit # edit the config file of the current session
Delete a session config file
tsman delete <session_name>
Open a menu that contains all saved sessions
tsman menu
tsman menu --preview # open the menu with the preview pane on
tsman menu --ask-for-confirmation # Open a confirmation popup when deleting
⌨️Menu keybindings:
Navigation:
| command | action |
|---|---|
Esc / C-c |
Exit menu |
Up arrow / C-p |
Select previous item |
Down arrow / C-n |
Select next item |
Session actions:
| command | saved session action | unsaved session action |
|---|---|---|
C-e |
Edit config file of selected session | - |
C-d |
Delete config file of selected session | Kill session |
C-s |
- | Save session |
C-k |
Kill session | Kill session |
C-r |
Rename session and update config file | Rename session |
Enter |
Open session | Open session |
UI Controls:
| command | action |
|---|---|
C-t |
Toggle the visibility of the preview pane |
C-h |
Toggle the visibility of the help popup |
C-w |
Delete last word from input |
Confirmation Popup:
| command | action |
|---|---|
y / Y / Enter |
Confirm |
n / N / Esc / q |
Abort |
Help Popup:
| command | action |
|---|---|
C-h / C-c / Esc / q / Enter |
Close |
🔧Configuration
You can add keybindings/aliases to your tmux/shell config file for faster usage.
Example config:
~/.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"
If you want to set up a custom location to store session config files set the
TSMAN_CONFIG_STORAGE_DIR env variable. You can add the following line to
your shell config file to make it persistent:
export TSMAN_CONFIG_STORAGE_DIR="$HOME/mux-sessions"
🗒️Notes
$EDITORmust be set to use the edit command.- the session config files are saved by defult in
~/.config/.tsessions/.
🤝Contributing
- Please see CONTRIBUTING.md
🙏Acknowledgements
Dependencies
~12–27MB
~386K SLoC