h.n.r

May 18, 2026 · View on GitHub

Crates.io

A terminal UI for Hacker News

Browse stories, read threaded comments, search, vote, reply, and bookmark — all without leaving the terminal. Built with Rust and ratatui. Mostly vibe coded with Claude Code over a weekend.

Features

  • Six feeds — Top, New, Best, Ask HN, Show HN, Jobs
  • Threaded comments — recursive tree with inline expand/collapse per comment
  • Comment prefetch — comments are fetched automatically after a short dwell on any story and the pane switches without pressing Enter; works for Algolia search results too
  • Reader mode — press r to fetch and render any article as structured text with headings, code blocks, quotes and lists (powered by Mozilla Readability); loads in the background with a progress indicator
  • Shimmer progress — all async operations (feed refresh, article fetch, comment prefetch, search) show an animated shimmer indicator in the status bar
  • Search — Algolia-powered full-text search; press ? to open, results drop into the story list
  • Seen tracking — stories dim automatically when you open their comments; press u to mark unread (persisted to ~/.hnr/seen.json)
  • Bookmarks — save stories with b, browse them on feed 7, persisted to ~/.hnr/bookmarks.json
  • Voting & replies — upvote or reply to any story or comment when logged in
  • User profiles — view karma, bio, and submission count for any author
  • Open in browser — jump to the story URL or HN discussion page with o / O
  • Clipboard — copy the story URL with y
  • Session — login cookie saved to ~/.hnr/session and restored on next launch

Demo

hnr showcase

Install

# Homebrew
brew tap prasanthj/hnr
brew install hnr

# Cargo
cargo install hnr

Usage

hnr

Keybindings

KeyAction
17Switch feed: Top / New / Best / Ask / Show / Jobs / Bookmarks
j / k / / Navigate up / down
EnterFetch comments (story pane) · Expand / collapse comment inline
TabSwitch between story list and comments pane
EscBack to story pane · Close modal
SpaceCollapse / expand comment thread
rReader mode — fetch and render article as structured text
RRefresh current feed
bBookmark / unbookmark selected story
uMark selected story as unread
?Search stories via Algolia
vVote on selected story or comment
cReply to selected story or comment
pView author profile
oOpen story URL in browser
OOpen HN discussion page in browser
yCopy story URL to clipboard
lLogin / logout
hShow help
/Command mode
qQuit

Reader mode keys

KeyAction
j / kScroll line by line
d / uHalf-page down / up
n / NJump to next / previous section
g / GJump to top / bottom
oOpen article in browser
Esc / q / rClose reader

Slash Commands

/login      /logout     /top        /new        /best
/ask        /show       /jobs       /bookmarks  /search
/refresh    /user <n>   /bookmark   /open       /hn
/vote       /help       /quit

License

MIT