Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


A terminal multiplexer (like tmux) in Python

Subscribe to updates I use pymux

Statistics on pymux

Number of watchers on Github 1135
Number of open issues 32
Average time to close an issue 19 days
Main language Python
Average time to merge a PR 6 days
Open pull requests 1+
Closed pull requests 13+
Last commit over 2 years ago
Repo Created about 6 years ago
Repo Last Updated almost 2 years ago
Size 748 KB
Organization / Authorjonathanslenders
Page Updated
Do you use pymux? Leave a review!
View open issues (32)
View pymux activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating pymux for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


A terminal multiplexer (like tmux) in Python


pip install pymux

.. image ::

Issues, questions, wishes, comments, feedback, remarks? Please create a GitHub issue, I appreciate it.


Simply install pymux using pip:


pip install pymux

Start it by typing pymux.

What does it do?

A terminal multiplexer makes it possible to run multiple applications in the same terminal. It does this by emulating a vt100 terminal for each application. There are serveral programs doing this. The most famous are GNU Screen <>_ and tmux <>_.

Pymux is written entirely in Python. It doesn't need any C extension. It runs on all Python versions from 2.6 until 3.5. It should work on OS X and Linux.

Compared to tmux

To some extent, pymux is a clone of tmux. This means that all the default shortcuts are the same; the commands are the same or very similar, and even a simple configuration file could be the same. (There are some small incompatibilities.) However, we definitely don't intend to create a fully compatible clone. Right now, only a subset of the command options that tmux provides are supported.

Pymux implements a few improvements over tmux:

  • There is a completion menu for the command line. (At the bottom of the screen.)
  • The command line has fish-style <>_ suggestions.
  • Both Emacs and Vi key bindings for the command line and copy buffer are well developed, thanks to all the effort we have put earlier in prompt_toolkit <>_.
  • Search in the copy buffer is highlighted while searching.
  • Every pane has its own titlebar.
  • When several clients are attached to the same session, each client can watch a different window. When clients are watching different windows, every client uses the full terminal size.
  • Support for 24bit true color. (Disabled by default: not all terminals support it. Use the --truecolor option at startup or during attach in order to enable it.)
  • Support for unicode input and output. Pymux correctly understands utf-8 encoded double width characters. (Also for the titlebars.)

About the performance:

  • Tmux is written in C, which is obviously faster than Python. This is noticeable when applications generate a lot of output. Where tmux is able to give fast real-time output for, for instance find / or yes, pymux will process the output slightly slower, and in this case render the output only a few times per second to the terminal. Usually, this should not be an issue. If it is, Pypy <>_ should provide a significant speedup.

The big advantage of using Python and prompt_toolkit <>_ is that the implementation of new features becomes very easy.

More screenshots

24 bit color support and the autocompletion menu:

.. image ::

What happens if another client with a smaller screen size attaches:

.. image ::

When a pane enters copy mode, search results are highlighted:

.. image ::

Why create a tmux clone?

For several reasons. Having a terminal multiplexer in Python makes it easy to experiment and implement new features. While C is a good language, it's not as easy to develop as Python.

Just like pyvim <>_ (A Vi clone in Python.), it started as another experiment. A project to challenge the design of prompt_toolkit. At this point, however, pymux should be stable and usable for daily work.

The development resulted in many improvements in prompt_toolkit, especially performance improvements, but also some functionality improvements.

Further, the development is especially interesting, because it touches so many different areas that are unknown to most Python developers. It also proves that Python is a good tool to create terminal applications.

The roadmap

There is no official roadmap, the code is mostly written for the fun and of course, time is limited, but I use pymux professionally and I'm eager to implement new ideas.

Some ideas:

  • Support for color schemes.
  • Support for extensions written in Python.
  • Better support for scripting. (Right now, it's already possible to run pymux commands from inside the shell of a pane. E.g. pymux split-window. However, status codes and feedback aren't transferred yet.)
  • Improved mouse support. (Reporting of mouse movement.)
  • Parts of pymux could become a library, so that any prompt_toolkit application can embed a vt100 terminal. (Imagine a terminal emulator embedded in pyvim <>_.)
  • Maybe some cool widgets to traverse the windows and panes.
  • Better autocompletion.


Create a file ~/.pymux.conf, and populate it with commands, like you can enter at the command line. There is an example config <>_ in the examples directory.

What if it crashes?

If for some reason pymux crashes, it will attempt to write a stack trace to a file with a name like /tmp/pymux.crash-*. It is possible that the user interface freezes. Please create a GitHub issue with this stack trace.

Special thanks

  • Pyte <>_, for providing a working vt100 parser. (This one is extended in order to support some xterm extensions.)
  • docopt <>_, for parsing the command line arguments.
  • prompt_toolkit <>_, for the UI toolkit.
  • wcwidth <>_: for better unicode support (support of double width characters).
  • tmux <>_, for the inspiration.
pymux open issues Ask a question     (View All Issues)
  • over 3 years Selecting Panes by Number
  • over 3 years Home / End key doesn't work in vim
  • over 3 years Add support for 'bind-key S-Left' and 'bind-key S-Right'
  • over 3 years Scrolling with mouse doesn't work
  • over 3 years Backport BetterScreen into pyte
  • over 3 years Exiting a terminal crashes
  • over 3 years Selecting text with mouse doesn't work
  • almost 4 years screen translator
  • almost 4 years Traceback upon opening: unexpected keyword argument 'errors'
  • about 4 years UnicodeDecodeError in vim
  • about 4 years have default config file?
  • about 4 years README: In comparison to tmux, Unicode support might be noteworthy
  • about 4 years README: In comparison to tmux, entry on multiple clients/single session is inaccurate
  • about 4 years Session Restore Feature
  • about 4 years Cursor highlighting does not work over SSH in iTerm2
  • about 4 years Sharing sessions between users (feature suggestion)
  • about 4 years zsh: command not found: pymux
  • about 4 years Return key doesn't work in vimwiki
  • about 4 years Pymux, vim and netrw can't load selected files with return.
  • about 4 years feature request -- setw synchronize-panes on
  • about 4 years Paste in original terminal fails after pymux exit
  • about 4 years Tag releases
  • about 4 years Windows ?
  • almost 3 years Freeze after a mouse click
  • about 3 years Bug: AttributeError: 'Key' object has no attribute 'encode'
  • over 3 years Windows support
pymux open pull requests (View All Pulls)
  • Expose Shift+arrow keys for key bindings.
pymux list of languages used
Other projects in Python