# Go

Source: https://libtmux.org/en/go/latest/

> libtmux for Go, version latest.

![](https://libtmux.org/en/brand/go/library/logo.svg)

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`

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

### [Workspace Manager](https://libtmux.org/en/go/latest/workspace/) `github.com/libtmux/libtmux-go/workspace`

The workspace package is separate from the core library.

```console
$ 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](https://libtmux.org/en/go/latest/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:

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

Then register:

```console
$ 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)`

### [Topics](https://libtmux.org/en/go/latest/topics/)

[Subject-by-subject, with Go in every code block.](https://libtmux.org/en/go/latest/topics/)

### [Guides](https://libtmux.org/en/go/latest/guides/)

[Task guides for Go.](https://libtmux.org/en/go/latest/guides/)

### [Examples](https://libtmux.org/en/go/latest/examples/)

[Complete programs, sourced from the code each port tests.](https://libtmux.org/en/go/latest/examples/)

### [Concepts](https://libtmux.org/en/go/latest/concepts/)

[The domain model every port shares.](https://libtmux.org/en/go/latest/concepts/)

## Packages and integrations

### [Workspace Manager](https://libtmux.org/en/go/latest/workspace/)

[Load workspace files with the tmux-workspace load prerelease.](https://libtmux.org/en/go/latest/workspace/)

### [MCP](https://libtmux.org/en/go/latest/mcp/)

[In development. Connect an MCP client to tmux tools and inspect the server API.](https://libtmux.org/en/go/latest/mcp/)

## API references

### [Official reference](https://libtmux.org/en/go/latest/reference/)

[Go API signatures and documentation, with links to related guides and APIs in other languages.](https://libtmux.org/en/go/latest/reference/)

### [pkg.go.dev documentation](https://pkg.go.dev/github.com/libtmux/libtmux-go/tmux)

[Go API documentation for published module versions on pkg.go.dev.](https://pkg.go.dev/github.com/libtmux/libtmux-go/tmux)

[All Go versions and install instructions](https://libtmux.org/en/go/)
