tmux.ts - v0.1.3
    Preparing search index...

    Variable TmuxClientConst

    TmuxClient: new (
        config?:
            | {
                configFile?: string;
                executable?: string;
                socketName?: string;
                socketPath?: undefined;
            }
            | {
                configFile?: string;
                executable?: string;
                socketName?: undefined;
                socketPath?: string;
            },
    ) => TmuxPromiseClient = ...

    Promise-based tmux client for Node-compatible runtimes.

    Construct once with optional TmuxClientConfig, then call any command as a method — each returns a Promise that resolves with the command's result or rejects with a tagged error (TmuxServerNotRunning, TmuxTargetNotFound, TmuxCommandError, TmuxParseError, TmuxCommandOptionsError, TmuxClientConfigError, …). The constructor itself never throws; invalid config surfaces as a TmuxClientConfigError rejection on the first command.

    For the Effect-native API (no Promise boundary, typed error channel), use TmuxClient.layer from tmux.ts/effect instead.

    import { TmuxClient } from "tmux.ts";

    const tmux = new TmuxClient();
    const sessions = await tmux.listSessions();
    const pane = await tmux.capturePane({ print: true, targetPane: "0" });