frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Integrate any CLI agent into any terminal

https://terminai.app
2•emosenkis•1h ago
Whether at work as a software engineer or in my private life, I kept running into the same problem: While working in my terminal, I’d wish I could use AI to make sense of recent output or compose a command. Copying and pasting context between a chat and the terminal was tedious and preemptively running a full CLI coding agent threw away all the efficiency of working in a shell. Both workflows were far from ideal.

What I really wanted was for the coding agents I already used to pop into my terminal when needed, staying invisible the rest of the time.

I couldn't find any existing tools that fit. iTerm2’s AI features don't let me use my existing AI subscriptions, Warp requires changing your entire terminal emulator and workflow (and a new subscription). I wanted a transparent wrapper that could work with my existing tools, staying completely invisible until summoned with a shortcut.

Architecture

I started from the codebase of the excellent mprocs by pvolok to handle terminal emulation and rendering. I used Claude and Codex to strip out the mprocs-specific code, add an on-demand overlay for the AI's terminal, and add an MCP server. Using CLI flags, the MCP server is injected into the AI agent’s config and instructions are added to the system prompt that explain how the AI should interact with the terminal.

The agent can retrieve terminal content, metadata and history, and send input to be approved by the user before being sent to the guest terminal. The AI is also given a CLI command with all the same functionality as the MCP server for agents that don't support MCP or for piping the output instead of dumping it into the AI’s context.

The Hard Part: Making it Truly Transparent

If you are a heavy terminal user, you know how fragile TUI rendering can be. Making the overlay completely seamless required forking the ratatui TUI toolkit and the rat-salsa widget library to solve three low-level problems:

Terminal Scrollback: Most TUIs manage their own buffer without anything going into the terminal’s scrollback, which was a total nonstarter. After several failed attempts to reliably push lines into the scrollback, I landed on using the old-fashioned way: writing them at the top of the screen and appending enough newlines to force a native terminal scroll. This required modifications to ratatui, the TUI framework, to enable it to render this way while maintaining its internal buffer.

Broken Copy-Paste: Empty space at the end of lines was being written to the terminal as literal space characters, which broke native text selection and copying. I fixed this by clearing the rest of the line upon rendering the first empty cell, then continuing from the next line. Every line ending was being copied as a line feed. I fixed that by ensuring that ratatui used the host terminal for line wrapping instead of moving the cursor to the beginning of the next line.

I hope you'll give it a try!

Quick Stats:

License: MIT

Language: Written in Rust (for efficiency, explicit error handling, and letting the type system enforce invariants).

Privacy: Zero telemetry, tracking, or data collection. Logs are stored locally to enable debugging.

Security: The MCP server uses an http server on 127.0.0.1 that is protected by a bearer auth with the secret generated at runtime and passed to the AI agent via environment variable. AI agents that support auth from an environment variable can use it directly and those that don't can use a terminai subcommands as a stdio MCP server which will read the env var and proxy requests to the http server. The CLI tool that offers the same tools as the MCP server operates the same way.

Vibe coded: Unabashedly written mostly by Claude and Codex. I have given a lot of direction to the AI in terms of how to accomplish tasks and demanded extensive testing but most of the code has never been seen by human eyes. The resulting functionality and stability speak for themselves.

Show HN: ScreenFocus – keyboard focus follows the pointer across Mac displays

https://github.com/therohitdas/ScreenFocus
1•therohitdas•1m ago•0 comments

Choose Boring Technology

https://boringtechnology.club/
1•ustad•1m ago•0 comments

Show HN: VoiceScroll – a teleprompter that scrolls as you speak

https://www.voice-scroll.com
1•sangkwun•4m ago•0 comments

Best Window Air Conditioners of 2026: Midea, Zafro, GE

https://www.wired.com/gallery/best-window-air-conditioners/
1•joozio•7m ago•0 comments

Connection-Agnostic Presence Tracking for Stateless Distributed Back Ends

1•duckydude20•7m ago•0 comments

Show HN: Inflect TTS v2+ONNX, 9M/4M text-to-speech models running in the browser

