Skip to content

hn v0.1.0

Choose a tag to compare

@Shaance Shaance released this 01 Nov 16:09
· 291 commits to main since this release
953864a

hn v0.1.0

hn is a terminal reader for Hacker News, written in Rust. It is for people who want to browse stories and read full comment threads without leaving the terminal.

Highlights

  • Browse Top, New, and Best stories with paging, and read full comment threads with expand/collapse, sibling and parent navigation, and a reading position that is restored when you reopen a discussion in the same run.
  • Save stories for later with s and revisit them in the Saved view (4). Saved stories persist across restarts and need no account.
  • Optional AI summaries of the article and discussion through OpenRouter or Anthropic, with Fast and Thorough profiles, automatic summaries when you open a story, and numbered citations that jump to the cited comment.
  • On macOS with Ghostty, open the original article in a companion browser pane beside the discussion. Other setups open it in the default browser.
  • Automatic light/dark colour detection with HN_THEME override, NO_COLOR support, and HN_REDUCED_MOTION=1 to disable animations.

Install

git clone https://github.com/Shaance/hackernews-cli.git
cd hackernews-cli
cargo install --path . --locked
hn

cargo install places the hn binary in $CARGO_HOME/bin, normally ~/.cargo/bin. Keep that directory on your shell's PATH.

Requirements and optional setup

  • Rust and Cargo, version 1.88 or newer.
  • Browsing and saving stories work without an API key.
  • Summaries need an OpenRouter or Anthropic API key, entered once in the M settings form or supplied as OPENROUTER_API_KEY or ANTHROPIC_API_KEY.
  • The Ghostty article pane is macOS-only and needs Ghostty plus terminal-browser v0.13.4. See scripts/ghostty/README.md for setup.

Known limitations

  • Summaries send extracted article text and sampled comment excerpts to the selected provider using your API credits. Article extraction can be partial, and discussion summaries use a sample of comments.
  • The Ghostty companion pane requires macOS, Ghostty, and a terminal at least 110 columns wide. Otherwise the article opens in the default browser.
  • Summaries, captured sources, and reading positions are kept in memory for the current run only. Restarting hn starts a new reading session, while saved stories and summary settings persist.