Terminator

•
1
•

Enables AI agents to interact with terminal applications by converting raw terminal output into a structured Terminal State Tree.

Terminator acts as a Playwright for terminals, transforming raw terminal output into a structured Terminal State Tree. This allows AI agents to perceive and interact with TUI/CLI applications with a higher level of understanding than traditional methods. It automatically detects and labels UI elements such as buttons, inputs, tables, and menus, providing AI agents with context-rich data, their positions, and unique reference IDs for precise and programmatic interaction. Built in Go, it offers a robust, multi-session, PTY-based emulation solution with no external dependencies.

Key Features

018 UI element detectors for borders, menus, tables, inputs, buttons, checkboxes, progress bars, and status bars
020 GitHub stars
03PTY-based real terminal emulation with full ANSI escape sequence support and pure Go implementation
04Supports multi-session management for concurrent terminal interactions
05Generates a Terminal State Tree (TST) with structured UI elements, cursor position, and raw text
0610 MCP tools for comprehensive terminal interaction (create sessions, type, press keys, snapshot, wait for conditions)

Use Cases

01Streamline and automate complex CLI workflows, such as running `npm test` or interacting with developer tools
02Automate testing and validation workflows for Bubble Tea and other terminal-based applications
03Interact programmatically with TUI applications like `htop` or custom command-line interfaces