cwnews — terminal Hacker News reader with AI summaries
cwnews
A fast terminal Hacker News reader with threaded comment<br>folding, score-coloured story lists, three themes, and AI-powered thread<br>summarization via DeepSeek V4 Flash.
Built in Go on Bubbletea v2. Left panel browses stories across all six HN<br>feeds (Top / New / Best / Ask / Show / Jobs) with pagination. Right panel<br>renders nested comments with collapsible threads, coloured depth indent,<br>and summary panel streaming live from DeepSeek.
6 feeds
Top · New · Best<br>Ask · Show · Jobs
3 themes
HN dark · HN classic<br>Zinc cyan
AI
DeepSeek V4 Flash<br>streaming thread summary
What it is
cwnews is a full-screen Bubbletea TUI for reading Hacker News on the<br>terminal. It fetches stories and comments from the official HN Firebase<br>API, caches everything in SQLite for instant re-opening, and provides<br>real-time AI summaries of comment threads with word-by-word streaming.
The left panel is a dense story browser: six feed tabs, pagination with<br>n/p, and score- and comment-count coloured<br>metadata. Titles truncate cleanly to fit. The right panel shows a<br>threaded comment view with collapsible nesting, coloured depth bars,<br>and a cursor that highlights the active comment in accent orange.
Press s on any thread and DeepSeek V4 Flash streams a<br>detailed summary — sentiment, key points, standout quotes, consensus<br>& debate — formatted with markdown headings, bullet points, and<br>italicized blockquotes. Summaries are cached in SQLite, so switching<br>back to a thread is instant. Language is configurable (Chinese or<br>English).
The three themes cycle with t: a dark HN-inspired palette<br>with orange accents, a classic cream-background HN look matching the<br>real website, and a cyan-accented zinc theme from cwmail's design<br>system.
Why it’s different
Threaded comment folding
Comments display as an indented tree with depth-coloured vertical<br>bars. Press Enter or ← to collapse<br>any thread, → to expand, [/]<br>to fold by depth level, n/N to jump<br>between top-level comments. Vim-style j/k<br>navigation moves a highlighted cursor through the visible list.
Streaming AI summaries
Press s and the right panel switches to an AI summary<br>view. DeepSeek V4 Flash streams text word-by-word with a braille<br>spinner in the status bar. Summaries cover overall sentiment, key<br>points, standout comment quotes, consensus & debate breakdowns,<br>and meta-observations. All cached in SQLite — reopen any thread<br>and the summary appears instantly without another API call.
Score-colored rankings
Story scores color-code by heat: orange for 500+ points, warm amber<br>for 200+, gold for 50+, dim gray for under 10. Comment counts follow<br>the same scheme so hot discussions pop visually. Story headlines<br>render in a single clean row with right-aligned ▲score and comment<br>count columns that align across the entire page.
Six feeds with pagination
Tab bar at the top switches between Top, New, Best, Ask, Show, and<br>Jobs feeds with h/l or direct<br>1-6 keys. Each feed loads 50 stories per<br>page from the 500-item HN ID pool. n/p<br>paginates; the page indicator shows 1/17 in the tab<br>bar. Switching feeds resets to page one.
HTML entity decoding
HN comments arrive as raw HTML with encoded entities<br>(', <p>).<br>cwnews decodes all HTML entities and strips tags before rendering,<br>so you never see ' or raw<br>markers in comment text.
SQLite cache — always fast
Stories, comments, story-ID lists, and AI summaries all live in<br>a single SQLite file at ~/.local/share/cwnews/cwnews.db.<br>Re-opening a previously viewed thread shows comments immediately<br>while a background refresh fetches any new replies. Cached summaries<br>mean the AI panel is instant on the second press of s.
What it looks like
Main view — story list on the left (▲score + comment count), threaded comments on the right with fold controls and depth-coloured indent bars.
Install
Download a pre-built binary from the<br>Google Drive release folder<br>(current build: v0.1; macOS arm64 / amd64 and Windows amd64). Drop it<br>somewhere on your PATH and make it executable:
# macOS<br>curl -L -o ~/.local/bin/cwnews<br>chmod +x ~/.local/bin/cwnews
# Windows (PowerShell)<br>Invoke-WebRequest -OutFile cwnews.exe
Create a config file at ./config.json or<br>~/.config/cwnews/config.json:
"theme": "hn",<br>"ai": {<br>"api_key": "sk-...",<br>"model": "deepseek-v4-flash",<br>"summary_language": "zh"<br>},<br>"ui": {<br>"sidebar_width_ratio": 0.40<br>},<br>"cache_ttl_minutes": 5
Set "summary_language" to "en" for<br>English summaries or "zh" for Chinese. The AI API key<br>is the same DeepSeek key used by cwcode and cwmail.
Run it.
cwnews
FAQ
Do I need a Hacker News account?
No. cwnews is read-only. It uses the free HN Firebase<br>API. No login, no voting, no posting — just reading and AI<br>summarization.
How much does the AI summary cost?
DeepSeek V4 Flash costs ~$0.14 per million input tokens<br>and ~$0.28 per million output tokens. A typical thread summary uses<br>about 15K input tokens (the...