MCPconceptAPI reference

Choose documentation 3

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.

MoreLess about this notice

Concept example A working example of the core library. It can change without notice. What concept means

LibTmuxMCP.main

Methods

main(arguments; input, output, err)[source]

Run libtmux-mcp. It takes at most one of --socket and --socket-name. With neither, the core's Server reads LIBTMUX_SOCKET_PATH, then LIBTMUX_SOCKET, and otherwise leaves the choice to tmux. With --start-session NAME, startup first creates that session, which starts the daemon when none answers; the daemon and the session stay running after the launcher exits, and an existing session of that name is borrowed. Startup captures exact caller/allowed pane references. --help and invalid options perform no tmux I/O, and a variable that cannot be used is an option error. Returns 0 after clean EOF, 2 for option errors, 130 for interruption and 1 for startup, protocol or cleanup failure. Only --help writes human text to stdout; serving reserves it for MCP messages.

main(arguments=ARGS; input=stdin, output=stdout, err=stderr) -> Int

main(; ...)[source]

Run libtmux-mcp. It takes at most one of --socket and --socket-name. With neither, the core's Server reads LIBTMUX_SOCKET_PATH, then LIBTMUX_SOCKET, and otherwise leaves the choice to tmux. With --start-session NAME, startup first creates that session, which starts the daemon when none answers; the daemon and the session stay running after the launcher exits, and an existing session of that name is borrowed. Startup captures exact caller/allowed pane references. --help and invalid options perform no tmux I/O, and a variable that cannot be used is an option error. Returns 0 after clean EOF, 2 for option errors, 130 for interruption and 1 for startup, protocol or cleanup failure. Only --help writes human text to stdout; serving reserves it for MCP messages.

main(arguments=ARGS; input=stdin, output=stdout, err=stderr) -> Int
Esc
Search in

Type to search.

Reference previewOpen reference