tmuxp: Session manager for tmux, which allows users to save and load tmux sessions through simple configuration files. · Pythie
tmuxp
Session manager for tmux. Save and load your tmux sessions through
declarative workspace files. Powered by
libtmux .
New to tmux? The Tao of tmux
is available on Leanpub and Amazon Kindle .
Read and browse the book for free on the
web .
Have some spare time? Help us triage and code-review on the tracker. See
issue #290 !
Installation
pip:
$ pip install --user tmuxp
If you're managing the project with uv , add
tmuxp as a dependency instead:
$ uv add tmuxp
To run tmuxp without installing it globally, similar to pipx, invoke it
with uvx :
$ uvx tmuxp
Homebrew:
$ brew install tmuxp
Debian / ubuntu:
$ sudo apt install tmuxp
Nix:
$ [[ -z $(which tmux) ]] && (nix-env -i tmux && nix-env -i tmuxp) || nix-env -i tmuxp
pip :
$ pip install --user --upgrade --pre tmuxp
Or allow a pre-release from a uv project environment:
$ uv add tmuxp --prerelease allow
uvx :
$ uvx --from 'tmuxp' --prerelease allow tmuxp
pipx :
$ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force
Then use tmuxp@next load [session].
Load a tmux session session_name: 4-pane-split
windows:
- window_name: dev window
layout: tiled
shell_command_before:
- cd ~/ # run as a first command in all panes
panes:
- shell_command: # pane no. 1
- cd /var/log # run multiple commands in this pane
- ls -al | grep \.log
- echo second pane # pane no. 2
- echo third pane # pane no. 3
- echo fourth pane # pane no. 4
Save as mysession.yaml , and load:
$ tmuxp load ./mysession.yaml
Projects with .tmuxp.yaml or .tmuxp.json load via directory:
$ tmuxp load path/to/my/project/
Load multiple at once (in bg, offer to attach last):
$ tmuxp load mysession ./another/project/
$ tmuxp load -s session_name ./mysession.yaml
User-level configurations tmuxp checks for configs in user directories:
$TMUXP_CONFIGDIR, if set
$XDG_CONFIG_HOME, usually $HOME/.config/tmuxp/
$HOME/.tmuxp/
Load your tmuxp config from anywhere by using the filename, assuming
~/.config/tmuxp/mysession.yaml (or .json ):
Shell tmuxp shell launches into a python console preloaded with the attached
server, session, and window in
libtmux objects:
(Pdb) server
<libtmux.server.Server object at 0x7f7dc8e69d10>
(Pdb) server.sessions
[Session($1 your_project)]
(Pdb) session
Session($1 your_project)
(Pdb) session.name
'your_project'
(Pdb) window
Window(@3 1:your_window, Session($1 your_project))
(Pdb) window.name
'your_window'
(Pdb) window.panes
[Pane(%6 Window(@3 1:your_window, Session($1 your_project)))
(Pdb) pane
Pane(%6 Window(@3 1:your_window, Session($1 your_project))
Supports PEP 553 breakpoint()
(including PYTHONBREAKPOINT). Also supports direct commands via -c:
$ tmuxp shell -c 'print(window.name)'
my_window
$ tmuxp shell -c 'print(window.name.upper())'
MY_WINDOW
Pre-load hook Run custom startup scripts (such as installing project dependencies) before
loading tmux. See the
before_script
example
Load in detached state You can also load sessions in the background by passing -d flag
Screenshot
Freeze a tmux session Snapshot your tmux layout, pane paths, and window/session names.
$ tmuxp freeze session-name
Convert a session file Convert a session file from yaml to json and vice versa.
This will prompt you for confirmation and shows you the new file that is
going to be written.
You can auto confirm the prompt. In this case no preview will be shown.
$ tmuxp convert -y filename
$ tmuxp convert --yes filename
Plugin System tmuxp has a plugin system to allow for custom behavior. See more about the
Plugin System .
Debugging Helpers The load command provides a way to log output to a log file for debugging
purposes.
$ tmuxp load --log-file <log-file-name> .
Collect system info to submit with a Github issue:
$ tmuxp debug-info
------------------
environment:
system: Linux
arch: x86_64
...
Docs / Reading material
AI policy Use these packages with AI tools as you like. When contributing, check what you
submit and wait for a maintainer's invitation before preparing a pull request.
See the AI policy , also kept as
AI_POLICY.md .
Attribution Please use the following BibTeX template to cite tmuxp in scientific discourse:
@misc{tmuxp,
author = {Tony Narlock},
year = {2013},
note = {https://tmuxp.git-pull.com},
title = {tmuxp: workspace manager for tmux}
}
Donations Your donations fund development of new features, testing and support. Your
money will go directly to maintenance and development of the project. If you
are an individual, feel free to give whatever feels right for the value you
get out of the project.
Project details Popularity
Downloads, last 7 days 19.3K-10%
Stars, last 7 days –
Direct dependents 0
All dependents 0 79
Healthy
Maintenance, out of 100
Recent release
last release 0 days ago
Commit activity
25/26 weeks with commits
Release cadence
34 releases in 12 months
Issues & PRs handled
55% closed in the past year
Contributor spread
1 authors in last 100 commits
Commits, last 26 weeks 321
Releases
Latest 1.83.0
Released Nov 28, 2026
Releases, 12 months 34
First release Oct 8, 2013 Compatibility
Requires Python <4.0,>=3.11
Tested on 3.11 · 3.12 · 3.13 · 3.14
License MIT (Permissive) Works well withUse together with tmuxp: extensions, drivers, servers and companion tools.
libtmux Pythie’s Index: 79Typed library that provides an ORM wrapper for tmux, a terminal multiplexer. 5.2M downloads/mo