Help us shape the future of Go! Take the 2026 Go Developer Survey

tmux

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tmux bridges lazyclaude to tmux: pane discovery for Claude Code processes, live screen capture, key injection, and session lifecycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttachCmd

func AttachCmd(paneID string) *exec.Cmd

AttachCmd builds the command to attach to the pane's session from outside tmux. Run it with the terminal released (tea.ExecProcess).

func Available

func Available() bool

Available reports whether tmux is installed.

func Capture

func Capture(paneID string, ansi bool) ([]string, error)

Capture returns the pane's visible screen. With ansi=true, SGR color/attr escape sequences are preserved.

func CreateSession

func CreateSession(sessionName, cwd, command string) (paneID string, err error)

CreateSession opens a new window (creating the session when missing), then launches the command via the interactive shell so user aliases apply.

func InsideTmux

func InsideTmux() bool

InsideTmux reports whether lazyclaude itself runs inside tmux.

func KillPane

func KillPane(paneID string) error

KillPane terminates the pane (and its process).

func SelectPane

func SelectPane(paneID string)

SelectPane makes the pane active within its session (window + pane).

func Send

func Send(paneID, text string) error

Send types text into the pane and presses Enter. The literal text and the Enter key are sent separately (with a short gap) so the target's paste detection doesn't swallow the newline.

func SwitchClient

func SwitchClient(paneID string) error

SwitchClient moves the current tmux client to the pane's session. Only meaningful when running inside tmux.

Types

type Pane

type Pane struct {
	ID   string // "%42"
	Name string // "work:3.1" (session:window.pane)
}

Pane identifies a tmux pane hosting a Claude Code session.

func FindPane

func FindPane(pid int) *Pane

FindPane locates the tmux pane whose tty matches the process's tty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL