tmux Controller for Openclaw

A powerful skill for managing interactive TTY sessions, allowing AI agents to send keystrokes and scrape terminal output via tmux.

brennerspear
v1.0.0
Feb 26, 2026
0
1.4k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install tmux-controller

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install tmux-controller using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is tmux Controller?

The tmux skill provides a robust interface for Openclaw Skills to interact with terminal-based applications that require a persistent TTY. Unlike standard background execution, this skill allows for session persistence, enabling agents to handle interactive CLIs like Claude Code or Codex. By leveraging the default tmux server, it ensures that human developers can easily attach to sessions to monitor progress or intervene when necessary.

This skill is designed for high-reliability automation within the terminal. It uses specific naming conventions and safety protocols, such as delaying Enter keystrokes, to ensure that Openclaw Skills can navigate complex terminal user interfaces without input corruption or session loss.

tmux Controller Use Cases

  • Running interactive TUI applications like Claude Code or Codex in a controlled environment.
  • Orchestrating long-running terminal processes that require periodic output scraping.
  • Managing multiple parallel coding agents across different git worktrees.
  • Automating REPL environments for Python or Node.js that require literal keystroke input.
  • Monitoring background tasks by providing a simple attachment point for developers.

How tmux Controller Works

  1. Initialize a new detached tmux session using the standardized oc- prefix to avoid user session collisions.
  2. Set the working directory to the target project path for the specific task.
  3. Send literal commands or keystrokes to the specific session, window, and pane using safe-send protocols.
  4. Capture pane output periodically to monitor agent progress or detect completion by searching for specific shell prompts.
  5. Provide a simple attach command for manual user intervention or monitoring if required.
  6. Clean up resources by killing specific sessions or all Openclaw Skills managed sessions once tasks are finalized.

tmux Controller Setup

To use this skill, ensure that tmux is installed on your system (compatible with Darwin and Linux).

# Install tmux on macOS
brew install tmux

# Install tmux on Ubuntu/Debian
sudo apt-get install tmux

No specialized server configuration is needed as the skill intentionally uses the default tmux server to allow easy manual attachment. Ensure your shell prompt is recognizable for automated completion detection.

tmux Controller Data Schema & Taxonomy

The tmux skill organizes session data and captures to ensure Openclaw Skills can track multiple workflows simultaneously:

Attribute Specification Description
Session Name oc-${project}-${feature} Standardized naming to prevent collisions
Target Format session:window.pane Precise addressing for input/output
History Depth -200 to -500 lines Configurable buffer for scraping output
Env Vars PYTHON_BASIC_REPL=1 Environment overrides for stable interaction

tmux Controller Advanced Features

  • Safe keystroke injection with configurable delays to prevent input buffer issues in complex TUI apps.
  • Multi-agent orchestration support for running parallel fixes across different git worktrees.
  • Smart completion detection by polling terminal output for shell prompts like ❯ or $.
  • Bulk cleanup commands to wipe all sessions associated with Openclaw Skills.
  • Deep history scraping to allow agents to analyze long-running logs within the TTY.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Bins tmux
Github Stars: 0
forks: 0

Featured*