# libtmux for Ruby > The Ruby port of libtmux (libtmux). Every code sample below is Ruby; the same pages exist for the other nine ports under their own prefix. ## Async - [libtmux-async](https://libtmux.org/en/ruby/latest/guides/async/): Source-owned Ruby guide at c6d9d2177182. ## Concepts - [Concepts](https://libtmux.org/en/ruby/latest/concepts/): tmux objects, command transports, queries, and workspaces across the libtmux language ports. - [Server, session, window, pane](https://libtmux.org/en/ruby/latest/concepts/server-session-window-pane/): The object hierarchy every libtmux port mirrors from tmux itself, and the client that sits outside it. - [Control mode vs one-shot](https://libtmux.org/en/ruby/latest/concepts/transports/): How a call in your program actually reaches the tmux server, and why a port might give you a choice. - [Filtering and queries](https://libtmux.org/en/ruby/latest/concepts/queries/): How you get from every session on the server to the one pane you mean, and what happens when zero or several match. - [Workspaces](https://libtmux.org/en/ruby/latest/concepts/workspaces/): Build pane layouts with the object API or a workspace configuration file. ## Core library - [libtmux](https://libtmux.org/en/ruby/latest/guides/core/): Source-owned Ruby guide at c6d9d2177182. ## Examples - [Examples](https://libtmux.org/en/ruby/latest/examples/): Programs for sending input, capturing output, and building workspaces in each language. - [Attach and send keys](https://libtmux.org/en/ruby/latest/examples/attach-and-send-keys/): Get a session handle, send a command to a pane, and capture output. - [Capture pane output](https://libtmux.org/en/ruby/latest/examples/capture-pane-output/): Capture a pane's screen and wait for expected output or a completion signal. - [Build a workspace from a file](https://libtmux.org/en/ruby/latest/examples/workspace-from-file/): The tmuxp-shaped job of describing a multi-window session as data and building it in one call, in each port that has a checked way to do it. ## Guides - [Guides](https://libtmux.org/en/ruby/latest/guides/): Task-oriented walkthroughs that sit between the concepts and each port's own API reference. - [Getting started](https://libtmux.org/en/ruby/latest/guides/getting-started/): Install tmux, pick a port, and run the smallest thing that proves your setup works. - [Attaching to tmux](https://libtmux.org/en/ruby/latest/guides/attaching-to-tmux/): What a plain constructor call actually connects to, and how to find a session that might already exist instead of always creating a new one. - [Sending keys](https://libtmux.org/en/ruby/latest/guides/sending-keys/): Literal text versus tmux key names, whether Enter is pressed for you, and why a command can outrun the shell about to run it. - [Capturing output](https://libtmux.org/en/ruby/latest/guides/capturing-output/): Read a pane's screen or scrollback and wait for output or a completion signal. - [Filtering and querying, in practice](https://libtmux.org/en/ruby/latest/guides/querying-and-filtering/): Filter tmux objects, require one match, and choose where a query runs. - [Testing with libtmux](https://libtmux.org/en/ruby/latest/guides/testing-with-libtmux/): Every port ships a way to give your own tests a real, disposable tmux server. What each one hands you, and what it guarantees about cleanup. - [Executable recipes](https://libtmux.org/en/ruby/latest/examples/recipes/): Source-owned Ruby guide at c6d9d2177182. - [Execution modes](https://libtmux.org/en/ruby/latest/guides/execution-modes/): Source-owned Ruby guide at c6d9d2177182. - [libtmux for Ruby](https://libtmux.org/en/ruby/latest/guides/overview/): Source-owned Ruby guide at c6d9d2177182. - [Ownership and errors](https://libtmux.org/en/ruby/latest/guides/ownership-errors/): Source-owned Ruby guide at c6d9d2177182. ## MCP - [libtmux-mcp](https://libtmux.org/en/ruby/latest/mcp/source-guide/): Source-owned Ruby guide at c6d9d2177182. ## Overview - [Third-party notices](https://libtmux.org/en/ruby/latest/third-party-notices/): Licences and attribution for the tools that build libtmux.org and the software libtmux depends on. ## Ruby MCP - [MCP for Ruby](https://libtmux.org/en/ruby/latest/mcp/): Run the libtmux-mcp server with an explicit tmux endpoint and tool policy. - [Ruby MCP topics](https://libtmux.org/en/ruby/latest/mcp/topics/): Understand tool policy, retained observations, resources, and authored runs. - [Ruby MCP guides](https://libtmux.org/en/ruby/latest/mcp/guides/): Select a tmux socket, launch libtmux-mcp, and enable only the required tools. - [Ruby MCP examples](https://libtmux.org/en/ruby/latest/mcp/examples/): Configure a client for the default Ruby MCP catalog or opt-in observation tools. - [Ruby MCP API reference](https://libtmux.org/en/ruby/latest/mcp/reference/): Public libtmux-mcp embedding types and methods. ## Ruby Workspace Manager - [Workspace Manager for Ruby](https://libtmux.org/en/ruby/latest/workspace/): Validate, plan, and load bounded YAML or JSON workspaces with libtmux-workspace. - [Ruby workspace guides](https://libtmux.org/en/ruby/latest/workspace/guides/): Validate, inspect, and explicitly apply a Ruby workspace plan. - [Ruby workspace topics](https://libtmux.org/en/ruby/latest/workspace/topics/): Workspace format, planning boundaries, application effects, and failure ledgers. - [Ruby workspace examples](https://libtmux.org/en/ruby/latest/workspace/examples/): A bounded creation-only workspace for libtmux-workspace. - [Ruby workspace API reference](https://libtmux.org/en/ruby/latest/workspace/reference/): Public libtmux-workspace parsing, planning, application, and CLI types. ## Topics - [Topics](https://libtmux.org/en/ruby/latest/topics/): Object traversal, cleanup, pane I/O, configuration, and failure handling. - [Architecture](https://libtmux.org/en/ruby/latest/topics/architecture/): The object hierarchy underneath the API you call, and who actually holds the behavior in each port. - [Traversal](https://libtmux.org/en/ruby/latest/topics/traversal/): Moving up and down the server/session/window/pane tree, and the two questions that come up once you have more than one object. - [Context managers](https://libtmux.org/en/ruby/latest/topics/context-managers/): Scope-based cleanup for tmux objects, and when your program must kill them explicitly. - [Pane interaction](https://libtmux.org/en/ruby/latest/topics/pane-interaction/): Input defaults, screen capture, and waiting for a command to finish. - [Options and hooks](https://libtmux.org/en/ruby/latest/topics/options-and-hooks/): Reading and writing tmux's own configuration knobs, and binding commands to its events, at whichever scope you're holding. - [Format-token fields](https://libtmux.org/en/ruby/latest/topics/format-tokens/): The typed fields every object exposes, mirroring tmux's own format tokens, and why a field is sometimes absent. - [Waiting and retrying](https://libtmux.org/en/ruby/latest/topics/waiting-and-retry/): Polling a condition instead of guessing a sleep, and tmux's own wait-for signal channel as the alternative to polling. - [Environment](https://libtmux.org/en/ruby/latest/topics/environment/): Locate tmux objects from process variables and manage the environment inherited by new panes. - [Socket and servers](https://libtmux.org/en/ruby/latest/topics/socket-and-servers/): How a port names one specific tmux server among several, checks whether it's actually there, and tells one running instance apart from another. - [Errors and exceptions](https://libtmux.org/en/ruby/latest/topics/errors-and-exceptions/): What a failed tmux command becomes in each port, and the question every one of them has to answer before letting you retry it. ## Workspace Manager - [libtmux-workspace](https://libtmux.org/en/ruby/latest/workspace/source-guide/): Source-owned Ruby guide at c6d9d2177182. ## Reference - [Ruby API reference](https://libtmux.org/en/ruby/latest/reference/): every public symbol, generated from the source. Hosted on libtmux.org. ## Optional - [Full text of every page above](https://libtmux.org/en/ruby/latest/llms-full.txt): the same prose concatenated, for a single fetch.