Install tmuxLink to section
The common tmux baseline documented here is 3.2a. Individual features can require a newer release; check your port’s compatibility notes. Confirm your installed version:
$ tmux -VIf tmux is missing or older than 3.2a, install a supported version with your
platform’s package manager. libtmux uses an installed tmux executable.
Pick a portLink to section
Choose the port for your project’s language: Python, TypeScript, Rust, Go, Java and Kotlin, .NET, C++, or Swift. Server, session, window, pane explains the shared model, and Control mode vs one-shot covers transport differences.
For a prerelease package, pin an exact version and check its release notes before upgrading. API availability and defaults can differ between ports.
Run the smallest thing that proves it worksLink to section
Start a tmux session to connect to: in one terminal:
$ tmux new-session -s foo -n barIn a second terminal, install your port’s package and run its example. The
Python example uses the foo session above; the other examples create their own
sessions. Installation commands appear in comments at the start of each block.
Attach and send keys provides the full
examples, their source files, and their validation details.
What just happenedLink to section
A server handle targets tmux without taking over your terminal. Creating a session starts the server if needed. Sending keys writes input to a pane; the method’s Enter and literal-text options control how tmux interprets it. Sending keys explains those defaults. Capture methods read the pane’s screen or a requested scrollback range.
Where to go nextLink to section
- Concepts for the mental model behind what you just did: the object hierarchy, how commands actually reach tmux, and how filtering works once you have more than one session to choose from.
- Attaching to tmux, Sending keys, and Capturing output go one level deeper into each half of the round trip you just ran.
- Attach and send keys for the fully checked version of every block above, and how each one is verified.
- Your port’s own API reference (via the port switcher) once you’re ready to look up method details.