# libtmux for Lua > The Lua library (libtmux). These pages include its guides, tested examples and API documentation. ## Concepts - [Concepts](https://libtmux.org/en/lua/v0.1.1/concepts/): Concepts for libtmux. - [Server, session, window, pane](https://libtmux.org/en/lua/v0.1.1/concepts/server-session-window-pane/): How tmux servers, sessions, windows, panes and attached clients relate to each other. ## Examples - [Examples](https://libtmux.org/en/lua/v0.1.1/examples/): Examples for libtmux. - [Capture pane output](https://libtmux.org/en/lua/v0.1.1/examples/capture-pane-output/): Run a complete Lua program that captures output on an isolated tmux server. ## Guides - [Guides](https://libtmux.org/en/lua/v0.1.1/guides/): Guides for libtmux. - [Getting started](https://libtmux.org/en/lua/v0.1.1/guides/overview/): Getting started: libtmux documentation. - [Attaching to tmux](https://libtmux.org/en/lua/v0.1.1/guides/attaching-to-tmux/): Connect to an existing tmux server and find a session with Lua. - [Capture server state](https://libtmux.org/en/lua/v0.1.1/guides/snapshots/): Capture server state: libtmux documentation. - [Compatibility targets](https://libtmux.org/en/lua/v0.1.1/guides/compatibility/): Compatibility targets: libtmux documentation. - [Create sessions, windows and panes](https://libtmux.org/en/lua/v0.1.1/guides/creation/): Create sessions, windows and panes: libtmux documentation. - [Execute tmux commands](https://libtmux.org/en/lua/v0.1.1/guides/commands/): Execute tmux commands: libtmux documentation. - [Observing a session](https://libtmux.org/en/lua/v0.1.1/guides/control/): Observing a session: libtmux documentation. - [Pane operations](https://libtmux.org/en/lua/v0.1.1/guides/panes/): Pane operations: libtmux documentation. - [Query captured data](https://libtmux.org/en/lua/v0.1.1/guides/query/): Query captured data: libtmux documentation. - [Read and paste named buffers](https://libtmux.org/en/lua/v0.1.1/guides/buffers/): Read and paste named buffers: libtmux documentation. - [Switch and detach clients](https://libtmux.org/en/lua/v0.1.1/guides/clients/): Switch and detach clients: libtmux documentation. - [tmux option and hook reference](https://libtmux.org/en/lua/v0.1.1/guides/options/): tmux option and hook reference: libtmux documentation. - [Topology operations](https://libtmux.org/en/lua/v0.1.1/guides/topology/): Topology operations: libtmux documentation. ## Linking and consuming our docs - [Linking and consuming our docs](https://libtmux.org/en/lua/v0.1.1/meta/linking/): Find documentation exports for search engines, bots, LLMs and other documentation sites. - [Link to libtmux from Sphinx](https://libtmux.org/en/lua/v0.1.1/meta/intersphinx/): Use Intersphinx inventories to reference libtmux APIs and documentation. - [Intersphinx examples](https://libtmux.org/en/lua/v0.1.1/meta/intersphinx/examples/): Compare Sphinx and MyST references to APIs, tmux C declarations, hooks, format variables, CLI commands and schema fields. ## Lua API reference - [API glossary](https://libtmux.org/en/lua/v0.1.1/reference/glossary/): Kinds, modifiers and package labels in the Lua API reference. ## Lua MCP - [tmux MCP, built in Lua, is not published](https://libtmux.org/en/lua/v0.1.1/mcp/): The Lua repository contains an MCP scaffold, not a usable or published server. ## Lua Workspace Manager - [tmux workspace manager, forged in Lua, is not published](https://libtmux.org/en/lua/v0.1.1/workspace/): The Lua repository contains a workspace scaffold, not a loader or supported builder API. ## Meta - [AI policy](https://libtmux.org/en/lua/v0.1.1/meta/ai-policy/): Use the libtmux packages with AI tools. When contributing, check what you submit and wait for a maintainer's invitation before preparing a pull request. - [Third-party notices](https://libtmux.org/en/lua/v0.1.1/meta/third-party-notices/): Thanks to tmux's creator and contributors, with licences and attribution for the software behind libtmux.org. ## Runtime adapters - [Runtime ownership](https://libtmux.org/en/lua/v0.1.1/guides/runtime/): Runtime ownership: libtmux documentation. ## Topics - [Topics](https://libtmux.org/en/lua/v0.1.1/topics/): Topics for libtmux. - [Options and hooks](https://libtmux.org/en/lua/v0.1.1/topics/options-and-hooks/): Options and hooks: libtmux documentation. - [Persistent environment](https://libtmux.org/en/lua/v0.1.1/topics/environment/): Persistent environment: libtmux documentation. - [tmux field catalog](https://libtmux.org/en/lua/v0.1.1/topics/format-token-fields/): tmux field catalog: libtmux documentation. ## Reference - [Lua API reference](https://libtmux.org/en/lua/v0.1.1/reference/): every public symbol, generated from the source. Hosted on libtmux.org. ## Optional - [Full documentation text](https://libtmux.org/en/lua/v0.1.1/llms-full.txt): guides and MCP contracts in a single fetch.