mcpField
T
tmux-cli

tmux-cli

github.com/pchalasaniAgent workflows2.0k81 installsUpdated today
Repository

About tmux-cli

A skill for using `tmux-cli` to communicate with CLI agents or scripts running in other tmux panes. It distinguishes command execution with exit-code reporting from agent communication using send, wait, and capture.

Key features

  1. 01Communicates across tmux panes
  2. 02Executes shell commands with exit codes
  3. 03Supports send, wait_idle, and capture

Use cases

  1. 01Checking whether tests or builds passed in another pane
  2. 02Coordinating with another Claude Code instance
  3. 03Automating commands across tmux sessions

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pchalasani/claude-code-tools --skill tmux-cli

After installing, type/tmux-cliin Claude Code to confirm it loaded.

Details

From the project README

tmux-cli

Instructions

Use the tmux-cli command to communicate with other CLI Agents or Scripts in other tmux panes. Do tmux-cli --help to see how to use it!

This command depends on installing the claude-code-tools. If you get an error indicating that the command is not available, ask the user to install it using: uv tool install claude-code-tools.

Key Commands

Execute with Exit Code Detection

Use tmux-cli execute when you need to know if a shell command succeeded or failed:

tmux-cli execute "make test" --pane=2
# Returns JSON: {"output": "...", "exit_code": 0}

tmux-cli execute "npm install" --pane=ops:1.3 --timeout=60
# Returns exit_code=0 on success, non-zero on failure, -1 on timeout

This is useful for:

  • Running builds and knowing if they passed
  • Running tests and detecting pass/fail
  • Multi-step automation that should abort on failure

Note: execute is for shell commands only, not for agent-to-agent chat. For communicating with another Claude Code instance, use send + wait_idle + capture instead.

Comments

Markdown supported