TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Best Way to Build MS-DOS-Style Text UI in the Browser?

6 点作者 3stripe大约 2 个月前
I&#x27;m working on a web app that mimics the look and feel of an old MS-DOS program—think Turbo Pascal IDE or Norton Commander.<p>The goal* is a keyboard-only, text-based UI running inside a browser, with windowed UI elements and ASCII graphics.<p>I&#x27;ve looked into Xterm.js, React TUI libraries, and vanilla JS canvas solutions, but I&#x27;d love input from those who&#x27;ve built something similar.<p>Are there any existing projects or libraries I should check out?<p>Would appreciate any insights, cheers!<p>(*And the ultimate end goal is to have an LLM create interfaces on the fly from user prompts)

3 条评论

dtagames大约 2 个月前
It&#x27;s pretty simple to get a font that looks like DOS, render an &lt;input&gt; tag with custom styling for the command line entry, and an output window for the scrolling portion that copied the last input into the output and then cleared the input.<p>You can use CSS to make the scrolling window grow from the bottom to the top of the screen, like a DOS window would scroll up and then off.<p>If this were my project, I&#x27;d start with plain browser web components[0] rather than a framework. You could definitely have Cursor write the UI portion for you and then, once you like it, add the command handling.<p>I wrote an article[1] with some strategies and examples of this kind of complex prompt-driven development with Cursor.<p>[0] <a href="https:&#x2F;&#x2F;levelup.gitconnected.com&#x2F;getting-started-with-web-components-lit-part-1-911aa7058e9b" rel="nofollow">https:&#x2F;&#x2F;levelup.gitconnected.com&#x2F;getting-started-with-web-co...</a><p>[1] <a href="https:&#x2F;&#x2F;levelup.gitconnected.com&#x2F;license-to-kill-coding-with-cursor-ai-agents-1df3d6a0bfe8" rel="nofollow">https:&#x2F;&#x2F;levelup.gitconnected.com&#x2F;license-to-kill-coding-with...</a>
johng大约 2 个月前
I&#x27;ve seen a DOS interface for the browser talked about on HN before. I know I&#x27;ve seen at least one that was really impressive but I can&#x27;t find the link... it was in a comment. And it wasn&#x27;t one of the ones you mentioned I don&#x27;t think.<p>Ahhh, here ya go: <a href="https:&#x2F;&#x2F;github.com&#x2F;vinibiavatti1&#x2F;TuiCss" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;vinibiavatti1&#x2F;TuiCss</a><p>via: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28804309">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28804309</a><p>There may be more too: <a href="https:&#x2F;&#x2F;kristopolous.github.io&#x2F;BOOTSTRA.386&#x2F;" rel="nofollow">https:&#x2F;&#x2F;kristopolous.github.io&#x2F;BOOTSTRA.386&#x2F;</a><p>Edit: I also found this: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37418424">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=37418424</a>
评论 #43379122 未加载
dlcarrier大约 2 个月前
The most popular GUI tool for terminals is called ncurses. There is a JavaScript implementation in a tool called Blessed.<p>You can also find a lot of similar projects by searching for ncurses along with HTML or JavaScript or CSS.