{"repo":"tmux-python/libtmux","free":true,"listed":false,"github":"https://github.com/tmux-python/libtmux","clone":"git clone https://github.com/tmux-python/libtmux.git","description":"⚙️ Python API / wrapper for tmux","language":"Python","stars":1204,"topics":["tmux","api","python","python-3","library","cli","terminal"],"license":"MIT","category":"cli-tools","readme_excerpt":"⚙️ libtmux Drive tmux from Python: typed, object-oriented control over servers, sessions, windows, and panes. 🐍 What is libtmux? libtmux is a typed Python API over [tmux], the terminal multiplexer. Stop shelling out and parsing tmux ls . Instead, interact with real Python objects: Server , Session , Window , and Pane . The same API powers [tmuxp], so it stays battle-tested in real-world workflows. ✨ Features - Typed, object-oriented control of tmux state - Query and traverse live sessions, windows, and panes - Locate yourself from inside a pane with from env() - Raw escape hatch via .cmd(...) on any object - Works with multiple tmux sockets and servers - Context managers for automatic cleanup - pytest plugin for isolated tmux fixtures - Proven in production via tmuxp and other tooling Requirements & support - tmux: = 3.2a - Python: = 3.10 (CPython and PyPy) Maintenance-only backports (no new fixes): - Python 2.x: v0.8.x - tmux 1.8-3.1c: v0.48.x 📦 Installation Stable release: With pipx: With uv / uvx: From the main branch (bleeding edge): Tip: libtmux is pre-1.0. Pin a range in projects to avoid surprises: requirements.txt: pyproject.toml: 🚀 Quickstart Open a tmux session First, start a tmux session to connect to: Pilot your tmux session via Python Use [ptpython], [ipython], etc. for a nice REPL with autocompletions: Connect to a live tmux session: Tip: You can also use [tmuxp]'s [ tmuxp shell ] to drop straight into your current tmux server / session / window / pane. [ptpy","default_branch":null,"files":null,"tree":[],"storefront":"/r/tmux-python","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tmux-python/libtmux/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}