TypeScript
TypeScript
Drive a real tmux from TypeScript.
@libtmux/libtmux
Install
$ bun add @libtmux/libtmuxQuickstart
import { Server } from "libtmux";
const server = new Server();
const session = await server.newSession({ name: "quickstart" });const editor = await session.newWindow({ name: "editor" });await editor.split();
const snapshot = await server.snapshot();const found = snapshot.windows.where({ name: "editor" }).one();
const paneCount = found.panes.length;The README's opening `new Server()` line, followed by examples/quickstart/quickstart.ts — run against real tmux by the integration suite and quoted into the README verbatim under a checked <!-- runs: --> marker.
API References
Read on
Topics
Deep dives into one subject at a time, in TypeScript: architecture, traversal, options and hooks.
Guides
Task-oriented walkthroughs in TypeScript — install tmux, then the round trip every real program starts from.
Examples
The same concrete tasks worked through in TypeScript, with each snippet checked by the port's own tests.
Concepts
The domain model every port shares — the object hierarchy, transports and filtering.