termmux

v0.1.0
io.github.CloudCorpRecords/termmux Checked 37 minutes ago Published 1 month ago

Drive local tmux sessions, windows and panes: list, create, send keys, capture output.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_sessions

List all tmux sessions

create_session

Create a new tmux session

ParameterTypeDescription
session_name *stringThe name for the new tmux session
start_directorystringOptional working directory the session starts in
window_namestringOptional name for the session's first window

kill_session

Kill a tmux session by name

ParameterTypeDescription
session_name *stringThe name of the tmux session to kill

list_windows

List the windows of a tmux session

ParameterTypeDescription
session_name *stringThe name of the tmux session whose windows to list

create_window

Create a new window in a tmux session

ParameterTypeDescription
session_name *stringThe name of the tmux session to create the window in
window_name *stringThe name for the new window
start_directorystringOptional working directory the window starts in

kill_window

Kill a window in a tmux session

ParameterTypeDescription
session_name *stringThe name of the tmux session containing the window
window_name *stringThe name of the window to kill

list_panes

List the panes of a tmux session, optionally of one window

ParameterTypeDescription
session_name *stringThe name of the tmux session whose panes to list
window_namestringOptional window name to limit the listing to one window

send_keys

Send keys (a command line or key names) to a tmux pane

ParameterTypeDescription
keys *stringThe command line or key names to send to the pane
session_name *stringThe name of the tmux session containing the target pane
pane_targetstringOptional pane target (window.pane) to send the keys to
press_enterbooleanWhether to press Enter after sending the keys

capture_pane

Capture the visible contents of a tmux pane as text

ParameterTypeDescription
session_name *stringThe name of the tmux session containing the pane
linesnumberOptional number of lines of pane history to capture
pane_targetstringOptional pane target (window.pane) to capture

rename_session

Rename a tmux session

ParameterTypeDescription
new_name *stringThe new name for the session
session_name *stringThe current name of the tmux session

select_window

Select (activate) a window in a tmux session

ParameterTypeDescription
session_name *stringThe name of the tmux session containing the window
window_name *stringThe name of the window to select

get_session_info

Get details of one tmux session: window count, creation time and attached state

ParameterTypeDescription
session_name *stringThe name of the tmux session to describe