In

Integrate any CLI agent into any terminal

Hacker News

Integrate any CLI agent into any terminal

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.

Share card

Actual performance

3points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Product HuntOn track for Day 1 leaderboard · Strong signals: agents, agent, cursor · Missing: mac, macos, model
99%99% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Indie HackersFits the IH revenue-focused audience · Strong signals: started · Missing: supports, reddit linkedin, podcasting
91%91% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Strong signals: way · Missing: mobile apps, ios, personal
44%44% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: exist, existing, ide · Missing: https docs, excited, just released
38%38% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Strong signals: host · Missing: plus, platform, intuitive
30%30% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Strong signals: subscription · Missing: arr, mrr, revenue
21%21% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: chat · Missing: web3, crypto, cryptocurrency
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Go
Goto: CLI for teleporting with your terminal51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Goto: CLI for teleporting with your terminal

Hacker News2
Et
Ethereum Terminal CLI55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Ethereum Terminal CLI

Hacker News2
NB
NBA CLI app – Basketball in your terminal27%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

NBA CLI app – Basketball in your terminal

Hacker News2
Di
Discuss CLI – No more reviewing agent plans in the terminal43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Discuss CLI – No more reviewing agent plans in the terminal

Hacker News1
Ho
How we integrate Dropbox52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

How we integrate Dropbox

Hacker News1
Ember Mug CLI
Ember Mug CLI84%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Control your ember mug from the terminal

Product Hunt+107Open Source
Sl
Sllm.nvim – Integrate Simon’s LLM cli into Neovim (500 LOC Lua)60%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Sllm.nvim – Integrate Simon’s LLM cli into Neovim (500 LOC Lua)

Hacker News4
Co
Collective CLI wisdom for the new terminal agent36%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Collective CLI wisdom for the new terminal agent

Hacker News2
Buttons CLI
Buttons CLI63%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The terminal app for regular people not nerds

Indie Hackers1$1,500/moai
Ke
Keepcli – Simple and Unofficial Terminal CLI for Google Keep52%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Keepcli – Simple and Unofficial Terminal CLI for Google Keep

Hacker News1