Skip to main content

tmux session manager

Project description

tmuxp, tmux session manager. built on `libtmux`_.

|pypi| |docs| |build-status| |coverage| |license|

**We need help!** tmuxp is a trusted session manager for tmux. If you
could lend your time to helping answer issues and QA pull requests, please
do! See `issue #290 <https://github.com/tmux-python/tmuxp/issues/290>`__!

**New to tmux?** `The Tao of tmux <https://leanpub.com/the-tao-of-tmux>`_ is
available on Leanpub and `Amazon Kindle`_. Read and browse the book for free
`on the web`_.

Installation
------------

.. code-block:: shell

$ pip install --user tmuxp

Load a tmux session
-------------------

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

.. code-block:: yaml

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 forth pane # pane no. 4

Save as *mysession.yaml*, and load:

.. code-block:: sh

$ tmuxp load ./mysession.yaml

Projects with *.tmuxp.yaml* or *.tmuxp.json* load via directory:

.. code-block:: sh

$ tmuxp load path/to/my/project/

Load multiple at once (in bg, offer to attach last):

.. code-block:: sh

$ tmuxp load mysession ./another/project/

Name a session:

.. code-block:: bash

$ tmxup 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*):

.. code-block:: sh

$ tmuxp load mysession

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

Pre-load hook
-------------
Run custom startup scripts (such as installing project dependencies before
loading tmux. See the `bootstrap_env.py`_ and `before_script`_ example

Load in detached state
----------------------
You can also load sessions in the background by passing ``-d`` flag

Screenshot
----------

.. image:: https://raw.github.com/tmux-python/tmuxp/master/doc/_static/tmuxp-demo.gif
:scale: 100%
:width: 45%
:align: center


Freeze a tmux session
---------------------

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

.. code-block:: sh

$ 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.

.. code-block:: sh

$ 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.

.. code-block:: sh

$ tmuxp convert -y filename
$ tmuxp convert --yes filename


Docs / Reading material
-----------------------

See the `Quickstart`_.

`Documentation`_ homepage (also in `中文`_)

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

.. _Documentation: http://tmuxp.git-pull.com
.. _Source: https://github.com/tmux-python/tmuxp
.. _中文: http://tmuxp-zh.rtfd.org/
.. _before_script: http://tmuxp.git-pull.com/examples.html#bootstrap-project-before-launch
.. _virtualenv: https://virtualenv.git-pull.com/
.. _Read The Tao of tmux online: http://tmuxp.git-pull.com/about_tmux.html
.. _author's tmuxp configs: https://github.com/tony/tmuxp-config
.. _python library: https://tmuxp.git-pull.com/api.html
.. _python API quickstart: https://tmuxp.git-pull.com/quickstart_python.html
.. _tmux(1): http://tmux.sourceforge.net/
.. _tmuxinator: https://github.com/aziz/tmuxinator
.. _teamocil: https://github.com/remiprev/teamocil
.. _Examples: http://tmuxp.git-pull.com/examples.html
.. _freezing tmux: http://tmuxp.git-pull.com/cli.html#freeze-sessions
.. _bootstrap_env.py: https://github.com/tmux-python/tmuxp/blob/master/bootstrap_env.py
.. _testing: http://tmuxp.git-pull.com/developing.html#test-runner
.. _python objects: http://tmuxp.git-pull.com/api.html#api
.. _tmuxp.yaml: https://github.com/tmux-python/tmuxp/blob/master/.tmuxp.yaml
.. _simple: http://tmuxp.git-pull.com/examples.html#short-hand-inline
.. _very elaborate: http://tmuxp.git-pull.com/examples.html#super-advanced-dev-environment
.. _Quickstart: http://tmuxp.git-pull.com/quickstart.html
.. _Commands: http://tmuxp.git-pull.com/cli.html
.. _libtmux: https://github.com/tmux-python/libtmux
.. _on the web: https://leanpub.com/the-tao-of-tmux/read

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://git-pull.com/support.html.

Project details
---------------
- tmux support: 1.8, 1.9a, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6
- python support: 2.7, >= 3.3, pypy, pypy3
- Source: https://github.com/tmux-python/tmuxp
- Docs: https://tmuxp.git-pull.com
- API: https://tmuxp.git-pull.com/api.html
- Changelog: https://tmuxp.git-pull.com/history.html
- Issues: https://github.com/tmux-python/tmuxp/issues
- Test Coverage: https://codecov.io/gh/tmux-python/tmuxp
- pypi: https://pypi-hypernode.com/pypi/tmuxp
- Open Hub: https://www.openhub.net/p/tmuxp-python
- License: `MIT`_.

.. _MIT: http://opensource.org/licenses/MIT
.. _developing and testing: http://tmuxp.git-pull.com/developing.html
.. _Amazon Kindle: http://amzn.to/2gPfRhC

.. |pypi| image:: https://img.shields.io/pypi/v/tmuxp.svg
:alt: Python Package
:target: http://badge.fury.io/py/tmuxp

.. |docs| image:: https://github.com/tmux-python/tmuxp/workflows/Publish%20Docs/badge.svg
:alt: Docs
:target: https://github.com/tmux-python/tmuxp/actions?query=workflow%3A"Publish+Docs"

.. |build-status| image:: https://github.com/tmux-python/tmuxp/workflows/tests/badge.svg
:alt: Build status
:target: https://github.com/tmux-python/tmuxp/actions?query=workflow%3A"tests"

.. |coverage| image:: https://codecov.io/gh/tmux-python/tmuxp/branch/master/graph/badge.svg
:alt: Code Coverage
:target: https://codecov.io/gh/tmux-python/tmuxp

.. |license| image:: https://img.shields.io/github/license/tmux-python/tmuxp.svg
:alt: License


Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tmuxp-1.5.7.post0.tar.gz (73.4 kB view details)

Uploaded Source

Built Distribution

tmuxp-1.5.7.post0-py3-none-any.whl (25.5 kB view details)

Uploaded Python 3

File details

Details for the file tmuxp-1.5.7.post0.tar.gz.

File metadata

  • Download URL: tmuxp-1.5.7.post0.tar.gz
  • Upload date:
  • Size: 73.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.8

File hashes

Hashes for tmuxp-1.5.7.post0.tar.gz
Algorithm Hash digest
SHA256 f0f12245c6f01fb3d24caae90bb8cadedc1486727ccec482c9d6e5ef559f2c1c
MD5 79efa0b5c817dfe8634463c4566f89f9
BLAKE2b-256 0eb80a78666e52fe9d1615d922b8a3385355f8e92c3c064461bd093a39a60869

See more details on using hashes here.

Provenance

File details

Details for the file tmuxp-1.5.7.post0-py3-none-any.whl.

File metadata

  • Download URL: tmuxp-1.5.7.post0-py3-none-any.whl
  • Upload date:
  • Size: 25.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.8

File hashes

Hashes for tmuxp-1.5.7.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 d362b47b9717a8a6b3e1e7d3913def90c512c7b26162ea972cdc60d391e06f48
MD5 9a8b78bad233c0f1106d77721ab6c7a3
BLAKE2b-256 93f529b2cc91abaf000604af49bf2dd6ae2ef7936e9c1cc3daf86c42bd8c6162

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page