tui-tester

Automates terminal UI testing of Gemini CLI behavior and visual output.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Verifying that code changes to a terminal application produce the correct interactive behavior and visual rendering is tedious and error-prone when done manually. This Skill provides a structured protocol for automating TUI testing of Gemini CLI, including session management, visual validation, and regression checks. ## Core Features & Use Cases - Behavioral Verification: Confirm that code changes result in the expected terminal interactions using the agent-tui automation tool. - Visual Validation: Ensure the TUI renders correctly across different terminal sizes and states via screenshot-based checks. - Regression Testing: Automate interactive workflow checks to prevent breaking existing functionality. - Use Case: After modifying the Gemini CLI prompt rendering, build the project, launch it in an automated terminal session, type commands, and assert that expected output markers appear. ## Quick Start Ask the AI to test your local Gemini CLI changes by building the project and running an automated terminal session that verifies the help command output.

Frequently Asked Questions about tui-tester

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

FAQPage Schema
How do I test Gemini CLI terminal output automatically?

Use the agent-tui tool to run the CLI in an automated terminal session, then send keystrokes and assert on expected output. Build the project first with npm run build, then launch with agent-tui run and verify output using agent-tui wait with assertion markers.

How to automate TUI testing for a command-line application?

Start the agent-tui daemon, launch the application with agent-tui run, and follow the loop of action, wait, screenshot, and verify. Execute exactly one command per turn and use the returned session_id for all subsequent interactions.

Does TUI testing work in parallel on macOS?

Yes, the setup is parallel-safe on macOS. It checks whether the global daemon is running, cleans up stale tmux sessions and temp files if needed, and starts a fresh daemon inside a dedicated tmux session before opening the live preview.

Why does agent-tui wait time out during testing?

Timeouts usually mean the expected output never rendered or the daemon lost connection. Take a fresh screenshot to diagnose the terminal state, and if you see os error 61, restart the daemon using the tmux-based recovery procedure.

How do I avoid workspace trust prompts when testing Gemini CLI?

Set the GEMINI_CLI_TRUST_WORKSPACE=true environment variable before launching the CLI to bypass focus-stealing trust modals. Also set GEMINI_CLI_HOME to isolate the test configuration from your personal settings.