Back to browse
GitHub Repository

Simulate laggy SSH, flaky 3G, or 9600 baud serial links for local terminal apps. A userspace PTY wrapper with controllable latency, jitter, and bandwidth shaping.

11 starsGo

Ttylag – A userspace PTY wrapper to simulate slow/laggy terminals

by cbrunnkvist·Mar 8, 2026·1 point·0 comments

AI Analysis

●●●BangerWizardryShip ItSolve My Problem

Chaos-test your terminal app with 500ms RTT without leaving the terminal.

Strengths
  • Userspace-only PTY wrapper needs no root or tc queue disciplines, just works
  • Bidirectional latency shaping with jitter and serial emulation (9600 baud)
  • Clean preset profiles (3g, 2400) reduce boilerplate for common scenarios
Weaknesses
  • Niche audience: only relevant to TUI developers and terminal testers
  • Limited to local testing; doesn't address remote SSH lag authenticity
Target Audience

TUI developers, QA engineers, terminal app maintainers testing slow connections

Similar To

tc (tc qdisc) · NetLimiter · clumsy

Post Description

If you've ever wanted to expose your fancy-schmanzy TUI to some chaos engineering and see how it handles 500ms jitter, without actually having to find a bad Wi-Fi spot, I built a tool for you!

ttylag wraps any command in a "shaped" PTY. No difficult piping, no tc queue disciplines required. It handles RTT, jitter, it lags in both directions and even has a --bits-per-byte flag (if you're into that sort of thing).

It's userspace-only, works on macOS and probably Linux too without any messing with network namespaces or firewall rules.

Similar Projects