API reference
Browse the OCaml types and operations for working with tmux. Start with the core objects below, or search for a type or member.
Server 5 functions and constants
An explicit generation-bound connection. Applications retain ownership of the endpoint choice and resource lifetime.
An explicit generation-bound connection. Applications retain ownership of the endpoint choice and resource lifetime.
An explicit socket description. Constructing an endpoint neither reads the environment nor starts a daemon. Source.t adds the observed daemon and connection generation.
Endpoint and observed daemon identity for one connection generation. Constructing metadata alone does not establish a live binding.
A random connection-generation identifier. Reconnecting creates a new generation even when the socket and server PID are unchanged.
Session 1 function or constant
A captured session and its ordered window-link contexts. A session can contain repeated links to the same global window.
Window 2 functions and constants
A global window shared by its session links. Window index and current state belong to a link, while panes and geometry belong to the window.
One captured session/index/window context. It is not a stable link incarnation across unlinking, movement or reindexing.
Pane 1 function or constant
A captured pane with local geometry, process metadata and a window relationship. Use Pane.target for explicit actions; reading the observation never refreshes it.
Client 2 functions and constants
Hooks 1 function or constant
Options 1 function or constant
Version-aware option descriptors and captured scoped values. Sparse array indexes and inherited entries retain their tmux meaning.
Keys and bindings 1 function or constant
Environment 1 function or constant
Terminal capabilities 2 functions and constants
Interactive attachment using borrowed application streams. This utility addresses the current daemon explicitly and does not reuse captured targets.
Interactive attachment using borrowed application streams. This utility addresses the current daemon explicitly and does not reuse captured targets.
Commands 1 type, 5 functions and constants
Native captured values, typed queries and explicit command descriptions.
Typed descriptions of explicit acquisition and mutation operations. Construction performs no I/O; a backend validates and admits the command.
IDs reported by a successful creation reply. Only the requested kind is newly created; the other fields can describe existing containers.
Construct typed tmux operations for a backend client. Observations are immutable, mutations use explicit targets, and no command retries a mutation against another connection generation. Construction performs no I/O; the descriptions below state what execution does.
A process description with explicit argv or shell semantics, working directory and environment. Describing a process performs no I/O.
Control mode 6 functions and constants
Future observed pane bytes, local cursors and explicit continuity loss. Output cursors are unrelated to snapshot times or server-side history.
A retained admitted command. A cancelled waiter does not erase its eventual success, failure or uncertainty.
Bounded future-byte observation with Data/Gap/End and local cursors. Polling is local; waiting and admission belong to the backend.
Retained outcomes remain inspectable after client closure, on the owning domain. Keep the handle from Client.submit before Client.await, then read Operation.inspect. The hook recovery walkthrough shows creation evidence after a later hook failure.
Bounded future-byte observation with Data/Gap/End and local cursors. Polling is local; waiting and admission belong to the backend.
Formats 1 function or constant
Queries 5 functions and constants
Built-in model witnesses and canonical field lookup for typed codecs. Untrusted field names must resolve against the selected model.
Explicit source-filter planning for a new acquisition. A plan separates supported tmux predicates from residual local evaluation; it never changes the I/O-free contract of Query.matching. Backend capture operations acquire a complete graph and do not consume these plans.
Sequence adapters and bounded cardinality checks over captured values. Matching preserves order and duplicates. Expected absence and ambiguity remain ordinary result values.
Typed edges in a captured graph. Many, one and optional relations are distinct; an unacquired relationship is never represented as an empty one.
Queries — Fields 1 function or constant
Queries — Expressions 2 functions and constants
Inspectable predicates whose entity and operand types are checked by the compiler. Combine native closures separately with Seq.filter. Evaluation follows captured relationships without acquisition or hidden caches.
Portable scalar pane expressions. See the wire subset for canonical fields, operators and bounds.
Snapshots 4 functions and constants
A complete immutable graph captured over an acquisition interval. Collections are replayable immutable arrays. Capturing several tmux commands does not establish an atomic transaction.
Blocking native Linux transport. No Eio scheduler is started.
Errors 5 functions and constants
Expected input, capture, capability and transport failures. Cancellation belongs to the chosen backend and is not converted into an ordinary error.
Domain-owned cleanup diagnostics shared with the blocking backend. Supply a report before setup to inspect secondary failures after native cancellation. No scheduler is needed to inspect a report.
Structured native failures for JSON consumers.
Retained failures from releasing processes and descriptors. Reports belong to their creating domain and remain readable after client closure. They preserve secondary failures without replacing a primary exception or cancellation.
Runtime adapters 3 types
Concurrent Linux tmux clients using the application's Eio scheduler.
Pure, bounded query and workspace JSON interchange.
Blocking Linux tmux clients with explicit scoped cancellation.