API Reference¶
libtmux’s public API mirrors tmux’s object hierarchy:
Server → Session → Window → Pane
What do you want to do?¶
Use server.sessions.get(), session.windows.get().
Use pane.send_keys() and pane.enter().
Use pane.capture_pane().
Use the pytest plugin and test helpers.
Core Objects¶
Entry point. Manages sessions and executes raw tmux commands.
Manages windows within a tmux session.
Manages panes, layouts, and window operations.
Terminal instance. Send keys and capture output.
Supporting Modules¶
Base classes and command execution.
Dataclass-based query interface.
tmux option get/set.
tmux hook management.
Format strings and constants.
Exception hierarchy.
Testing¶
pytest plugin, fixtures, and test helpers for testing code that uses libtmux.
API Policy and Guarantees¶
These documents define the project’s promises about the public API.
What is and is not considered stable public API.
Supported versions of Python and tmux.
Active deprecations and migration guidance.