Skip to content

Hn CLI

Blazing fast, Hacker News CLI (TUI)

Install

$/plugin marketplace add heartleo/hn-cli

Install command taken from the project's README or registry entry. Always review code before running it.

hn

A terminal client for Hacker News.

Features

  • 📰 Story browser — Top, New, Best, Ask HN, Show HN with tab switching
  • 💬 Comment threads — navigate with j/k, fold/unfold, lazy-load reply trees
  • 🌐 Translation — translate a title with t, all visible titles with T, or a selected comment
  • 🔄 Soft refresh — refresh stories or comments without restarting
  • 🎨 Themes — hn, mocha, dracula, tokyo, nord, gruvbox
  • ⚡ Progressive loading — visible range loads first, more fetched as you scroll

Install

Homebrew (macOS / Linux):

$ brew install heartleo/tap/hn

winget (Windows):

$ winget install heartleo.hn

curl (macOS / Linux):

$ curl -fsSL https://raw.githubusercontent.com/heartleo/hn-cli/main/install.sh | sh

No sudo needed — the binary is installed under your home directory. The install directory is picked from the first of these that is set:

Source Value
HN_INSTALL_DIR used as-is
XDG_BIN_HOME used as-is
XDG_DATA_HOME $XDG_DATA_HOME/../bin
(default) $HOME/.local/bin

To install somewhere else:

$ curl -fsSL https://raw.githubusercontent.com/heartleo/hn-cli/main/install.sh | HN_INSTALL_DIR=~/bin sh

The script warns if the install directory is not on your $PATH, and prints the export PATH=... line to add to your shell profile.

The script never calls sudo. To install system-wide, run it as root yourself:

$ curl -fsSL https://raw.githubusercontent.com/heartleo/hn-cli/main/install.sh -o install.sh
$ sudo env HN_INSTALL_DIR=/usr/local/bin sh install.sh

Prebuilt binaries — download from GitHub Releases

Go install (requires Go 1.25+):

$ go install github.com/heartleo/hn-cli/cmd/hn@latest

Build from source:

$ git clone https://github.com/heartleo/hn-cli
$ cd hn
$ go build -o hn ./cmd/hn

Claude Code Plugin

This repo also ships hn, a Claude Code plugin that brings Hacker News to Claude.

/plugin marketplace add heartleo/hn-cli
/plugin install hn@hn-cli
Skill What it does
hn-digest Scan the front page — today's themes, hot discussions, industry mix

Then just ask: what's on HN today. Ask in any language and the digest comes back in that language. See the plugin README for details.

The digest is also published daily at hndigest.heartleo.dev.

DeepSeek Harness Plugin

For DeepSeek Harness there is hacker-news, a plain-ESM plugin that reads the public Hacker News APIs directly. It needs neither an HN API key nor a local terminal client.

Install from npm

The published package is dsh-hacker-news. It is also listed in the awesome-dsh-plugin community registry. DSH profiles are pnpm workspace roots, so keep the -w flag:

dsh plugin --profile <name> add -w dsh-hacker-news

Similar plugs

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies

Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…

Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…