agent-tui

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires agent-tui, tmux.

What problem does it solve? Testing and automating interactive terminal applications is difficult because TUIs have no persistent DOM—only a constantly redrawn character grid. This Skill provides a disciplined observe-act-wait-verify workflow for driving TUI programs programmatically, eliminating flaky manual testing of CLI tools. ## Core Features & Use Cases - Programmatic TUI Control: Launch terminal apps, take screenshots (plain text or JSON), type text, and send keystrokes via the agent-tui CLI. - State Synchronization: Wait for specific text to appear or disappear, or for the UI to stabilize, with assertion-based verification. - Regression Testing: Verify interactive behavior of CLI tools like the Gemini CLI, including trust-modal bypass and isolated test environments. - Use Case: Automate an end-to-end test of a terminal application by launching it, typing commands, asserting expected output appears, and capturing screenshots for debugging failures. ## Quick Start Ask the agent to launch a terminal application with agent-tui, wait for it to stabilize, then type a command and verify the expected output appears on screen.

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?

Use agent-tui to launch the app with 'run', take a screenshot to observe state, type text or press keys, then use 'wait' with assertions to verify expected output. Always re-screenshot after each action since terminal UIs redraw constantly.

How do I test interactive CLI tools like Gemini CLI automatically?

Build the project first, then launch it via agent-tui with GEMINI_CLI_TRUST_WORKSPACE=true to bypass trust modals and GEMINI_CLI_HOME set to an isolated directory. Drive interactions with type and press commands, verifying each step with wait assertions.

Does agent-tui work on Windows?

No, agent-tui currently supports only macOS and Linux. On macOS, the daemon must be started inside a tmux session to avoid TTY hangup crashes that cause connection refused errors.

Why does my terminal automation fail intermittently?

Failures usually come from acting on stale screenshots or during UI transitions. Always wait for stability with 'wait --stable', take a fresh screenshot before every action, and never chain commands together since modals can intercept keystrokes.

What should I do when an agent-tui wait command times out?

Take a screenshot to diagnose what unexpected UI element, such as a modal or error dialog, intercepted the flow. Do not blindly restart the session; if the daemon crashed with connection refused, restart it in tmux and create a new session.