Core LibraryalphaHome

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

Go

Drive a real tmux from Go.

github.com/libtmux/libtmux-go/tmux

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 github.com/libtmux/libtmux-go/tmux

$ go get github.com/libtmux/libtmux-go/tmux@latest

Workspace Manager github.com/libtmux/libtmux-go/workspace

The workspace package is separate from the core library.

$ go install github.com/libtmux/libtmux-go/workspace/cmd/tmux-workspace@latest

Needs Go 1.26 or newer. Puts tmux-workspace in $(go env GOBIN), or in $(go env GOPATH)/bin when GOBIN is unset; rerunning it upgrades.

MCP github.com/libtmux/libtmux-go/mcp

Choose your client and configuration scope, then run the command or paste the configuration.

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ claude mcp add tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.claude.json (this project)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ claude mcp add tmux --scope user -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.claude.json (all projects)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ claude mcp add tmux --scope project -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: .mcp.json (in repo, version-controlled)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "libtmux-mcp"
        }
    }
}

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: claude_desktop_config.json

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ codex mcp add tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.codex/config.toml

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

Codex's CLI doesn't support project scope yet — paste this into .codex/config.toml at the repo root.

[mcp_servers.tmux]
command = "libtmux-mcp"

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: .codex/config.toml (in repo)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ gemini mcp add --scope user tmux libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.gemini/settings.json

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ gemini mcp add --scope project tmux libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: .gemini/settings.json (in repo)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "libtmux-mcp"
        }
    }
}

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: .cursor/mcp.json (in repo)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "libtmux-mcp"
        }
    }
}

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.cursor/mcp.json

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ grok mcp add --scope user tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.grok/config.toml

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ grok mcp add --scope project tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ./.grok/config.toml (in repo)

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then use this config:

{
    "mcpServers": {
        "tmux": {
            "command": "libtmux-mcp"
        }
    }
}

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.gemini/config/mcp_config.json

Build or install the server first:

$ go install github.com/libtmux/libtmux-go/mcp/cmd/libtmux-mcp@latest

Then register:

$ opencode mcp add tmux -- libtmux-mcp

That puts `libtmux-mcp` in $(go env GOPATH)/bin, which has to be on your PATH for the command below to resolve.

Config file: ~/.config/opencode/opencode.jsonc

Packages and integrations

API references

All Go versions and install instructions

Esc

Type to search.

Reference preview Open reference