ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified developer tools Safety 3/5

tmux

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

Why use this skill?

Learn how to use the tmux skill to enable persistent interactive terminal control, multi-pane management, and remote CLI automation for your OpenClaw AI agents.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/steipete/tmux
Or

What This Skill Does

The tmux skill enables OpenClaw AI agents to manage interactive command-line environments by programmatically controlling tmux sessions. Unlike standard shell executions which are ephemeral, this skill allows the agent to maintain persistent state in a terminal, send complex keystroke sequences, and scrape visual output from specific panes. This is critical for interacting with long-lived processes, such as REPLs, coding agents, or interactive CLIs that require multi-turn conversational input.

Installation

To integrate this skill into your environment, run the installation command in your terminal: clawhub install openclaw/skills/skills/steipete/tmux. Ensure you are operating on a supported macOS or Linux system (or WSL) and that tmux is installed and reachable via your system PATH.

Use Cases

This skill is ideal for scenarios requiring persistent interactive sessions. Use it to run a Python REPL while maintaining a session state for variable introspection, managing multiple coding agent instances in parallel for heavy-duty development, or monitoring long-running CLI tools that don't output to standard logs. By utilizing socket-based isolation, you can segregate tasks into different tmux sessions, preventing interference between disparate AI-driven workflows.

Example Prompts

  1. "Open a new tmux session named 'data-processor', start a python3 shell in it, and print the last 50 lines of output to verify it's ready."
  2. "Check all existing clawbot-related tmux sessions. If 'agent-1' is running, send a keyboard interrupt command and then capture the pane output to check for error logs."
  3. "Launch four parallel coding sessions, assign each to a unique directory, and run the 'codex' utility in each to perform automated code refactoring. Monitor them every minute until completion."

Tips & Limitations

  • Isolation: Always define a custom socket directory via CLAWDBOT_TMUX_SOCKET_DIR to avoid collisions with other system processes.
  • Precision: Prefer literal string sending (send-keys -l) to avoid shell interpretation issues when injecting complex code snippets.
  • Environment: If you are running a Python REPL, set the environment variable PYTHON_BASIC_REPL=1 to ensure the terminal output remains clean and predictable for the scraping logic.
  • Restrictions: This skill requires a Unix-like environment; it will not function on native Windows without WSL. Use background bash mode for non-interactive tasks to save resources.

Metadata

Author@steipete
Stars982
Views0
Updated2026-02-14
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-steipete-tmux": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#tmux#terminal#automation#cli#devops
Safety Score: 3/5

Flags: code-execution, file-read, file-write