clrun for Openclaw

A powerful interactive terminal controller that allows AI agents to navigate TUI prompts, manage long-running processes, and maintain persistent shell states.

cybertheory
v1.0.0
Feb 17, 2026
0
797
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install clrun

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 clrun 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 clrun?

clrun is a specialized utility designed to bridge the gap between AI agents and interactive terminal environments. Unlike standard command execution, clrun enables Openclaw Skills to interact with complex Text User Interfaces (TUIs), such as select lists, checkboxes, and confirmation dialogs found in modern scaffolding tools like create-vue or create-astro.

By providing a structured way to send raw keystrokes and text input, it ensures that AI agents can handle prompts that usually require human intervention. It manages persistent session states, allowing variables to persist across commands and providing transparent restoration for suspended sessions, making it a cornerstone for robust terminal automation.

clrun Use Cases

  • Automating interactive scaffolders such as create-vite, create-vue, and npm init.
  • Managing long-running background processes like development servers, test suites, and Docker builds.
  • Navigating complex TUI tools that utilize checkboxes, radio buttons, and select lists.
  • Maintaining stateful shell sessions where environment variables must be preserved between command executions.
  • Handling commands that require manual confirmation or specific escape sequences like Ctrl+C.

How clrun Works

  1. The agent initiates a session by running a command through clrun, which returns a unique terminal_id.
  2. The agent observes the current terminal state using the tail command to read cleaned output and identify active prompts.
  3. Based on the prompt type (TUI or Readline), the agent sends text input or specific keystrokes (up, down, space, enter) to the session.
  4. This interaction loop repeats until the interactive process completes or the desired state is reached.
  5. The agent verifies the final outcome by checking exit codes and session status.
  6. If necessary, the agent kills the session or leaves it running for future interaction.

clrun Setup

To get started with this skill, ensure you have Node.js version 18 or higher installed. You can install the tool globally or run it via npx.

# Install clrun globally
npm install -g clrun

# Or use it directly via npx
npx clrun status

clrun Data Schema & Taxonomy

clrun returns all data in a structured YAML format to ensure compatibility with Openclaw Skills. The primary fields include:

Field Description
terminal_id The unique identifier for the persistent session.
output Cleaned terminal output with ANSI codes stripped.
status Current state: running, suspended, exited, killed, or detached.
hints Contextual suggestions for the next valid commands.
warnings Notifications regarding input issues or detected output artifacts.
restored Boolean indicating if a suspended session was auto-resumed.

clrun Advanced Features

  • Transparent session restoration that automatically wakes up processes after inactivity.
  • Precise keystroke emulation for complex TUI navigation, including support for Ctrl, Alt, and arrow keys.
  • Intelligent output filtering that strips ANSI noise while preserving critical prompt information.
  • Support for single-quoted shell variable passing to prevent premature expansion by the host shell.
  • Multi-select pattern orchestration allowing complex checkbox sequences in a single command execution.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*