Show HN: Hntui – A TUI for Hacker News
A new TUI (Terminal User Interface) called Hntui has been introduced, designed for browsing Hacker News. This sleek and elegant interface is compatible with any modern terminal that supports truecolor, mouse support, and UTF-8 encoding. The app has been tested on MacOS using Ghostty, while Linux and Windows support is offered through OpenTUI, though it hasn't been personally tested yet.
The precompiled binaries for Hntui do not require any additional dependencies. Users can install Hntui via npm or by hacking on the code, requiring Bun 1.2 or a newer version. A self-contained binary is installed in the ~/.local/bin directory. Alternatively, users can download binaries for their specific platform from the releases page, with macOS (Apple Silicon) and Linux (x64, arm64) options currently available.
If an Intel Mac is being used, the Bun install package can be utilized instead. Hntui checks for the latest release and, for binary installations, automatically updates itself. When a new release is available, the status bar displays a subtle notification. The version of Hntui installed can be checked using the command 'hntui --version'.
The interface allows users to perform various actions via both keyboard and mouse inputs. However, the terminal's standard click-and-drag selection is intercepted due to Hntui capturing mouse events. To manually select text, users can press 't' to toggle. Hntui features a dark theme with black background and orange accents, as well as a light theme mirroring news.ycombinator.com's appearance, complete with a white background, orange topbar, beige row highlight, and the classic grey byline text.
To save a post, users can press 's', which adds a small star next to the title and displays the post in the 'Saved' tab on the right side of the tab strip. The saved list persists across sessions in the ~/.config/hntui/saved.json file. Pressing 's' again removes a post from the saved list, while 's' from any location jumps directly to the 'Saved' list. All data is sourced from the public Hacker News Firebase API.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.