20250728-Announcing_Toad_-_a_universal_UI_for_agentic_codin

原文摘要

Announcing Toad - a universal UI for agentic coding in the terminal

Will McGugan is building his own take on a terminal coding assistant, in the style of Claude Code and Gemini CLI, using his Textual Python library as the display layer.

Will makes some confident claims about this being a better approach than the Node UI libraries used in those other tools:

Both Anthropic and Google’s apps flicker due to the way they perform visual updates. These apps update the terminal by removing the previous lines and writing new output (even if only a single line needs to change). This is a surprisingly expensive operation in terminals, and has a high likelihood you will see a partial frame—which will be perceived as flicker. [...]

Toad doesn’t suffer from these issues. There is no flicker, as it can update partial regions of the output as small as a single character. You can also scroll back up and interact with anything that was previously written, including copying un-garbled output — even if it is cropped.

Using Node.js for terminal apps means that users with npx can run them easily without worrying too much about installation - Will points out that uvx has closed the developer experience there for tools written in Python.

Toad will be open source eventually, but is currently in a private preview that's open to companies who sponsor Will's work for $5,000:

[...] you can gain access to Toad by sponsoring me on GitHub sponsors. I anticipate Toad being used by various commercial organizations where $5K a month wouldn't be a big ask. So consider this a buy-in to influence the project for communal benefit at this early stage.

With a bit of luck, this sabbatical needn't eat in to my retirement fund too much. If it goes well, it may even become my full-time gig.

I really hope this works! It would be great to see this kind of model proven as a new way to financially support experimental open source projects of this nature.

I wrote about Textual's streaming markdown implementation the other day, and this post goes into a whole lot more detail about optimizations Will has discovered for making that work better.

The key optimization is to only re-render the last displayed block of the Markdown document, which might be a paragraph or a heading or a table or list, avoiding having to re-render the entire thing any time a token is added to it... with one important catch:

It turns out that the very last block can change its type when you add new content. Consider a table where the first tokens add the headers to the table. The parser considers that text to be a simple paragraph block up until the entire row has arrived, and then all-of-a-sudden the paragraph becomes a table.

<p>Tags: <a href="https://simonwillison.net/tags/open-source">open-source</a>, <a href="https://simonwillison.net/tags/markdown">markdown</a>, <a href="https://simonwillison.net/tags/ai">ai</a>, <a href="https://simonwillison.net/tags/will-mcgugan">will-mcgugan</a>, <a href="https://simonwillison.net/tags/generative-ai">generative-ai</a>, <a href="https://simonwillison.net/tags/llms">llms</a>, <a href="https://simonwillison.net/tags/uv">uv</a>, <a href="https://simonwillison.net/tags/coding-agents">coding-agents</a></p>

原文链接

进一步信息揣测

  • 终端UI性能优化内幕:主流Node.js终端工具(如Claude Code、Gemini CLI)通过重写整个屏幕区域实现更新,导致明显的闪烁问题。而Toad利用Textual库实现字符级局部更新,避免了这一性能陷阱,这是通过底层终端渲染技术实现的优化。
  • 商业化开源项目的早期策略:Toad采用“付费预览”模式,企业需每月赞助5,000美元获取早期访问权。这种模式既为开发者提供资金支持,又让赞助方获得项目方向的影响力,是一种高风险高回报的开源变现尝试。
  • Python工具链的隐藏优势uvx工具(可能指uv或类似工具)解决了Python应用的分发难题,使其能像Node.js的npx一样实现免安装运行,这一细节未被广泛宣传但极大改善了开发者体验。
  • Markdown流式渲染的坑:动态Markdown渲染时,仅重绘最后一块内容可大幅提升性能,但需处理块类型突变问题(如段落突然转为表格)。这种极端案例的解决方案是实践中积累的关键经验。
  • 终端交互的未公开能力:Toad支持回溯并操作历史输出(如复制裁剪内容),这需要终端控制序列的深度定制,绝大多数终端工具因技术限制无法实现。
  • 开发者财务动机:Will McGugan明确将Toad视为潜在全职项目,暗示当前开源生态中实验性项目需依赖企业赞助才能持续,而非传统捐赠或SaaS模式。
  • 竞品技术缺陷的利用:直接指出Anthropic和Google终端工具的闪烁问题,暗示其团队可能未深入优化终端层渲染,这属于行业内部才知道的实现细节。