logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·30.10.26
← Back to news

Show HN: Hntui – A TUI for Hacker News

Original article
github.com|99 points|53 comments|by ahmd-sh|Sep 28, 2026

🖥️ hntui: Hacker News for the Terminal

Browse Hacker News like a true hacker. A sophisticated and polished Terminal User Interface (TUI) designed for consuming one of the web's premier technical news aggregators.

hntui Placeholder


🚀 Getting Started

Installation Options

Depending on your environment, choose one of the following methods:

  • Standalone Binary (Recommended) The fastest way to get running. This installs a self-contained executable to ~/.local/bin.
    curl -fsSL https://raw.githubusercontent.com/ahmd-sh/hntui/main/install.sh | sh
    
  • Direct Download Visit the Releases Page to grab binaries for:
    • Linux (x64 and arm64)
    • macOS (Apple Silicon)
    • Note: Intel Mac users should use the Bun method below.
  • Via Bun Requires Bun 1.2+.
    # Install globally
    bun add -g @ahmd-sh/hntui
    
    # Or execute without installing
    bunx @ahmd-sh/hntui
    

System Requirements

To ensure the UI renders correctly, your terminal must support:

  • Truecolor
  • Mouse Input
  • UTF-8 Encoding

Note: While OpenTUI supports Windows and Linux, the author has not yet fully verified all Windows environments.


🛠️ Functionality & Usage

hntui allows you to navigate all six primary HN feeds: Top, New, Best, Ask, Show, and Jobs. It even features a nostalgic Knight Rider style scanner for loading states (⁠◕⁠ᴗ⁠◕⁠ ).

⌨️ Keybindings Reference

📋 Story List

KeyAction
j / ↓ , k / ↑Navigate cursor
gg , GJump to top or bottom
Ctrl-D / Ctrl-U / PgDn / PgUpHalf-page scroll
c / EnterOpen story & comments
h / ← , l / →Switch tabs
Tab / Shift-TabCycle through tabs
1 →\rightarrow→ 6Jump to specific category
SOpen Saved list
sToggle save status of post
oOpen URL in default browser
rRefresh feed
tSwitch theme
q / Ctrl-CExit application

💬 Story Details (Comments)

KeyAction
j / ↓ , k / ↑Move comment cursor
gg , GJump to first/last comment
Ctrl-D / Ctrl-U / PgDn / PgUpHalf-page scroll
SpaceExpand/Collapse comment thread
EnterOpen links popup
sSave/Unsave story
oOpen story URL
Esc / Backspace / hReturn to list
tSwitch theme
qExit

🔗 Links Popup & Context Menu

ContextKeyAction
Linksj, k, ↑, ↓Navigate links
Linksgg, GFirst/Last link
Linkso, EnterOpen link
LinksEsc, BackspaceClose popup
Menuj, k, ↑, ↓Navigate menu
MenuEnterActivate option
MenuEsc, BackspaceClose menu

🖱️ Mouse Integration

Most keyboard actions are mirrored via the mouse:

  1. Refresh/Exit: Click the Y tile.
  2. Context Menu: Right-click any story to Save, Open URL, or Open Comments.
  3. Threading: Click a comment header to toggle its subtree.
  4. External Links: Click the story URL in the header to launch your browser.

⚠️ Selecting Text

Since hntui captures mouse events, standard click-and-drag is disabled. Use these modifiers to bypass:

  • macOS (iTerm2, Ghostty, etc.): Hold Option →\rightarrow→ Drag →\rightarrow→ Cmd-C.
  • Linux (Kitty, Alacritty, etc.): Hold Shift →\rightarrow→ Drag →\rightarrow→ Ctrl-Shift-C.

🎨 Aesthetics & Persistence

The Light Theme is a tribute to the original news.ycombinator.com aesthetic:

  • Background=White\text{Background} = \text{White}Background=White
  • Topbar=Orange\text{Topbar} = \text{Orange}Topbar=Orange
  • Highlight=Beige\text{Highlight} = \text{Beige}Highlight=Beige
  • Bylines=Grey\text{Bylines} = \text{Grey}Bylines=Grey

Saved Posts:

  • Marked with a ⋆\star⋆ and stored in the Saved tab.
  • Data persists in ~/.config/hntui/saved.json.
  • hackernuis →\rightarrow→ Old configurations are automatically migrated to the new format.

⚙️ Development & Pipeline

Local Setup

git clone https://github.com/ahmd-sh/hntui.git
cd hntui
bun install
bun dev # Enables hot reloading

The application fetches data via the Hacker News Firebase API.

Release Workflow

The project uses a sophisticated CI/CD pipeline triggered by v* tags:

To trigger a new release: npm version patch (or minor/major) →\rightarrow→ git push --follow-tags.

Maintenance

  • Binary Users: Run hntui update to check for and install the latest version.
  • Bun Users: Re-run bun add -g @ahmd-sh/hntui.

🙏 Credits

  • OpenTUI: Developed by Anomaly.
  • Knight Rider Animation: Adapted from examples/knight-rider/utils.ts under the MIT License.

License: MIT