with one click
tmux-test
Interacts with any CLI/TUI application via TMUX.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Interacts with any CLI/TUI application via TMUX.
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | tmux-test |
| description | Interacts with any CLI/TUI application via TMUX. |
Start a detached tmux session:
tmux new-session -d -s <session_name> -x 135 -y 40 '<command_to_run>'
Always use terminal size 135x40 (-x 135 -y 40) for consistent testing.
Examples:
tmux new-session -d -s test_app -x 135 -y 40 './myapp'tmux new-session -d -s test_node -x 135 -y 40 'node server.js'tmux new-session -d -s test_python -x 135 -y 40 'python script.py'Verify session is running:
tmux list-sessions
Capture and print the current pane output:
tmux capture-pane -t <session_name> -p
This shows the exact application state at that moment, including prompts, menus, status indicators, and any output.
Send keys/commands to the application:
tmux send-keys -t <session_name> "<command>" Enter
Examples vary by application:
ls -la, git status, npm testyes, no, username/password inputs:q, /search, F1For dialogs, menus, and interactive prompts:
tmux send-keys -t <session_name> <key>
Common navigation keys:
Up/Down - Navigate list items, menu optionsEnter - Select/confirm, submit inputEscape - Cancel/close dialog, exit modeCtrl+c - Cancel operation, interruptTab - Navigate between fields, move focusSpace - Toggle selections, advance pagesMultiple keys can be chained: tmux send-keys -t <session_name> Down Down Enter
Send special keys:
tmux send-keys -t <session_name> C-c # Ctrl+c
tmux send-keys -t <session_name> C-d # Ctrl+d
tmux send-keys -t <session_name> C-l # Ctrl+l (clear screen)
Example: Testing a CLI tool:
# Start session
tmux new-session -d -s cli_test './mycli'
sleep 1
tmux capture-pane -t cli_test -p # View initial prompt
# Send command and capture response
tmux send-keys -t cli_test "status" Enter
sleep 2
tmux capture-pane -t cli_test -p # Verify output
# Navigate menu if present
tmux send-keys -t cli_test Down Enter
sleep 1
tmux capture-pane -t cli_test -p # Confirm selection
Example: Testing a TUI application:
# Start session
tmux new-session -d -s tui_test './mytuiapp'
sleep 2
# Navigate menus
tmux send-keys -t tui_test F1 # Open help menu
sleep 1
tmux capture-pane -t tui_test -p # View help dialog
tmux send-keys -t tui_test Escape # Close help
# Interact with form
tmux send-keys -t tui_test Tab # Move to next field
tmux send-keys -t tui_test "input value" Enter
sleep 1
tmux capture-pane -t tui_test -p # Verify form state
Example: Testing an interactive REPL:
# Start Python REPL
tmux new-session -d -s python_test 'python3'
sleep 1
# Send commands
tmux send-keys -t python_test "print('Hello')" Enter
sleep 1
tmux capture-pane -t python_test -p # Should show "Hello"
# Test multiline input
tmux send-keys -t python_test "def test():" Enter
tmux send-keys -t python_test " return 42" Enter
tmux send-keys -t python_test Enter
sleep 1
tmux capture-pane -t python_test -p # Verify function definition
# Exit REPL
tmux send-keys -t python_test "exit()" Enter
Kill the tmux session:
tmux kill-session -t <session_name>
Verify cleanup:
tmux list-sessions # Should show no sessions
| Command | Purpose |
|---|---|
tmux new-session -d -s NAME '<command>' | Start detached session with application |
tmux list-sessions | List all sessions |
tmux capture-pane -t NAME -p | Capture and print pane |
tmux send-keys -t NAME "text" Enter | Send keys to pane |
tmux send-keys -t NAME C-c | Send Ctrl+c (interrupt) |
tmux kill-session -t NAME | Kill session |
Capture to file:
tmux capture-pane -t <session_name> -p > output.txt
Capture with line range:
tmux capture-pane -t <session_name> -S -100 -p # Last 100 lines
Wait for pattern in output:
# Capture repeatedly until pattern appears
while ! tmux capture-pane -t test -p | grep -q "Ready"; do
sleep 0.5
done
Send files as input:
tmux send-keys -t <session_name> C-l # Clear screen
cat commands.txt | while read -r line; do
tmux send-keys -t <session_name> "$line" Enter
sleep 1
done
capture-pane to verify the application state after each interactionIf capture shows nothing:
tmux list-sessions-S flag to capture more linesIf keys aren't being sent:
tmux list-sessionsIf timing is off:
Creates or updates prompt templates for Raijin. Use when asked to create, add, write, or modify a prompt template.
Creates or updates skills for Raijin
Creates or updates custom tools for Raijin. Use when asked to create, add, write, or modify a custom tool.
Commits git changes by appropriately breaking them into atomic units.