Go
Go
Drive a real tmux from Go.
github.com/libtmux/libtmux-go/tmux
Install
$ go get github.com/libtmux/libtmux-goQuickstart
session, err := server.NewSession(ctx, tmux.NewSessionRequest{ Name: "libtmux-go-quickstart", WindowName: "start",})if err != nil { return fmt.Errorf("create session: %w", err)}
windowName := "work"window, err := session.NewWindow(ctx, tmux.NewWindowRequest{Name: &windowName})if err != nil { return fmt.Errorf("create window: %w", err)}pane, err := window.SplitPane(ctx, tmux.SplitPaneRequest{ Direction: tmux.PaneDirectionRight,})if err != nil { return fmt.Errorf("split window: %w", err)}command := "printf 'libtmux ready\\n'"if err := pane.SendKeys(ctx, tmux.SendKeysRequest{Command: &command, Literal: true}); err != nil { return fmt.Errorf("send command: %w", err)}The session creation from examples/quickstart/main.go, prepended to the README's own <!-- docs:quickstart --> region from the same file — go generate ./tmux regenerates that region from the file and CI fails if they disagree. Runnable as-is: go -C examples run ./quickstart.
API References
Official reference
Every public Go symbol, extracted from source on libtmux.org and cross-linked to the other seven ports.
pkg.go.dev documentation
pkg.go.dev indexes every module version from the proxy with no action from us, and Go tooling links there by convention. It is a server, not a static generator, so it cannot be self-hosted anyway.
Read on
Topics
Deep dives into one subject at a time, in Go: architecture, traversal, options and hooks.
Guides
Task-oriented walkthroughs in Go — install tmux, then the round trip every real program starts from.
Examples
The same concrete tasks worked through in Go, with each snippet checked by the port's own tests.
Concepts
The domain model every port shares — the object hierarchy, transports and filtering.