Back to rankings

tmux-python/tmuxp

Pythontmuxp.git-pull.com

πŸ–₯️ Session manager for tmux, built on libtmux.

tmuxpythonyamljsonsession-managerclicli-utilitiesterminalteamociltmuxinator
Star Growth
Stars
4.5k
Forks
244
Weekly Growth
β€”
Issues
112
2k4k
Aug 2013Nov 2017Mar 2022Jul 2026
ArtifactsPyPIpip install tmuxp
README

tmuxp

Session manager for tmux. Save and load your tmux sessions through simple configuration files. Powered by libtmux.

Python Package Docs Build status Code Coverage License

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

Find the package for your distro on repology: https://repology.org/project/tmuxp/versions

Developmental releases:

  • pip:

    pip install --user --upgrade --pre tmuxp
    

    Or request the pre-release from a uv project environment:

    uv add 'tmuxp>=1.10.0b1'
    
  • uvx:

    uvx tmuxp
    
  • pipx:

    pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force
    

    Then use tmuxp@next load [session].

Load a tmux session

Load tmux sessions via json and YAML, tmuxinator and teamocil style.

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/

Name a session:

tmuxp load -s session_name ./mysession.yaml

simple and very elaborate config examples

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):

tmuxp load mysession

See author's tmuxp configs and the projects' tmuxp.yaml.

Shell

New in 1.6.0:

tmuxp shell launches into a python console preloaded with the attached server, session, and window in libtmux objects.

tmuxp shell

(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

Read more on tmuxp shell in the CLI docs.

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

image

Freeze a tmux session

Snapshot your tmux layout, pane paths, and window/session names.

tmuxp freeze session-name

See more about freezing tmux sessions.

Convert a session file

Convert a session file from yaml to json and vice versa.

tmuxp convert filename

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

# ... so on

Docs / Reading material

See the Quickstart.

Documentation homepage (also in δΈ­ζ–‡)

Want to learn more about tmux itself? Read The Tao of Tmux online.

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.

See donation options at https://tony.sh/support.html.

Project details

Related repositories
junegunn/fzf

:cherry_blossom: A command-line fuzzy finder

GoGo ModulesMIT Licensefzfgo
junegunn.github.io/fzf/
81.9k2.8k
kingToolbox/WindTerm

A professional cross-platform SSH/Sftp/Shell/Telnet/Tmux/Serial terminal.

Cterminaltelnet
kingtoolbox.github.io
31.7k2.4k
gpakosz/.tmux

Oh my tmux! My self-contained, pretty & versatile tmux configuration made with πŸ’›πŸ©·πŸ’™πŸ–€β€οΈπŸ€

ShellMIT Licensetmuxtmux-conf
25.2k3.6k
manaflow-ai/cmux

Open source Ghostty-based macOS terminal with vertical tabs and notifications for AI coding agents. Built for multitasking, organization, and programmability.

SwiftOtherampclaude-code
cmux.com
24.9k2k
ogulcancelik/herdr

agent multiplexer that lives in your terminal.

Rustcrates.ioOtheragentagent-orchestration
herdr.dev
18.8k1.2k
powerline/powerline

Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.

PythonPyPIOtherpythonstatusline
powerline.readthedocs.org/en/latest/
14.8k999
rothgar/awesome-tmux

A list of awesome resources for tmux

awesomeawesome-list
10.2k428
AgentWrapper/agent-orchestrator

Agent IDE that enables you to manage fleets of coding agents. It comes with an agentic orchestrator that plans tasks, spawns agents, and autonomously handles CI fixes, merge conflicts, and code reviews.

GoGo ModulesApache License 2.0claude-codecodex-cli
aoagents.dev
8.4k1.2k
christoomey/vim-tmux-navigator

Seamless navigation between tmux panes and vim splits

ShellMIT Licensetmuxvim
6.3k365
Aloxaf/fzf-tab

Replace zsh's default completion selection menu with fzf!

ShellMIT Licensezshfzf
4.8k138
pry0cc/axiom

The dynamic infrastructure framework for everybody! Distribute the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more!

ShellMIT Licensehacking-vpsbug-bounty
4.4k718
erikw/tmux-powerline

⚑️ A tmux plugin giving you a hackable status bar consisting of dynamic & beautiful looking powerline segments, written purely in bash.

ShellBSD 3-Clause "New" or "Revised" Licensetmux-powerlinetmux
3.8k530