Termitty Documentation

Welcome to Termitty - the terminal automation library built for AI agents and modern DevOps.

Built for AI Agents

Termitty is the first SSH library designed specifically for AI agents and LLMs. With structured output, smart waiting, and full terminal emulation, your AI can control servers like a senior engineer.

Quick Links

Why Termitty?

No More Sleep() Calls

Smart wait conditions eliminate flaky scripts. Wait for specific output, prompts, or custom conditions - not arbitrary timeouts.

AI-Ready from Day One

Get terminal state as structured JSON/YAML. Perfect for LLM processing and decision making. Your AI sees exactly what a human would see.

Handle Any Interaction

From sudo passwords to interactive installers, Termitty handles it all. Your AI can navigate any terminal UI or prompt automatically.

Simple Example

from termitty import TermittySession
from termitty.conditions import OutputContains, PromptReady

# AI-friendly SSH automation
with TermittySession() as session:
    session.connect('server.example.com', username='deploy')
    
    # Deploy with intelligent waiting
    session.execute('./deploy.sh', wait=False)
    session.wait_until(OutputContains('Deployment complete'))
    
    # Get structured state for AI
    state = session.state.terminal.get_structured_state()
    print(state)  # JSON with screen content, cursor position, etc.

Key Features

  • Selenium-like API: Familiar patterns for anyone who's done web automation
  • Full Terminal Emulation: Complete ANSI support - AI sees what humans see
  • Session Recording: Record and replay terminal sessions for AI training
  • Parallel Execution: Run commands on multiple servers simultaneously
  • Error Recovery: Built-in retry logic and error handling for AI agents

Ready to build AI-powered automation?