Te

Termitty – Open Source Terminal Automation Framework (Selenium for SSH)

Hacker News

Termitty – Open Source Terminal Automation Framework (Selenium for SSH)

Hey HN! I built Termitty because I was tired of the hacky solutions I kept writing for SSH automation. While building my workflow automation SaaS, I had this seemingly simple requirement: workflows needed to execute tasks on remote servers, not just in browsers. Selenium made the browser part elegant - you could wait for elements, handle dynamic content, maintain session state. But for SSH? I was stuck in the stone age. I ended up writing this monster of a custom driver that: - Maintained persistent SSH connections in a pool - Kept track of working directories between commands - Tried to parse ANSI escape codes with regex (don't do this) - Had a "wait_for_prompt" function that was just `time.sleep(2)` with extra steps The breaking point was when I needed to automate a workflow that involved: 1. SSH into a production server 2. Start a database backup 3. Navigate an ncurses configuration menu 4. Detect when the backup finished (from a progress bar!) 5. Verify the backup file My "solution" was embarrassing - screen scraping terminal output with regex, hoping the prompt detection worked, and praying the timing lined up. It was brittle, unmaintainable, and I knew there had to be a better way. So with Claude Opus 4's help, I built what I wished existed - Termitty brings Selenium's patterns to terminal automation The key insight was that terminals are stateful UIs, just like web pages. So Termitty maintains a virtual terminal buffer - it actually understands what's on screen, tracks cursor position, handles ANSI codes properly. You can find text on the terminal screen just like finding DOM elements. Some cool stuff that emerged: - Full terminal emulation - It maintains a complete VT100/ANSI terminal state - Session recording - Records everything to JSON/asciinema format with a slick replay UI - Interactive shell - Persistent shell sessions that can control vim, top, installers - Real wait conditions - No more sleep()! Wait for specific output, prompts, or patterns Once I had structured terminal state, AI integration became obvious - now LLMs can actually "see" the terminal and make intelligent decisions about what to do next. What SSH automation pain have you encountered? I'm especially curious about edge cases I haven't hit yet! P.S. - Check out the terminal player in the docs. You can record a session and share it with beautiful playback UI - it's like Loom for terminals!

Share card

Actual performance

8points
2comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: cursor, claude, new · Missing: mac, agents, macos
90%90% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
84%84% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: exist, open source, io · Missing: https docs, excited, just released
59%59% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
41%41% predicted probability of success on AppSumo, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
40%40% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: arr, saas, active · Missing: mrr, revenue, profit
19%19% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ev
Evvo – an open source framework for distributed evolutionary algorithms75%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Evvo – an open source framework for distributed evolutionary algorithms

Hacker News3
Me
MetricFlow – open-source metric framework81%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

MetricFlow – open-source metric framework

Hacker News98
Di
Dissect – An open source DFIR framework73%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Dissect – An open source DFIR framework

Hacker News8
RedBlue
RedBlue48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Open-Source Hypervideo Framework

Indie Hackers1apis
ZenML
ZenML50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

extensible, open-source MLOps framework

Indie Hackers4$1/moai
Op
Open source SSH honeypot with an API78%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Open source SSH honeypot with an API

Hacker News49
Au
Autotool – open-source gradual automation58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Autotool – open-source gradual automation

Hacker News6
SS
SSH Ncurses open source interface72%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

SSH Ncurses open source interface

Hacker News3
Kubestack
Kubestack22%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Open-source Terraform Gitops Framework for Teams

Indie Hackers3open-source
Op
Open-Source GitOps Framework for K8s Based on Terraform and Kustomize65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Open-Source GitOps Framework for K8s Based on Terraform and Kustomize

Hacker News10