frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Rewindtty – Record and replay terminal sessions as structured JSON

https://github.com/debba/rewindtty
30•debba•3d ago

Comments

debba•3d 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.

GitHub: https://github.com/debba/rewindtty

sunscream89•3d ago
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!

debba•3d ago
Yeah, it’s just a side project for now, but I’m hoping to make it more solid over time. As for C, I wanted to challenge myself and step away from what I usually do — try something a bit different.
loloquwowndueo•14h ago
Is this ttyrec with json output?
debba•14h ago
yes exactly
JdeBP•14h ago
No.

Because checking some of the Debian patches accrued against ttyrec, and the source to rewindtty, it seems that rewindtty does not have some of the common programming mistakes that the author of ttyrec made a quarter of a century ago.

* https://sources.debian.org/src/ttyrec/1.1.7.1-1/debian/patch...

* https://github.com/debba/rewindtty/blob/develop/src/recorder...

* https://github.com/mjording/ttyrec/blob/master/ttyrec.c#L328

rewindtty will error out if the SHELL environment variable's value does not have a directory prefix, but at least it won't outright crash. (-:

JdeBP•14h ago
By the way, debba: execvp()/execlp() and _PATH_BSHELL out of <paths.h> as the fallback are the ways to go, here.
debba•12h ago
Ouch sorry, I thought you meant 'it has the same features as ttyrec with JSON output.' Regarding the issue, I need to go into a bit more detail; if you like, feel free to make a PR on GitHub.
debba•12h ago
sorry, in the last reply I told you 'yes, exactly'. I meant It has the same features as ttyrec with JSON output
Waraqa•13h ago
Have you made an online demo for the browser player? I guess it will have potential uses in tutorials
debba•12h ago
Not for now. That's a side project and it is really new and still a bit rough around the edges; it’s only a few days old. I’ll do it soon, meanwhile if you want to contribute you’re welcome :)
reagle•12h ago
On github, I see an asciinema tag, but no explanation of the differences?
debba•12h ago
It's not related to asciinema, it's a totally different project. Asciinema is a much more complex and structured project than mine; mine is the result of a few hours of free time—I was looking for a lighter solution.

Cerebras Code

https://www.cerebras.ai/blog/introducing-cerebras-code
208•d3vr•5h ago•91 comments

Coffeematic PC – A coffee maker computer that pumps hot coffee to the CPU

https://www.dougmacdowell.com/coffeematic-pc.html
124•dougdude3339•5h ago•30 comments

The Rickover Corpus: A digital archive of Admiral Rickover's speeches and memos

https://rickovercorpus.org/
20•stmw•2h ago•1 comments

Hardening Mode for the Compiler

https://discourse.llvm.org/t/rfc-hardening-mode-for-the-compiler/87660
6•vitaut•1h ago•0 comments

Show HN: Draw a fish and watch it swim with the others

https://drawafish.com
790•hallak•3d ago•207 comments

Weather Model based on ADS-B

https://obrhubr.org/adsb-weather-model
81•surprisetalk•2d ago•16 comments

Ethersync: Peer-to-peer collaborative editing of local text files

https://github.com/ethersync/ethersync
61•blinry•3d ago•8 comments

At 17, Hannah Cairo solved a major math mystery

https://www.quantamagazine.org/at-17-hannah-cairo-solved-a-major-math-mystery-20250801/
232•baruchel•10h ago•119 comments

Native Sparse Attention

https://aclanthology.org/2025.acl-long.1126/
83•CalmStorm•7h ago•9 comments

I couldn't submit a PR, so I got hired and fixed it myself

https://www.skeptrune.com/posts/doing-the-little-things/
196•skeptrune•10h ago•115 comments

Ask HN: Who is hiring? (August 2025)

160•whoishiring•12h ago•192 comments

Gemini 2.5 Deep Think

https://blog.google/products/gemini/gemini-2-5-deep-think/
416•meetpateltech•16h ago•207 comments

Does the Bitter Lesson Have Limits?

https://www.dbreunig.com/2025/08/01/does-the-bitter-lesson-have-limits.html
101•dbreunig•6h ago•55 comments

Researchers map where solar energy delivers the biggest climate payoff

https://www.rutgers.edu/news/researchers-map-where-solar-energy-delivers-biggest-climate-payoff
62•rbanffy•6h ago•33 comments

The tradeoff between human and AI context

https://softwaredoug.com/blog/2025/07/30/layers-of-ai-coding
6•softwaredoug•2d ago•0 comments

Tesla owes small businesses millions in unpaid bills [video]

https://www.cnn.com/2025/08/01/politics/video/inv-musk-unpaid-bills
26•MBCook•55m ago•3 comments

Anthropic revokes OpenAI's access to Claude

https://www.wired.com/story/anthropic-revokes-openais-access-to-claude/
120•minimaxir•5h ago•47 comments

Twentyseven 1.0

https://blog.poisson.chat/posts/2025-08-01-twentyseven.html
27•082349872349872•5h ago•3 comments

JavaScript retro sound effects generator

https://github.grumdrig.com/jsfxr/
5•selvan•3d ago•0 comments

Self-Signed JWTs

https://www.selfref.com/self-signed-jwts
85•danscan•8h ago•42 comments

Peak Energy just shipped the US's first grid-scale sodium-ion battery

https://electrek.co/2025/07/30/peak-energy-us-first-grid-scale-sodium-ion-battery/
10•breve•39m ago•1 comments

Launch HN: Societies.io (YC W25) – AI simulations of your target audience

79•p-sharpe•15h ago•45 comments

Deep Agents

https://blog.langchain.com/deep-agents/
108•saikatsg•7h ago•33 comments

Ask HN: Who wants to be hired? (August 2025)

72•whoishiring•12h ago•169 comments

What's Not to Like?

https://theamericanscholar.org/whats-not-to-like/
20•wyndham•2d ago•13 comments

Coverage Cat (YC S22) Is Hiring a Senior, Staff, or Principal Engineer

https://www.coveragecat.com/careers/engineering/software-engineer
1•botacode•10h ago

Show HN: TraceRoot – Open-source agentic debugging for distributed services

https://github.com/traceroot-ai/traceroot
26•xinweihe•10h ago•5 comments

Meta violated privacy law, jury says in menstrual data fight

https://www.courthousenews.com/meta-violated-privacy-law-jury-says-in-menstrual-data-fight/
44•danso•2h ago•6 comments

Google shifts goo.gl policy: Inactive links deactivated, active links preserved

https://blog.google/technology/developers/googl-link-shortening-update/
195•shuuji3•9h ago•149 comments

Make Your Own Backup System – Part 2: Forging the FreeBSD Backup Stronghold

https://it-notes.dragas.net/2025/07/29/make-your-own-backup-system-part-2-forging-the-freebsd-backup-stronghold/
93•todsacerdoti•3d ago•3 comments