Skip to content
hn

v0.1.0

First release.

What's in it

hn reads Hacker News through two open APIs that require no key:

  • The official Firebase endpoint (hacker-news.firebaseio.com/v0) for live story lists, single items, user profiles, and the recent-changes feed.
  • The Algolia search endpoint (hn.algolia.com/api/v1) for full-text search over stories and comments.

Commands

command what it does
hn top Top stories
hn best Best stories
hn new Newest stories
hn ask Ask HN posts
hn show Show HN posts
hn jobs YC job listings
hn item <id> One item and its comment tree (--depth)
hn user <name> User profile, optionally with --submissions
hn search <q> Full-text search (--tags, --sort, --since, --points)
hn updates Recently changed items and profiles
hn maxitem The current maximum item id

All commands support -o table|json|jsonl|csv|tsv|url|raw, --fields, --template, -n/--limit.

Install

go install github.com/tamnd/hackernews-cli/cmd/[email protected]

Or download a prebuilt binary from the releases page.