libtmux Reference MCP Search

TypeScript

TypeScript

Drive a real tmux from TypeScript.

@libtmux/libtmux

Install

$ bun add @libtmux/libtmux

Quickstart

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

Esc

Type to search.