❯ booting hn-client kernel...
❯ loading Bubble Tea & Lip Gloss...
❯ initializing terminal interface...
❯ status: ok (ready to read)
Version 1.0.0 Now Available

Hacker News.
Directly in your terminal.

A modern, blazing fast, and minimalist client. Built in Go with Bubble Tea & Lip Gloss. Features intuitive Vim navigation, mouse-wheel scrolling, and seamless w3m/Vim writing integration.

go install github.com/aeon022/hn-client@latest
hn-client terminal screenshot

Try the TUI in your browser

Click on the categories inside the simulator to switch Hacker News feeds in real time.

🎨 Live TUI Theme Preview:
go (w3m) — hn-client
Interactive TUI (Click to focus)
HACKER NEWS

Designed for Terminal-Lovers

Zero bloat. Only maximum efficiency when reading, searching, and submitting to Hacker News.

Vim-Style Navigation

Navigate lists naturally with j and k keys. Jump straight to feed categories instantly using number hotkeys 1-5.

Visual Read History

Previously visited stories are automatically dimmed in the TUI and tagged with a checkmark, persisted securely in your local .hn-history.json.

Color-Coded Comment Trees

Deeply nested comment trees render with color-coded sidebar lines corresponding to their depth. Follow complex conversations effortlessly.

w3m & Vim Integration

Press w (post) or r (reply) to launch w3m. Write posts directly using your system's Vim/Neovim configuration.

Instant Search Filtering

Press / to filter the active story list in real time by title or author. Clear the active search immediately by pressing x.

Mouse-Wheel Support

No need to abandon the mouse. The terminal client supports seamless scrolling inside lists and comment threads using the mouse scroll-wheel.

Offline Bookmarks

Press s to download and save any story + comments locally to ~/.hn-bookmarks.json. Read them offline under feed tab 7.

Thread Link Extractor

Press u to scan comments and display all extracted links in a popup selection modal. Navigate with j/k and open with Enter.

HN Profiles & Alerts

Press U to view user profile summaries in a popover window. Background checking alerts you (🔔) instantly on new comment replies.

Terminal Keybindings Reference

Fully navigable without touching the mouse. Command the entire interface with rapid keystrokes.

J or
Move Down Scrolls lists and comments down by one item
K or
Move Up Scrolls lists and comments up by one item
Tab
Next Feed Cycle to the next Hacker News feed tab
Shift + Tab
Previous Feed Cycle to the previous Hacker News feed tab
Enter
View Comments Open comment tree and story details
O
Open Link Launches the story's URL in your system web browser
W
Write Submission Open submit form in w3m or system browser
R
Reply to Thread Open reply form in w3m (available in comments view)
/
Search Filter Search feed items dynamically by title or author
X
Clear Search Reset active search query and display all items
Esc or Q
Go Back / Quit Return to stories view, or close the client application
S or s
Offline Bookmark Save story + comments offline to local bookmarks file
U
HN User Profile Fetch and view user statistic profiles card in a popup
u
Comment Links Extract all comment links into a popup list for selection
c
Fold Comment Thread Collapse/expand the selected comment sub-thread
Ctrl + N
Clear Alerts Reset the new replies notification badge in the header
1 .. 7
Direct Feed Selection Jump straight to feeds (1:Top, 2:New, 3:Best, 4:Ask, 5:Show, 6:Mine, 7:Bookmarks)

Learn Go Level by Level

Follow the roadmap steps to build the Hacker News terminal client from scratch. Click a level to view code and concepts.

Level 1: Booting the TUI Kernel

In Go, executable programs are compiled from a source entry point located inside package main. The execution runtime automatically invokes the func main() function when the binary starts.

To build our terminal UI, we import Charm's Bubble Tea library. We initialize our application instance using tea.NewProgram(). By passing the tea.WithAltScreen() option, Go instructs the terminal emulator to open a separate screen buffer. This suspends your shell session, hides previous commands, and gives the TUI control over the entire window dimensions. Upon quitting, it cleanly restores the shell state.

Mission Checklist

  • Declare package main
  • Import github.com/charmbracelet/bubbletea
  • Invoke tea.NewProgram event loop
  • Initialize alt screen buffer
main.go go run
package main

import (
	"fmt"
	"os"
	tea "github.com/charmbracelet/bubbletea"
)

func main() {
	p := tea.NewProgram(initialModel(), tea.WithAltScreen())
	if _, err := p.Run(); err != nil {
		fmt.Printf("Error: %v\n", err)
		os.Exit(1)
	}
}

Architecture & System Integrations

Understand how hn-client interfaces with Go backend frameworks, terminal APIs, and local configurations.

Data Flow & Lifecycle

01
Hacker News API

Retrieves real-time JSON payloads using official Hacker News endpoints via HTTP clients.

02
Go TUI Processor

Bubble Tea's Elm architecture engine processes raw payloads, while Lip Gloss builds terminal graphics layouts dynamically.

03
Persistent Storage

Reading history (viewed stories) is securely saved in ~/.hn-history.json, enabling persistent checkmarks and dimming.

04
Subsystems Launcher

Launches w3m for interactive forms or launches the system's default browser with spoofed headers when opening URLs.

Technical Specifications

Language Go 1.21+
Render Engine Bubble Tea (Charm TUI Toolkit)
Terminal Styling Lip Gloss (CSS-like declarations for terminal)
Local Cache ~/.hn-history.json (Read History Tracker)
Web Browser Fallback w3m, lynx, or standard web browser
Vim Configuration Binds system editor (vi, vim, nvim) via w3m
Protip: You can configure w3m to use your Neovim config by setting editor /usr/local/bin/nvim in your local ~/.w3m/config. This allows full Neovim text entry when writing replies directly inside the w3m HN reply box.

Quickstart & Installation

The only requirement is a working Go toolchain (Version 1.21 or higher) installed on your system.

💻 Detecting your operating system...
Install via Go (Recommended)

Install the binary directly into your $GOPATH/bin using the official Go toolchain:

go install github.com/aeon022/hn-client@latest
Build from Source

Clone the repository and build the executable file manually on your system:

git clone https://github.com/aeon022/hn-client.git
cd hn-client
go build -o hn-client main.go

Frequently Asked Questions

Common questions regarding the installation, security, and usage of the Hacker News terminal client.

Using hn-client offers a highly focused, distraction-free environment. Without heavy web assets, layouts compile in milliseconds. You navigate instantly using Vim bindings, read comments, search feeds, and write entries using your own shell config.

When you attempt to write a post (w) or comment reply (r), hn-client invokes the terminal web browser w3m. Inside w3m's text area fields, hitting Enter automatically launches your system's default editor (e.g., Neovim or Vim) inside w3m, allowing you to write your replies in a full editor before submitting.

No, the client does not save or transmit any usernames or passwords. All login credentials and cookies are securely isolated within your terminal web browser (w3m) using standard secure cookie directories. hn-client is completely open source and handles zero authentication logic locally.

Yes. The client searches your system's $PATH and attempts to launch terminal web browsers in order of preference: w3m first, and then lynx. If neither terminal browser is installed, it falls back to opening the standard GUI web browser of your system.

Read history and viewed checkmarks are stored locally in a single file inside your home directory: ~/.hn-history.json. You can easily back up, delete, or inspect this file manually at any time.

./ab83_init --status
hash: void
build: 12.07.26, 12:03