Tools

All tools accept an optional socket_name parameter for multi-server support. It defaults to the LIBTMUX_SOCKET env var. See Configuration.

Inspect readonly

Read tmux state without changing anything.

list_sessions

List all active sessions.

Sessions
list_windows

List windows in a session.

Windows
list_panes

List panes in a window.

Windows
capture_pane

Read visible content of a pane.

Panes
get_pane_info

Get detailed pane metadata.

Panes
search_panes

Search text across panes.

Panes
wait_for_text

Wait for text to appear in a pane.

Panes
get_server_info

Get tmux server info.

Sessions
show_option

Query a tmux option value.

Options & Environment
show_environment

Show tmux environment variables.

Options & Environment

Act mutating

Create or modify tmux objects.

create_session

Start a new tmux session.

Sessions
create_window

Add a window to a session.

Windows
split_window

Split a window into panes.

Windows
send_keys

Send commands or keystrokes to a pane.

Panes
rename_session

Rename a session.

Sessions
rename_window

Rename a window.

Windows
resize_pane

Adjust pane dimensions.

Panes
resize_window

Adjust window dimensions.

Windows
select_layout

Set window layout.

Windows
set_pane_title

Set pane title.

Panes
clear_pane

Clear pane content.

Panes
set_option

Set a tmux option.

Options & Environment
set_environment

Set a tmux environment variable.

Options & Environment

Destroy destructive

Tear down tmux objects. Not reversible.

kill_session

Destroy a session and all its windows.

Sessions
kill_window

Destroy a window and all its panes.

Windows
kill_pane

Destroy a pane.

Panes
kill_server

Kill the entire tmux server.

Sessions