clrun

Run and control interactive CLI sessions for AI agents. Handles TUI prompts (select lists, checkboxes, confirms), persistent shell state, and long-running processes. Use when you need to execute terminal commands, respond to interactive prompts, navigate scaffolding wizards like create-vue or create-vite, or manage dev servers.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "clrun" with this command: npx skills add cybertheory/clrun/cybertheory-clrun-clrun

clrun — The Interactive CLI for AI Agents

No more --yes flags or command retries. clrun gives you full control over interactive terminal sessions with structured YAML responses.

Install

npm install -g clrun

Core Commands

ActionCommand
Run a commandclrun <command>
Send text + Enterclrun <id> "text"
Send keystrokesclrun key <id> down enter
Toggle checkboxclrun key <id> space
Accept defaultclrun key <id> enter
View outputclrun tail <id>
Check sessionsclrun status
Kill sessionclrun kill <id>
Interruptclrun key <id> ctrl-c

Two Input Modes

Text input — sends text followed by Enter:

clrun <id> "my-project-name"    # Type and press Enter
clrun <id> ""                    # Just press Enter

Keystroke input — sends raw keys for TUI navigation:

clrun key <id> down down enter           # Select 3rd item in list
clrun key <id> space down space enter    # Toggle checkboxes 1 and 2
clrun key <id> enter                      # Accept default

Available keys: up, down, left, right, enter, tab, escape, space, backspace, delete, home, end, pageup, pagedown, ctrl-c, ctrl-d, ctrl-z, ctrl-l, ctrl-a, ctrl-e, y, n

Identifying Prompt Types

When you tail a session, identify the prompt type to choose the right input:

You seeTypeAction
◆ Name: │ defaultText inputclrun <id> "value" or clrun key <id> enter
● Opt1 ○ Opt2 ○ Opt3Single-selectclrun key <id> down... enter
◻ Opt1 ◻ Opt2 ◻ Opt3Multi-selectclrun key <id> space down... enter
● Yes / ○ NoConfirmclrun key <id> enter or right enter
(y/n)Simple confirmclrun <id> "y" or clrun <id> "n"
name: (default)Readlineclrun <id> "value" or clrun <id> ""

Select List Navigation

Count items from the top. First item is highlighted by default. To select item N, send N-1 down presses then enter.

◆  Select a framework:
│  ● Vanilla       ← 0 downs
│  ○ Vue           ← 1 down
│  ○ React         ← 2 downs
│  ○ Svelte        ← 3 downs
clrun key <id> down down enter   # Selects React

Multi-Select Pattern

Plan a sequence of space (toggle) and down (skip) from top to bottom, ending with enter:

# Select items 1, 3, and 4 from a list of 5:
clrun key <id> space down down space down space enter
#              item1 skip  skip  item3 item4 confirm

Reading Responses

All responses are structured YAML. Key fields:

  • terminal_id — store this for all subsequent calls
  • output — cleaned terminal output (ANSI stripped)
  • statusrunning, suspended, exited, killed, detached
  • hints — exact commands you can run next (copy-pasteable)
  • warnings — detected issues with input or output

Workflow Pattern

1. START    →  clrun <command>               → get terminal_id
2. OBSERVE  →  clrun tail <id>               → read output, identify prompt
3. INTERACT →  clrun <id> "text" / clrun key → respond to prompt
4. REPEAT   →  steps 2-3 until done
5. CLEANUP  →  clrun kill <id>               → if needed

Shell Variable Quoting

Use single quotes to prevent your shell from expanding $ variables:

clrun <id> 'echo $MY_VAR'          # Correct
clrun <id> "echo $MY_VAR"          # Wrong — expanded before clrun sees it

Session Persistence

  • Environment variables persist within a session
  • Sessions auto-suspend after 5 min idle (env and cwd saved)
  • Sending input to a suspended session auto-restores it
  • No pre-check needed — just send input

See references/tui-patterns.md for complete real-world examples.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

mailroom

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated