Show HN: Hntui – A TUI for Hacker News

(github.com)

111 points | by ahmd-sh a day ago ago

65 comments

  • sho_hn a day ago ago

    "Zig with TypeScript bindings and React components" for a TUI is definitely the wildest, weirdest stack for a given job I've seen.

  • dhanushnehru a day ago ago

    I'd recommend saving actual HN item IDs rather than feed positions. Since the front page reorders constantly, relying on item IDs makes returning to a saved thread completely predictable.

    • ahmd-sh a day ago ago

      hey thanks for your input. unless i'm misunderstanding, hntui does save/store HN item IDs (and the Saved tab refetches)... but i think you might be pointing somehting else out that i'm not seeing (maybe the cursor)?

  • rootnod3 a day ago ago

    That is a wild stack to use for a RSS feed.

    • dd8601fn a day ago ago

      It's also exactly the kind of thing that would have gotten my attention a few years ago, but now any chatbot could whip up in 20 minutes, exactly how you want it.

      Have opinions about the stack (for how little it matters)? Secrets storage and session management? Whatever you want, just say that. It ain't avionics.

      • dd8601fn a day ago ago

        I had it make me one on lunch. Works well... commenting from it now. Claude chose Go and Bubble Tea, for the curious.

      • ahmd-sh a day ago ago

        your point exactly. there's a fair bit of room for improving this relatively simple project, but it's mainly the look and feel i was after without shamelessly shipping slop

  • iugtmkbdfil834 a day ago ago

    Hmm, it is cool, but I feel obligated to ask why. Does it portend the future where we mostly interact with website through designated intermediaries that are not generic web browsers. I am not messing with you. I am curious what you envision.

    • ahmd-sh a day ago ago

      hey thanks for trying it out. honestly, this was just a fun selfish project because i'm really into the look and feel of tuis lately. there's no overarching vision with using tui/intermediaries for browsing the web, i believe browsers exist for a reason that LLMs haven't been able to replace yet :)

    • IceDane a day ago ago

      .. what? There are like hundreds of these and similar apps.

  • glitchc a day ago ago

    Thank you, I've been looking for a meaningful way to browse HN on my cyberdeck and this looks perfect.

    • nateb2022 a day ago ago

      As an aside, 'meaningful' is an obtuse adjective to use there; and it's typical of text generated by Claude.[0] I seem to see it a lot more frequently than pre-AI (~2022). Maybe my next project will be statistically analyzing word frequencies in HN comments pre-AI and post-AI.

      [0]: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=7031138

      • glitchc a day ago ago

        Thanks for you concern, I typed that message out by hand and genuinely meant it. The terseness stems from the use of a mobile phone, not Claude. As it happens, I don't have an Anthropic account, nor do I possess an OpenAI one. If you look at my comment history, you'll notice I've been around for a while (as I noticed, have you).

        • nateb2022 a day ago ago

          I think a lot of the focus on AI output poisoning future models' training has left their effects on our reasoning/ vocubulary neglected, which is why I brought it up.

          How we define words, what connotations they evince and the qualities they exude, simultaneously limits and enables thought.

    • ahmd-sh a day ago ago

      hey thanks for trying it out! :) also it would look sick on a cyberdeck!!

  • ahmd-sh a day ago ago

    wow this really blew up! it's so fulfilling and wild to see my post in the top page... using my tui! thanks guys, and i'll take all the valuable feedback into making this better.

  • ChaseRensberger a day ago ago

    I've been using https://github.com/bensadeh/circumflex for a while now, I like it a lot.

    • ahmd-sh a day ago ago

      ooo that looks nice, i'll check it out (and stea- ehm... bring over the good features to hntui). thanks! :)

    • jonny2811 a day ago ago

      i love me a good tui, but hackernews is one of the few websites that aren't a pain to use so i just browse it in firefox with vimium plugin.

      • ahmd-sh a day ago ago

        vimium is awesome. i'm getting used to it now.

  • sparrowidle a day ago ago

    Piping through readability before rendering is what made mine usable, raw html to markdown on news sites is mostly nav junk.

  • milhan00 a day ago ago

    It would be nice to read the articles in the terminal as well, maybe just as an markdown output.

    • ahmd-sh a day ago ago

      hey thanks for trying hntui out. that would be ideal, i honestly thought of hooking up brow.sh locally to achieve that. it just gets finicky with a few articles but is a decent experience. i'll keep testing and evaluate the option of a browser config for the tui so you can choose how you'd like to open the link.

  • ByteJoseph a day ago ago

    Does it support account login ?

    • ahmd-sh a day ago ago

      not yet mainly because the official api is read only and i didn't dabble in POST-ing. i will say that while building this out, my interest in being logged in to the tui declined and i enjoy just using it for reading. but that's not to say i'd block a feature because of my opinions on it. if i can make it happen, i will give the option :D

    • codetiger a day ago ago

      I was searching for upvote shortcut and realized it does not support login

      • KPGv2 a day ago ago

        Great! Get the News part of Hacker News without the Drama part of Hacker News. It's always better to increase friction to help you wean yourself off destructive habits like this one, where I'm spending time sending text to a stranger who will immediately discount my thoughts since I'm not them.

        Long time ago I had an extension for my browser that would "pause" every social media comment I made and do analysis to see if I was acting like a dick. Maybe I should get it working again.

        It all started when I found some website where you'd give it your Reddit account, and it'd do a bunch of processing and produce a report about how much you swore, if you had net favorability or not with up/down votes, sentiment analysis to see if you were coming from a place of friendship, etc. It really drove my behavior in a more positive direction.

        I'm a kind, not just nice, person IRL. But the Internet turns humans into text, and I was taught as a child to engage harshly and critically with all text. That is to say, I had good English lit teachers.

        • lolakutty a day ago ago

          >do analysis to see if I was acting like a dick...

          Saying something thought provoking is a lot more important than not acting like a dick. If you see a soiled 10$ bill and a nice calming nature photo on the side walk, which one would you pick before the wind blows them away?

        • sras-me a day ago ago

          > Get the News part of Hacker News without the Drama part of Hacker News

          https://sras.me/unireader/

          Reddit and YIFY ones are defunct now. Sorry.

  • shalaev_s a day ago ago

    Without Claude code demo it would be impossible to see how it works, nicely done

    • ahmd-sh a day ago ago

      thanks for trying it out mate :)

      also if you have bun, you can run it without installing it: bunx @ahmd-sh/hntui

  • keel-control a day ago ago

    why not use ratatui

    • ErenayDev a day ago ago

      maybe, the author isnot interested in low-level langs

      Edit: sorry, i was wrong. https://github.com/holo-q/ratatui-ts

      • keel-control a day ago ago

        I just rewrote it on my device in ratatui using codex in 16 minutes and it uses 10x less RAM 150MB -> 15MB

        the binary file is 10MB

        • ahmd-sh a day ago ago

          interesting, i wonder if the looks/animation work the same. i'd started with opentui and knew nothing about existing tui libraries like ratatui and bubbletea, but at ship time i did see the binary size was much more than i expected and that irked me. i wonder if that goes down too with ratatui.

          thanks for your feedback! :)

  • Surac a day ago ago

    No dependency, node.js in the next line.

    • ahmd-sh a day ago ago

      haha those 2 lines look awkward together at first glance. the binary doesn't need node/bun. the runtime is compiled into the executable (that's most of its size). :)

  • edweis a day ago ago

    Can you make an interactive ssh instead?

  • Yakobeen a day ago ago

    thanks for sharing! gonna try it out

    • ahmd-sh a day ago ago

      hey thank you for willing to try it out! hope you like it :)

  • suzukivenom a day ago ago

    just why

    • ahmd-sh a day ago ago

      for science, of course!

  • mst98 a day ago ago

    this is such a vibe

    • ahmd-sh 6 hours ago ago

      let's go! thanks for checking it out :)

  • nottorp a day ago ago

    How many fps can it do?

  • tamimio a day ago ago

    Loved it, thanks for sharing! If you can add logins and posting it would be great!

    • ahmd-sh a day ago ago

      hey thanks for trying it out! i want logins/posting as well, but it doesn't seem likely given their current api. but i will look into it more and hopefully be able to support it sometime in the future! :)

  • grim_io a day ago ago

    That's a lot of deps to read HN.

    Maybe your clanker can do it without.

    • MisterMunchkin a day ago ago

      And this is why people aren’t going out of the loop any time soon. A normie asks the bot to make a project, it produces nonsensical complexity like this.

      • TeMPOraL a day ago ago

        Except why would you waste your time on projects like these, if an LLM can zero-shot them for you?

        • nateb2022 a day ago ago

          You're restating their point. Normies' output will still be bad compared to the output that good engineers would produce, with or without AI. You wouldn't want to use poorly built software regardless of origin.

          • TeMPOraL a day ago ago

            Sure I would. I use it every day. Most software is crap, and it got worse once everything became a SaaS or embedded Chrome pretending to be a desktop app (or the worst, embedded Chrome loading a SaaS pretending to be a desktop app).

            Hell, half of my use of LLMs these days is bypassing around crap in software written by people[0].

            The metric in question is not how it's built. It's whether it solves a problem. Particularly for single or sub-100-users software, what matters is whether it does the job the user(s) like, the exact way they like it.

            Speculating here, but maybe I'm also hitting at a disconnect between perspectives: I look at a product as tool to solve a problem. But some look at it as something to sell for money or Internet fame. For the former, distribution doesn't matter. For the latter, distribution is everything, and then, perceived code quality/effort signals actually start making sense.

            TL;DR: I don't mind using shoddy software, but I agree it's a bit harder to sell obviously shoddy software.

            --

            [0] - https://news.ycombinator.com/item?id=49875994 I started calling this "Bypass-Driven Development".

    • dmos62 a day ago ago

      Are you comparing with `curl | lynx` or with Chrome?

      • nateb2022 a day ago ago

        HN data is accessible through the Firebase API: https://github.com/hackernews/api

        You don't need to as much as parse HTML to read it. Building a client by hand in C even should be pretty painless as long as you don't write your JSON parser yourself.

        • ahmd-sh a day ago ago

          that's fair. thanks for pointing it out, there's a lot of helpful feedback here that will let me optimize this (admittedly) unnecessarily complex project :)

        • dmos62 a day ago ago

          That's fair criticism.

    • tantalor a day ago ago

      In the old days, you would telnet into a host machine that just serves this up to you. No need to install anything.

      • nateb2022 a day ago ago

        charm makes some awesome libraries for building/serving CLIs over SSH: https://github.com/charmbracelet/wish

        • neomantra a day ago ago

          I love that library -- perfect for multi-user TUIs -- and thought its associated Wish SAAS with multi-key identity and KV store was a fantastic idea.

  • KPGv2 a day ago ago

    Made me think of a cool way to burn tokens: browser that reports websites you visit to an agent, which then writes a TUI for that site, ultimately leading you to a collection of low-resource UIs for the five or so websites you actually visit. Then you stop needing to use a browser and your 16GB RAM with a browser using 64GB of RAM becomes a system with free RAM for the first time in years.

    Think: Lynx but pretty.

    (Also bonus, bot checks that flag you as one means you have more free time to not get advertised to or sucked into Internet drama.)

  • ligarota a day ago ago

    YaHnTui