API Reference

libtmux’s public API mirrors tmux’s object hierarchy:

Server -> Session -> Window -> Pane

Core Objects

Server

Entry point. Manages sessions and executes raw tmux commands.

Servers
Session

Manages windows within a tmux session.

Sessions
Window

Manages panes, layouts, and window operations.

Windows
Pane

Terminal instance. Send keys and capture output.

Panes

Supporting Modules

Common

Base classes and command execution.

Utilities
Neo

Dataclass-based query interface.

Properties
Options

tmux option get/set.

Options
Hooks

tmux hook management.

Hooks
Constants

Format strings and constants.

Constants
Exceptions

Exception hierarchy.

Exceptions

Test Utilities

If you’re testing code that uses libtmux, see the test helpers and pytest plugin:

API Contract