Core LibraryunreleasedGuides

Choose documentation 2

latest

Current version

latest
English

Unreleased LibTmux has not been released. Its API may change during development. This site's structure and URLs may change too.

Getting started

Control tmux with explicit commands, captured graphs, and ordinary Perl arrays. Targets stable Perl 5.44.0 and Linux x86_64, including WSL. These development distributions are not published on CPAN.

use v5.44;
use LibTmux::Server;
my $server = LibTmux::Server->new(socket_name => 'example');
my $snapshot = $server->snapshot; # Explicit I/O; server must already exist.
my $active = $snapshot->panes
->where({ active => true, width => { -gte => 80 } })
->grep(sub ($pane) { $pane->current_command eq 'sleep' });
for my $pane ($active->@*) {
say $pane->id, ' ', $pane->window->name;
}
DistributionLocationRuntime dependencies
LibTmuxpackages/corePerl standard library.
LibTmux-Asyncpackages/asyncVersioned core, Future, IO::Async::Loop::Ppoll and IO::Ppoll; caller-owned Ppoll loop.
LibTmux-Workspacepackages/workspaceVersioned core; packaged JSON loader CLI.

Start with installation, basic orchestration, and filtering. Read graph identity before working with linked windows, query planning for explicit native filters, errors and recovery, async execution, and workspace loading. The architecture decisions explain these contracts, their alternatives, and the upstream source models behind them. Installed API documentation uses native POD; for example perldoc LibTmux::Server and perldoc LibTmux::Selection.

Complete examples run against uniquely owned tmux sockets and assert results and cleanup. Compatibility records support for tmux 3.3a–3.8 and CI coverage of the range endpoints. Captured selections perform no tmux I/O; their methods preserve order and duplicates and return one fixed type in every calling context. Native array access remains available.

MCP is excluded. Persistent control mode, streaming APIs, tmux command lists, serialized regexes, and relation pushdown are deferred. Package publication and shared-site deployment require separate authority.

See contributing for exact checks and tool setup, Perl choices for source-backed decisions, and branding assets for logos and social cards.

Esc

Type to search.

Reference previewOpen reference