frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Transcribe your aunts post cards with Gemini 3 Pro

https://leserli.ch/ocr/
1•nielstron•3m ago•0 comments

.72% Variance Lance

1•mav5431•4m ago•0 comments

ReKindle – web-based operating system designed specifically for E-ink devices

https://rekindle.ink
1•JSLegendDev•5m ago•0 comments

Encrypt It

https://encryptitalready.org/
1•u1hcw9nx•5m ago•0 comments

NextMatch – 5-minute video speed dating to reduce ghosting

https://nextmatchdating.netlify.app/
1•Halinani8•6m ago•1 comments

Personalizing esketamine treatment in TRD and TRBD

https://www.frontiersin.org/articles/10.3389/fpsyt.2025.1736114
1•PaulHoule•8m ago•0 comments

SpaceKit.xyz – a browser‑native VM for decentralized compute

https://spacekit.xyz
1•astorrivera•9m ago•1 comments

NotebookLM: The AI that only learns from you

https://byandrev.dev/en/blog/what-is-notebooklm
1•byandrev•9m ago•1 comments

Show HN: An open-source starter kit for developing with Postgres and ClickHouse

https://github.com/ClickHouse/postgres-clickhouse-stack
1•saisrirampur•9m ago•0 comments

Game Boy Advance d-pad capacitor measurements

https://gekkio.fi/blog/2026/game-boy-advance-d-pad-capacitor-measurements/
1•todsacerdoti•10m ago•0 comments

South Korean crypto firm accidentally sends $44B in bitcoins to users

https://www.reuters.com/world/asia-pacific/crypto-firm-accidentally-sends-44-billion-bitcoins-use...
2•layer8•10m ago•0 comments

Apache Poison Fountain

https://gist.github.com/jwakely/a511a5cab5eb36d088ecd1659fcee1d5
1•atomic128•12m ago•2 comments

Web.whatsapp.com appears to be having issues syncing and sending messages

http://web.whatsapp.com
1•sabujp•13m ago•2 comments

Google in Your Terminal

https://gogcli.sh/
1•johlo•14m ago•0 comments

Shannon: Claude Code for Pen Testing: #1 on Github today

https://github.com/KeygraphHQ/shannon
1•hendler•14m ago•0 comments

Anthropic: Latest Claude model finds more than 500 vulnerabilities

https://www.scworld.com/news/anthropic-latest-claude-model-finds-more-than-500-vulnerabilities
2•Bender•19m ago•0 comments

Brooklyn cemetery plans human composting option, stirring interest and debate

https://www.cbsnews.com/newyork/news/brooklyn-green-wood-cemetery-human-composting/
1•geox•19m ago•0 comments

Why the 'Strivers' Are Right

https://greyenlightenment.com/2026/02/03/the-strivers-were-right-all-along/
1•paulpauper•20m ago•0 comments

Brain Dumps as a Literary Form

https://davegriffith.substack.com/p/brain-dumps-as-a-literary-form
1•gmays•21m ago•0 comments

Agentic Coding and the Problem of Oracles

https://epkconsulting.substack.com/p/agentic-coding-and-the-problem-of
1•qingsworkshop•21m ago•0 comments

Malicious packages for dYdX cryptocurrency exchange empties user wallets

https://arstechnica.com/security/2026/02/malicious-packages-for-dydx-cryptocurrency-exchange-empt...
1•Bender•21m ago•0 comments

Show HN: I built a <400ms latency voice agent that runs on a 4gb vram GTX 1650"

https://github.com/pheonix-delta/axiom-voice-agent
1•shubham-coder•22m ago•0 comments

Penisgate erupts at Olympics; scandal exposes risks of bulking your bulge

https://arstechnica.com/health/2026/02/penisgate-erupts-at-olympics-scandal-exposes-risks-of-bulk...
4•Bender•23m ago•0 comments

Arcan Explained: A browser for different webs

https://arcan-fe.com/2026/01/26/arcan-explained-a-browser-for-different-webs/
1•fanf2•24m ago•0 comments

What did we learn from the AI Village in 2025?

https://theaidigest.org/village/blog/what-we-learned-2025
1•mrkO99•25m ago•0 comments

An open replacement for the IBM 3174 Establishment Controller

https://github.com/lowobservable/oec
1•bri3d•27m ago•0 comments

The P in PGP isn't for pain: encrypting emails in the browser

https://ckardaris.github.io/blog/2026/02/07/encrypted-email.html
2•ckardaris•29m ago•0 comments

Show HN: Mirror Parliament where users vote on top of politicians and draft laws

https://github.com/fokdelafons/lustra
1•fokdelafons•30m ago•1 comments

Ask HN: Opus 4.6 ignoring instructions, how to use 4.5 in Claude Code instead?

1•Chance-Device•31m ago•0 comments

We Mourn Our Craft

https://nolanlawson.com/2026/02/07/we-mourn-our-craft/
2•ColinWright•34m ago•0 comments
Open in hackernews

Ask HN: How to Extract Shell Commands from Raw PTY Sessions? (Rewindtty)

2•debba•6mo ago
Project URL: https://github.com/debba/rewindtty

I've been working on rewindtty, a lightweight terminal session recorder and replayer written in C. It works like script/scriptreplay, but outputs structured JSON and includes a browser-based player for replaying terminal sessions with timing, scrubbing, bookmarks, and more.

Until now, I was recording sessions command-by-command, capturing each shell command and its output separately. That made it easy to analyze sessions and index them by command.

However, I just introduced a new interactive mode, which behaves more like traditional script: it records raw terminal I/O in real-time via a PTY, capturing every character typed or displayed, including control sequences.

This is great for realism and full session fidelity (e.g. interactive tools like htop, vim, REPLs), but it makes command detection much harder — I'm no longer intercepting input at the shell level.

My question is: how can I extract actual commands from this raw PTY stream?

I'm aware it's tricky, but I'm wondering:

    Has anyone tried parsing the ANSI stream to reconstruct command boundaries?

    Is it possible to hook into the shell (bash, zsh, etc.) in real-time to intercept commands?

    Are there shell options or audit features that can be leveraged in parallel to raw capture?

    Any prior art or libraries I should look at?
I'd love to hear how others have approached this — either for recording, analyzing, or replaying shell sessions. Any insights or directions would be super helpful.

Comments

ksherlock•6mo ago
For bash, you can use `trap [code] DEBUG` to run your code before the command executes. $BASH_COMMAND should be the set to the command that's going to run.

Alternatively, look at the $PROMPT_COMMAND which runs before printing the $PS1 prompt (so maybe you could check `history 1` to get the command afterwards)

debba•6mo ago
I will check thanks, need to find a solution common for every shell.