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

  • It's pretty simple to get a font that looks like DOS, render an <input> 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.

    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.

    If this were my project, I'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.

    I wrote an article[1] with some strategies and examples of this kind of complex prompt-driven development with Cursor.

    [0] https://levelup.gitconnected.com/getting-started-with-web-co...

    [1] https://levelup.gitconnected.com/license-to-kill-coding-with...

  • I've seen a DOS interface for the browser talked about on HN before. I know I've seen at least one that was really impressive but I can't find the link... it was in a comment. And it wasn't one of the ones you mentioned I don't think.

    Ahhh, here ya go: https://github.com/vinibiavatti1/TuiCss

    via: https://news.ycombinator.com/item?id=28804309

    There may be more too: https://kristopolous.github.io/BOOTSTRA.386/

    Edit: I also found this: https://news.ycombinator.com/item?id=37418424

  • The most popular GUI tool for terminals is called ncurses. There is a JavaScript implementation in a tool called Blessed.

    You can also find a lot of similar projects by searching for ncurses along with HTML or JavaScript or CSS.