# libtmux for Ruby > The Ruby library (libtmux). These pages include its guides, tested examples and API documentation. ## CLI reference - [libtmux-workspace CLI manual](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/cli/): Commands, options and exit statuses for the Ruby workspace CLI. - [validate](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/cli/validate/): Check a Ruby workspace configuration without contacting tmux. - [plan](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/cli/plan/): Inspect the ordered operations needed to create a Ruby workspace. - [load](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/cli/load/): Create a Ruby workspace on an explicitly selected existing tmux server. ## Companion packages - [Async](https://libtmux.org/en/ruby/v0.1.0.alpha.2/guides/async/): Run concurrent commands within an owned Async scope. ## Concepts - [Concepts](https://libtmux.org/en/ruby/v0.1.0.alpha.2/concepts/): Concepts for libtmux. - [Server, session, window, pane](https://libtmux.org/en/ruby/v0.1.0.alpha.2/concepts/server-session-window-pane/): How tmux servers, sessions, windows, panes and attached clients relate to each other. - [Execution modes](https://libtmux.org/en/ruby/v0.1.0.alpha.2/concepts/transports/): Choose blocking commands, captured queries, control mode, or Async tasks. ## Examples - [Examples](https://libtmux.org/en/ruby/v0.1.0.alpha.2/examples/): Examples for libtmux. - [Capture pane output](https://libtmux.org/en/ruby/v0.1.0.alpha.2/examples/capture-pane-output/): Run a complete Ruby program that captures output on an isolated tmux server. - [Recipes](https://libtmux.org/en/ruby/v0.1.0.alpha.2/examples/recipes/): Run programs for queries, linked windows, capture, and cancellation. - [Ruby MCP examples](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/examples/): Run complete Ruby programs for an MCP client or an embedded application. - [Page session metadata from Ruby](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/examples/page-session-metadata/): Embed the Ruby MCP application, read a retained session listing, and close its owned resources. ## Guides - [Guides](https://libtmux.org/en/ruby/v0.1.0.alpha.2/guides/): Guides for libtmux. - [Ruby MCP guides](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/guides/): Connect an MCP client to a private tmux server and select its tools. - [Getting started](https://libtmux.org/en/ruby/v0.1.0.alpha.2/guides/getting-started/): Install the gem, create a session, and query a snapshot. - [Attaching to tmux](https://libtmux.org/en/ruby/v0.1.0.alpha.2/guides/attaching-to-tmux/): Connect to an existing tmux server and find a session with Ruby. - [MCP server guide](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/source-guide/): MCP server guide: libtmux documentation. - [Workspace guide](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/source-guide/): Workspace guide: libtmux documentation. - [Server bindings](https://libtmux.org/en/ruby/v0.1.0.alpha.2/guides/core/): Own a private server or connect to an existing socket. - [Connect a Ruby MCP client](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/guides/connect-client/): Launch a pinned Ruby MCP server on its own private tmux socket, inspect the default tools, and close it with the client. ## Overview - [Third-party notices](https://libtmux.org/en/ruby/v0.1.0.alpha.2/third-party-notices/): Thanks to tmux's creator and contributors, with licences and attribution for the software behind libtmux.org. ## Ruby API reference - [API glossary](https://libtmux.org/en/ruby/v0.1.0.alpha.2/reference/glossary/): Kinds, modifiers and package labels in the Ruby API reference. ## Ruby MCP - [tmux MCP for Ruby](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/): Run the libtmux-mcp server with an explicit tmux endpoint and tool policy. - [Ruby MCP API reference](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/reference/): Public libtmux-mcp embedding types and methods. ## Ruby MCP API reference - [MCP API glossary](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/reference/glossary/): What MCP tool annotations tell clients about a tool. ## Ruby Workspace Manager - [tmux workspace manager for Ruby](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/): Validate, plan, and load bounded YAML or JSON workspaces with libtmux-workspace. - [Ruby workspace guides](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/guides/): Validate, inspect, and explicitly apply a Ruby workspace plan. - [Ruby workspace topics](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/topics/): Workspace format, planning boundaries, application effects, and failure ledgers. - [Ruby workspace examples](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/examples/): A bounded creation-only workspace for libtmux-workspace. - [Ruby workspace API reference](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/reference/): Public libtmux-workspace parsing, planning, application, and CLI types. ## Ruby Workspace Manager API reference - [API glossary](https://libtmux.org/en/ruby/v0.1.0.alpha.2/workspace/reference/glossary/): Kinds, modifiers and package labels in the Ruby API reference. ## Topics - [Topics](https://libtmux.org/en/ruby/v0.1.0.alpha.2/topics/): Topics for libtmux. - [Ownership and errors](https://libtmux.org/en/ruby/v0.1.0.alpha.2/topics/errors-and-exceptions/): Understand server ownership, immutable references, and operation failures. - [Ruby MCP topics](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/topics/): Understand tool policy, retained observations, resources, and authored runs. - [Snapshots, cursors, and references](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/topics/snapshots-and-references/): Query Ruby MCP metadata, page a retained result, and use references within the server binding that created them. ## Reference - [Ruby API reference](https://libtmux.org/en/ruby/v0.1.0.alpha.2/reference/): every public symbol, generated from the source. Hosted on libtmux.org. ## Optional - [Full documentation text](https://libtmux.org/en/ruby/v0.1.0.alpha.2/llms-full.txt): guides and MCP contracts in a single fetch. ## Ruby MCP tools - [Tools](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/) - [tmux_capabilities](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/tmux_capabilities/) - [tmux_capture](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/tmux_capture/) - [tmux_close](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/tmux_close/) - [tmux_create](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/tmux_create/) - [tmux_run](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/tmux_run/) - [tmux_send](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/tmux_send/) - [tmux_snapshot](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/tmux_snapshot/) - [tmux_wait](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/tools/tmux_wait/) ## Ruby MCP prompts - [Prompts](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/prompts/) ## Ruby MCP resources - [Resources](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/resources/) - [tmux_metadata](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/resources/templates/tmux_metadata/) - [tmux_metadata_page](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/resources/templates/tmux_metadata_page/) - [tmux_screen](https://libtmux.org/en/ruby/v0.1.0.alpha.2/mcp/resources/templates/tmux_screen/)