# libtmux for .NET > The .NET port of libtmux (LibTmux). Every code sample below is C#; the same pages exist for the other nine ports under their own prefix. ## .NET MCP - [MCP for .NET](https://libtmux.org/en/dotnet/latest/mcp/): Run LibTmux.Mcp as a .NET tool with bounded results and a selectable tool catalog. - [.NET MCP topics](https://libtmux.org/en/dotnet/latest/mcp/topics/): Select toolsets, inspect the pinned endpoint, and observe bounded commands. - [Connect a .NET MCP client](https://libtmux.org/en/dotnet/latest/mcp/guides/): Install the .NET tool, configure a socket and toolsets, and diagnose launcher environments. - [.NET MCP examples](https://libtmux.org/en/dotnet/latest/mcp/examples/): List sessions through the .NET MCP server and inspect implementation examples. - [.NET MCP API](https://libtmux.org/en/dotnet/latest/mcp/reference/): Find the .NET server composition API and current MCP protocol catalog. ## .NET Workspace Manager - [Workspace Manager for .NET (in development)](https://libtmux.org/en/dotnet/latest/workspace/): Install the prerelease .NET tmux-workspace CLI from NuGet; implementation coverage remains partial. ## CLI reference - [tmuxp load](https://libtmux.org/en/dotnet/latest/workspace/cli/load/): Load a workspace file, saved workspace name, or project directory. Multiple inputs build in order; without `-d`, the final session is attached or selected through the current-client flow. - [tmuxp freeze](https://libtmux.org/en/dotnet/latest/workspace/cli/freeze/): Capture a live session as a starting workspace file. A capture records observable session state; it cannot recover the original scripts, plugin intent, comments, or every application state. - [tmuxp convert](https://libtmux.org/en/dotnet/latest/workspace/cli/convert/): Convert a workspace document between YAML and JSON while retaining its mapping keys. Conversion does not prove that a native builder supports every retained field. - [tmuxp edit](https://libtmux.org/en/dotnet/latest/workspace/cli/edit/): Resolve a saved workspace or file and open it in the configured editor. The lookup rules are shared with loading. - [tmuxp debug-info](https://libtmux.org/en/dotnet/latest/workspace/cli/debug-info/): Collect tmuxp, Python, tmux, configuration, and environment diagnostics for troubleshooting. - [tmuxp ls](https://libtmux.org/en/dotnet/latest/workspace/cli/ls/): List discovered project and saved workspace files, with optional grouping and configuration content. - [tmuxp search](https://libtmux.org/en/dotnet/latest/workspace/cli/search/): Search discovered workspace fields using regular expressions or literal strings. Queries combine with AND unless `--any` selects OR. - [tmuxp shell](https://libtmux.org/en/dotnet/latest/workspace/cli/shell/): Open a Python shell with tmux objects available, or evaluate Python using `-c`. This command remains Python-specific even when reached through a native command. - [tmuxp import](https://libtmux.org/en/dotnet/latest/workspace/cli/import/): Import a workspace from a supported external configuration format. Select one of the two child commands. - [tmuxp import teamocil](https://libtmux.org/en/dotnet/latest/workspace/cli/import-teamocil/): Translate a Teamocil workspace into tmuxp configuration, review the result, and select its saved representation. - [tmuxp import tmuxinator](https://libtmux.org/en/dotnet/latest/workspace/cli/import-tmuxinator/): Translate a tmuxinator workspace into tmuxp configuration, preserving an explicit boundary around dynamic Ruby configuration. - [Workspace command reference](https://libtmux.org/en/dotnet/latest/workspace/cli/): The tmuxp command tree, root options, and native compatibility scope. - [Shell completion](https://libtmux.org/en/dotnet/latest/workspace/cli/completion/): Generate completion from command definitions and check native availability. ## Concepts - [Concepts](https://libtmux.org/en/dotnet/latest/concepts/): tmux objects, command transports, queries, and workspaces across the libtmux language ports. - [Server, session, window, pane](https://libtmux.org/en/dotnet/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/dotnet/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/dotnet/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/dotnet/latest/concepts/workspaces/): Build pane layouts with the object API or a workspace configuration file. ## Configuration - [Workspace configuration](https://libtmux.org/en/dotnet/latest/workspace/configuration/): Tmuxp workspace configuration and current .NET builder compatibility. - [Session configuration](https://libtmux.org/en/dotnet/latest/workspace/configuration/session/): Tmuxp session configuration and current .NET builder compatibility. - [Window configuration](https://libtmux.org/en/dotnet/latest/workspace/configuration/windows/): Tmuxp window configuration and current .NET builder compatibility. - [Pane configuration](https://libtmux.org/en/dotnet/latest/workspace/configuration/panes/): Tmuxp pane configuration and current .NET builder compatibility. - [Workspace commands](https://libtmux.org/en/dotnet/latest/workspace/configuration/commands/): Tmuxp workspace commands and current .NET builder compatibility. - [Workspace environment](https://libtmux.org/en/dotnet/latest/workspace/configuration/environment/): Tmuxp workspace environment and current .NET builder compatibility. - [Workspace files and directories](https://libtmux.org/en/dotnet/latest/workspace/configuration/directories/): Tmuxp workspace files and directories and current .NET builder compatibility. - [Workspace layouts and focus](https://libtmux.org/en/dotnet/latest/workspace/configuration/layouts/): Tmuxp workspace layouts and focus and current .NET builder compatibility. - [Workspace hooks and builders](https://libtmux.org/en/dotnet/latest/workspace/configuration/hooks/): Tmuxp workspace hooks and builders and current .NET builder compatibility. ## Examples - [Examples](https://libtmux.org/en/dotnet/latest/examples/): Programs for sending input, capturing output, and building workspaces in each language. - [Attach and send keys](https://libtmux.org/en/dotnet/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/dotnet/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/dotnet/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. - [Workspace example gallery](https://libtmux.org/en/dotnet/latest/workspace/examples/gallery/): Pinned YAML examples, JSON counterparts, and execution prerequisites. ## Guides - [Guides](https://libtmux.org/en/dotnet/latest/guides/): Task-oriented walkthroughs that sit between the concepts and each port's own API reference. - [Getting started](https://libtmux.org/en/dotnet/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/dotnet/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/dotnet/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/dotnet/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/dotnet/latest/guides/querying-and-filtering/): Filter tmux objects, require one match, and choose where a query runs. - [Testing with libtmux](https://libtmux.org/en/dotnet/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. - [Install and load a workspace](https://libtmux.org/en/dotnet/latest/workspace/guides/installation/): Install the prerelease .NET workspace CLI from NuGet and load a session on a private tmux socket. - [Find saved workspaces](https://libtmux.org/en/dotnet/latest/workspace/guides/discovery/): Resolve project files, explicit paths, and global workspace names. - [Automate workspace operations](https://libtmux.org/en/dotnet/latest/workspace/guides/automation/): Python automation and the local native CLI machine protocol. - [Export and reload a session](https://libtmux.org/en/dotnet/latest/workspace/guides/export-session/): Capture, inspect, and replay a workspace without assuming lossless recovery. - [Troubleshoot workspace loading](https://libtmux.org/en/dotnet/latest/workspace/guides/troubleshooting/): Diagnose argument, discovery, configuration, shell, and partial-build failures. - [Inspect a workspace through MCP](https://libtmux.org/en/dotnet/latest/workspace/guides/inspect-with-mcp/): Connect the development .NET MCP server to a session loaded by its native workspace CLI. ## Internals - [.NET workspace internals](https://libtmux.org/en/dotnet/latest/workspace/internals/): Architecture and development interfaces of the .NET workspace builder. - [.NET workspace builder behavior](https://libtmux.org/en/dotnet/latest/workspace/internals/topics/): Internal configuration, application, and failure contracts of the .NET workspace builder. - [Use the .NET workspace builder](https://libtmux.org/en/dotnet/latest/workspace/internals/guides/): Use the in-development .NET workspace builder from application code. - [.NET workspace builder examples](https://libtmux.org/en/dotnet/latest/workspace/internals/examples/): Internal examples for building and inspecting workspaces through the .NET API. - [.NET workspace builder API](https://libtmux.org/en/dotnet/latest/workspace/reference/): Internal reference for the .NET workspace builder and configuration APIs. - [Workspace reference generation](https://libtmux.org/en/dotnet/latest/workspace/internals/documentation/): Keep help, completion, and site references aligned with command metadata. ## Overview - [Third-party notices](https://libtmux.org/en/dotnet/latest/third-party-notices/): Licences and attribution for the tools that build libtmux.org and the software libtmux depends on. ## Reference - [Exit codes and errors](https://libtmux.org/en/dotnet/latest/workspace/reference/exit-codes/): Observed Python exit behavior and the proposed native error contract. - [JSON, NDJSON, and semantic color](https://libtmux.org/en/dotnet/latest/workspace/reference/output/): Python output and the native CLI stream and color contract. - [tmuxp compatibility and port status](https://libtmux.org/en/dotnet/latest/workspace/reference/compatibility/): Current local CLI capabilities, remaining gaps, and the historical builder audit. ## Topics - [Topics](https://libtmux.org/en/dotnet/latest/topics/): Object traversal, cleanup, pane I/O, configuration, and failure handling. - [Architecture](https://libtmux.org/en/dotnet/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/dotnet/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/dotnet/latest/topics/context-managers/): Scope-based cleanup for tmux objects, and when your program must kill them explicitly. - [Pane interaction](https://libtmux.org/en/dotnet/latest/topics/pane-interaction/): Input defaults, screen capture, and waiting for a command to finish. - [Options and hooks](https://libtmux.org/en/dotnet/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/dotnet/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/dotnet/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/dotnet/latest/topics/environment/): Locate tmux objects from process variables and manage the environment inherited by new panes. - [Socket and servers](https://libtmux.org/en/dotnet/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/dotnet/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. ## Reference - [.NET API reference](https://libtmux.org/en/dotnet/latest/reference/): every public symbol, generated from the source. Hosted on libtmux.org. ## Optional - [Full text of every page above](https://libtmux.org/en/dotnet/latest/llms-full.txt): the same prose concatenated, for a single fetch.