Skip to content
hn

Hacker News, from the command line

A command line for Hacker News. One pure-Go binary, no API key, output that pipes into the rest of your tools.

hn reads Hacker News through the official Firebase API and the Algolia search API, both open and key-free, and prints clean records you can read at a terminal or pipe into the next tool.

hn top -n5                 # the five top stories
hn item 48517377 --depth 2 # a thread, two levels deep
hn search "rust" --since 24h
hn top -o url | head       # just the links

Output is a table when you are at a terminal and JSONL when you pipe, so hn top | jq works with no flags.

Where to go next

Getting started Install hn, learn the model, and run your first command. Guides Task-oriented walkthroughs for the things people do with hn.