Rust
Drive a real tmux from Rust.
libtmux
You are reading the latest documentation. Use the version control in the header to move between releases, or the port dropdown to find a corresponding page in another language.
Install
Library libtmux
$ cargo add libtmux Workspace Manager tmux-workspace
The workspace package is separate from the core library.
$ cargo install --locked --version 0.1.0-alpha.15 tmux-workspaceNeeds Rust 1.85 or newer. cargo install skips prereleases unless asked, so the command names the version. This builds and installs the native CLI; run tmux-workspace --help afterward.
MCP tmux-mcp
Choose your client and configuration scope, then run the command or paste the configuration.
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ claude mcp add tmux -- tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ~/.claude.json (this project)
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ claude mcp add tmux --scope user -- tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ~/.claude.json (all projects)
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ claude mcp add tmux --scope project -- tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: .mcp.json (in repo, version-controlled)
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then use this config:
Cargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: claude_desktop_config.json
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ codex mcp add tmux -- tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ~/.codex/config.toml
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.
Cargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: .codex/config.toml (in repo)
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ gemini mcp add --scope user tmux tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ~/.gemini/settings.json
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ gemini mcp add --scope project tmux tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: .gemini/settings.json (in repo)
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then use this config:
Cargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: .cursor/mcp.json (in repo)
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then use this config:
Cargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ~/.cursor/mcp.json
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ grok mcp add --scope user tmux -- tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ~/.grok/config.toml
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ grok mcp add --scope project tmux -- tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ./.grok/config.toml (in repo)
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then use this config:
Cargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ~/.gemini/config/mcp_config.json
Build or install the server first:
$ cargo install tmux-mcp --version 0.1.0-alpha.13Then register:
$ opencode mcp add tmux -- tmux-mcpCargo requires an explicit prerelease version. The installed `tmux-mcp` binary speaks MCP on stdin and stdout.
Config file: ~/.config/opencode/opencode.jsonc
Topics
Subject-by-subject, with Rust in every code block.
Guides
Task guides for Rust.
Examples
Complete programs, sourced from the code each port tests.
Concepts
The domain model every port shares.