▲ | debba 6 days ago | |||||||
Hi HN, I built rewindtty, a small tool in C that lets you record a terminal session and later replay it, using a simple JSON log format that includes: - timestamp - command (user input) - output (stdout) - stderr It works like this: - rewindtty record session.json # Runs a shell, records the session - rewindtty replay session.json # Replays it step by step Under the hood: - Uses fork() to manage the pseudo-terminal - Captures stdout/stderr with timestamps - Stores everything in structured JSON for easy analysis, replay or transformation Why I made this: I wanted a minimal tool to track terminal interactions — for debugging, documentation, and reproducibility — without relying on heavier tools or external formats. It’s still early, but the core works and I’d love feedback or suggestions. | ||||||||
▲ | sunscream89 6 days ago | parent | next [-] | |||||||
You have scratched a long persistent itch. Good work! And I love that you used c. Nothing against rust, or (ahem) “go”, but it’s good to see you doing something in c! | ||||||||
| ||||||||
▲ | happens 2 days ago | parent | prev [-] | |||||||
How does it deal with escape sequences? Does it just record them verbatim? |