tmux

Solid

Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.

AI & Automation 44,101 stars 7803 forks Updated today MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# tmux Skill Use tmux only when you need an interactive TTY. Prefer exec background mode for long-running, non-interactive tasks. ## Quickstart (isolated socket, exec tool) ```bash SOCKET_DIR="${NANOBOT_TMUX_SOCKET_DIR:-${TMPDIR:-/tmp}/nanobot-tmux-sockets}" mkdir -p "$SOCKET_DIR" SOCKET="$SOCKET_DIR/nanobot.sock" SESSION=nanobot-python tmux -S "$SOCKET" new -d -s "$SESSION" -n shell tmux -S "$SOCKET" send-keys -t "$SESSION":0.0 -- 'PYTHON_BASIC_REPL=1 python3 -q' Enter tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200 ``` After starting a session, always print monitor commands: ``` To monitor: tmux -S "$SOCKET" attach -t "$SESSION" tmux -S "$SOCKET" capture-pane -p -J -t "$SESSION":0.0 -S -200 ``` ## Socket convention - Use `NANOBOT_TMUX_SOCKET_DIR` environment variable. - Default socket path: `"$NANOBOT_TMUX_SOCKET_DIR/nanobot.sock"`. ## Targeting panes and naming - Target format: `session:window.pane` (defaults to `:0.0`). - Keep names short; avoid spaces. - Inspect: `tmux -S "$SOCKET" list-sessions`, `tmux -S "$SOCKET" list-panes -a`. ## Finding sessions - List sessions on your socket: `{baseDir}/scripts/find-sessions.sh -S "$SOCKET"`. - Scan all sockets: `{baseDir}/scripts/find-sessions.sh --all` (uses `NANOBOT_TMUX_SOCKET_DIR`). ## Sending input safely - Prefer literal sends: `tmux -S "$SOCKET" send-keys -t target -l -- "$cmd"`. - Control keys: `tmux -S "$SOCKET" send-keys -t target C-c`. ## Watching output - Capture recent history: `tmu...

Details

Author
HKUDS
Repository
HKUDS/nanobot
Created
4 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category