Loading...
Loading...
Remote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
npx skill4agent add tychohq/agent-skills tmux-Stmux attachoc-${project}-${feature}oc-knowhere-date-range-pickeroc-deck-auth-flowoc-tmux ls | grep oc-SESSION=oc-myproject-feature
tmux new-session -d -s "$SESSION" -c ~/projects/myproject
tmux send-keys -t "$SESSION" 'claude --dangerously-skip-permissions' Enter
tmux capture-pane -p -J -t "$SESSION" -S -200To monitor: tmux attach -t $SESSIONsession:window.pane:0.0tmux list-sessionstmux list-panes -atmux send-keys -t target -l -- "$cmd"tmux send-keys -t target C-cEntersend-keysEntertmux send-keys -t target -l -- "$cmd" && sleep 0.1 && tmux send-keys -t target Entertmux capture-pane -p -J -t target -S -200Ctrl+b dPYTHON_BASIC_REPL=1# Create sessions in different worktrees
tmux new-session -d -s oc-project-fix1 -c ~/projects/project-fix1
tmux new-session -d -s oc-project-fix2 -c ~/projects/project-fix2
# Launch agents
tmux send-keys -t oc-project-fix1 'claude --dangerously-skip-permissions' Enter
tmux send-keys -t oc-project-fix2 'codex --full-auto' Enter
# Send a prompt (text + Enter separated by delay)
tmux send-keys -t oc-project-fix1 -l -- "Fix the date picker styling." && sleep 0.1 && tmux send-keys -t oc-project-fix1 Enter
# Poll for completion (check if shell prompt returned)
for sess in oc-project-fix1 oc-project-fix2; do
if tmux capture-pane -p -t "$sess" -S -3 | grep -q "❯"; then
echo "$sess: DONE"
else
echo "$sess: Running..."
fi
done
# Get full output
tmux capture-pane -p -t oc-project-fix1 -S -500bun installpnpm install❯$--yolo--full-autotmux kill-session -t "$SESSION"tmux ls -F '#{session_name}' | grep '^oc-' | xargs -n1 tmux kill-session -t