Concepts
Server, session, window, pane
Understand the tmux object hierarchy and attached clients.
Control mode vs one-shot
Choose subprocess commands, persistent connections, and batching.
Filtering and queries
Find objects and handle absent or ambiguous matches.
Workspaces
Build pane layouts from code or configuration files.
libtmux lets you create sessions, arrange windows and panes, send commands, and read output from tmux. Start with the object hierarchy, then read about the transport, query, or workspace behavior your program needs.
Use the API reference for signatures, defaults, and failure conditions.