https://inflect-tts.geronimo-labs.com
2•g58892881•10m ago•0 comments

Skateboarding Forum on Wood Quality

https://www.slapmagazine.com/index.php?topic=120409.0
1•marysminefnuf•11m ago•0 comments

Ask HN: Is Your Work Relaxing?

1•julienreszka•13m ago•0 comments

Sequentialising Parallel Moves

https://compiler.club/parallel-moves/
1•g0xA52A2A•18m ago•0 comments

Show HN: Mousecrack – Bypass agent mouse detection with deep learning

https://github.com/puffinsoft/mousecrack
1•G3819•22m ago•0 comments

Show HN: Pg_stat_ch, a Postgres extension to export every metric to ClickHouse

https://github.com/ClickHouse/pg_stat_ch
1•saisrirampur•27m ago•0 comments

WezTerm Config Guide

https://gilbertsanchez.com/posts/my-terminal-wezterm/
1•ankitg12•28m ago•0 comments

Stack Overflow for Agents

https://stackoverflow.blog/2026/06/10/announcing-stack-overflow-for-agents/
1•taubek•30m ago•0 comments

LaunchRanks – Get actionable SEO steps for growing site authority

https://launchranks.com
1•NataliNy•36m ago•0 comments

Show HN: Record a click-through demo from a Markdown plan into one HTML file

https://github.com/justrinari/handoff
3•justrinari•38m ago•0 comments

Show HN: I built an AI that roasts GitHub profiles

https://gitroast-kappa.vercel.app/
2•hito20•40m ago•1 comments

Vision 50 Years Phone – Keeping old Android phones fast without root

https://github.com/50YearsPhone/vision-50-years-phone
1•mike5gao•41m ago•0 comments

Eve.dev: Next.js for Agents

https://eve.dev/
1•javiercr•41m ago•0 comments

Hans Moravec was right about AI

https://nymag.com/intelligencer/article/hans-moravec-interview.html
1•anath2•47m ago•0 comments

Watching Go's new garbage collector move through the heap

https://theconsensus.dev/p/2026/07/19/observing-gos-garbage-collector-old-and-new.html
1•ksec•47m ago•0 comments

GrapheneOS duress PIN could land a man in prison

https://www.androidauthority.com/grapheneos-duress-pin-us-prosecution-3691271/
1•kitd•52m ago•0 comments

The Algorithmic Atelier

https://www.doc.cc/articles/the-algorithmic-atelier
1•kaizenb•54m ago•0 comments

Operating a computer with your tongue: the Augmental MouthPad [video]

https://www.youtube.com/watch?v=xReyIF5pwRo
1•jibcage•56m ago•0 comments

'Who wants to be hired' now outnumbers 'Who is hiring'

https://ej29-r3d.github.io/hacker-news-hiring-trends/
1•Tronickle•57m ago•1 comments

Discord Must Verify Texas Users' Age Under Judge's Ruling

https://news.bloomberglaw.com/litigation/discord-must-verify-texas-users-age-under-judges-ruling
1•1vuio0pswjnm7•59m ago•0 comments

LA Social Media Trial Dismissal Leaves Landscape of Cases

https://news.bloomberglaw.com/litigation/la-social-media-trial-dismissal-leaves-vast-landscape-of...
1•1vuio0pswjnm7•1h ago•0 comments

Error Certificates for KV-Cache Eviction via Randomized Design

https://arxiv.org/abs/2607.21475
1•sbulaev•1h ago•0 comments

Show HN: Integrate any CLI agent into any terminal

https://terminai.app
2•emosenkis•1h ago•0 comments

Databrick Genie

https://www.getwren.ai/post/genie-meter-is-on-roi-of-owning-your-genbi
1•xingfu•1h ago•0 comments

Google Can't Block Ex-NPR Host Voice Suit with Copyright Shield

https://news.bloomberglaw.com/ip-law/google-cant-block-ex-npr-host-voice-suit-with-copyright-shield
1•1vuio0pswjnm7•1h ago•0 comments