我们发现了什么
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 co
- 来源:Hacker News(发现于 2026-07-27)
- 证据等级:C · 存在定价或订阅线索;有收费设计不等于已有收入。
- 商业模式:Subscription SaaS
- 主题:开发者工具
- 初筛评分:17.6/100 · 收录 1 次
证据,比故事更重要。
规则清洗与初筛,未经人工商业核验。原文语境、实际客户和付费情况仍需自行验证。
引用与数字披露
来源类型(原作者自述/第三方测算/媒体转引)需采集端标注,本版尚未落字段。
- 作者
- 未标注
- 抓取日期
- 来源类型
- 未标注
- 币种
- 未标注
- 口径
- 未标注
- 披露主体
- 未标注
- 披露日期
- 未标注
中文辅助译文(来源摘要)
无论是作为软件工程师工作时,还是在私人生活中,我一直遇到同样的问题:在终端中工作时,我希望能够使用 AI 来理解最近的输出或编写命令。在聊天窗口和终端之间复制粘贴上下文既繁琐,提前运行完整的 CLI 编码代理又会丢掉在 shell 中工作的所有效率。这两种工作流程都不理想。我真正想要的是让我已经在使用的编码代理在需要时弹出到我的终端中,其余时间则完全隐形。我找不到任何适合的现有工具。iTerm2 的 AI 功能不允许我使用现有的 AI 订阅;Warp 则需要更换整个终端模拟器和工作流程(并新增一份订阅)。我想要的是一个透明的包装器,可以与我的现有工具协同工作,在被快捷键召唤之前完全保持隐形。架构 我从优秀的 mprocs(作者 pvolok)的代码库入手,用于处理终端模拟和渲染。我使用 Claude 和 Codex 剥离了 mprocs 特有的代码,为 AI 的终端添加了按需覆盖层,并加入了一个 MCP 服务器。通过 CLI 标志,MCP 服务器被注入到 AI 代理的配置中,并向系统提示添加了说明 AI 应如何与终端交互的指令。代理可以检索终端内容、元数据和历史记录,并在发送给访客终端之前由用户批准输入。AI 同时还被赋予一个具有与 MCP 服务器相同功能的 CLI 命令,供不支持 MCP 的代理使用,或者用于将输出管道传输而不是将其倾倒进 AI 的上下文中。困难的部分:让它真正透明 如果你是重度终端用户,你就知道 TUI 渲染有多么脆弱。
要让覆盖层完全无缝,需要分叉 ratatui TUI 工具包和 rat-salsa 组件库,以解决三个底层问题: 终端滚动回溯:大多数 TUI 会管理自己的缓冲区,不会让任何内容进入终端的滚动回溯区,这是一个完全不可接受的方案。在几次尝试可靠地将行推入滚动回溯失败后,我最终采用了老办法:将它们写在屏幕顶部,并附加足够多的换行符以强制原生终端滚动。这需要修改 TUI 框架 ratatui,使其能够以这种方式进行渲染,同时保持其内部缓冲区。复制粘贴被破坏:行末的空白被作为字面空格字符写入终端,破坏了原生的文本选择和复制功能。我通过在渲染第一个空单元格时清除该行的其余部分,然后从下一行继续渲染来解决这个问题。每行的行尾都被复制为换行符。我通过确保 ratatui 使用宿主终端进行换行,而不是将光标移到下一行的开头来解决此问题。希望你能试一试!快速概览: 许可证:MIT 语言:用 Rust 编写(出于效率、显式错误处理以及让类型系统强制执行不变量的考虑)。隐私:零遥测、跟踪或数据收集。日志本地存储以支持调试。安全性:MCP 服务器运行在 127.0.0.1 上的 http 服务器,受运行时生成的密钥的 bearer 身份验证保护,并通过环境变量传递给 AI 代理。支持从环境变量进行身份验证的 AI 代理可直接使用它;不支持的代理可以将 terminai 子命令作为 stdio MCP 服务器使用,该服务器会读取环境变量并将请求代理到 http 服务器。提供与 MCP 服务器相同工具的 CLI 工具以相同方式运行。
氛围编码(Vibe coded):毫不掩饰地主要由 Claude 和 Codex 完成编写。我就如何完成任务向 AI 提供了大量指导,并要求进行广泛的测试,但大部分代码从未经过人眼审视。最终的功能和稳定性不言自明。
译文由上游机器翻译生成,可能有误;判断请以英文原文为准。
英文原文(来源本站未改写)
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.
这条还缺什么证据?
下面每条都由本条已有字段推出(等级、理由、商业模式、来源次数、是否演示), 本站不生成推测性结论;通用验证方法放在方法论页。
- 可核验的收入或付费证据查官网定价页与付费口径;第三方数据源(如 GetLatka)只作旁证,需标注来源与时点。
- 只有单一来源找一手站点或其他渠道是否重复出现同一产品;社区热帖数量不等于商业进展。
通用验证清单(谁有这个问题/谁愿意付费/一个人能交付哪一小步)见我们的筛选方法。