agent-tui

Automate and test terminal UI applications through screenshot-driven interaction loops.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/bkrsna/gemini-cli --skill agent-tui-bkrsna
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: agent-tui
Source: https://github.com/bkrsna/gemini-cli/tree/main/.gemini/skills/agent-tui
Command: npx skills add https://github.com/bkrsna/gemini-cli --skill agent-tui-bkrsna

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agent-tui, tmux.

What problem does it solve? Testing and automating interactive terminal UI applications is difficult because terminal screens are stateless character grids without a persistent DOM, making traditional automation approaches unreliable and flaky. ## Core Features & Use Cases - Programmatic TUI Control: Launch terminal applications in managed sessions and interact via screenshots, keystrokes, and text input. - State Verification: Wait for specific text to appear or disappear, or for the UI to stabilize, with assertion-based verification of outcomes. - Regression Testing: Automate CLI/TUI interaction testing, including Gemini CLI testing with isolated environments and trust-modal bypassing. - Use Case: Verify that a CLI application's interactive prompts behave correctly by launching it in a session, typing input, pressing keys, and asserting expected output text appears on screen. ## Quick Start Ask the agent to launch your terminal application with agent-tui, take a screenshot, type input, and verify the expected output appears.

Frequently Asked Questions about agent-tui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate a terminal UI application for testing?▼

Launch the app with agent-tui run, take a screenshot to observe state, send input with type or press commands, then use wait with assertions to verify expected text appears. Always re-screenshot after each action since terminal state changes constantly.

How to test interactive CLI applications programmatically?▼

Use agent-tui to run the CLI in a managed pseudo-terminal session, then drive it with type and press commands while verifying output with wait assertions. For Gemini CLI specifically, build first and set GEMINI_CLI_TRUST_WORKSPACE=true to bypass trust modals.

Does agent-tui work on Windows?▼

No, agent-tui currently supports only macOS and Linux. Windows is not supported yet according to the documented prerequisites.

Why does agent-tui fail with connection refused on macOS?▼

The default background daemon crashes on macOS, causing os error 61. Start the daemon manually inside a tmux session with agent-tui daemon start --foreground to shield it from TTY hangups before running commands.

What are the limitations of terminal UI automation?▼

Terminal UIs are stateless character grids without stable selectors, so text positions shift and stale screenshots cause failures. You must re-verify state before every action and never chain commands, since modals can intercept keystrokes.