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.