{"slug": "native-hacker-news-tui-client-with-ai-comments-summary-written-in-golang", "title": "Native Hacker News TUI client with AI comments summary written in Golang", "summary": "Developer cw has released cwnews, a terminal-based Hacker News reader built in Go using Bubbletea v2, featuring AI-powered comment thread summarization via DeepSeek V4 Flash. The tool caches data in SQLite, supports six HN feeds, threaded comment folding, and three themes, aiming to provide a fast, keyboard-driven browsing experience with real-time AI summaries.", "body_md": "# cwnews\n\nA fast terminal Hacker News reader with threaded comment folding, score-coloured story lists, three themes, and AI-powered thread summarization via DeepSeek V4 Flash.\n\nBuilt in Go on Bubbletea v2. Left panel browses stories across all six HN feeds (Top / New / Best / Ask / Show / Jobs) with pagination. Right panel renders nested comments with collapsible threads, coloured depth indent, and summary panel streaming live from DeepSeek.\n\nAsk · Show · Jobs\n\nZinc cyan\n\nstreaming thread summary\n\n## What it is\n\ncwnews is a full-screen Bubbletea TUI for reading Hacker News on the terminal. It fetches stories and comments from the official HN Firebase API, caches everything in SQLite for instant re-opening, and provides real-time AI summaries of comment threads with word-by-word streaming.\n\nThe left panel is a dense story browser: six feed tabs, pagination with\n`n`\n\n/`p`\n\n, and score- and comment-count coloured\nmetadata. Titles truncate cleanly to fit. The right panel shows a\nthreaded comment view with collapsible nesting, coloured depth bars,\nand a cursor that highlights the active comment in accent orange.\n\nPress `s`\n\non any thread and DeepSeek V4 Flash streams a\ndetailed summary — sentiment, key points, standout quotes, consensus\n& debate — formatted with markdown headings, bullet points, and\nitalicized blockquotes. Summaries are cached in SQLite, so switching\nback to a thread is instant. Language is configurable (Chinese or\nEnglish).\n\nThe three themes cycle with `t`\n\n: a dark HN-inspired palette\nwith orange accents, a classic cream-background HN look matching the\nreal website, and a cyan-accented zinc theme from cwmail's design\nsystem.\n\n## Why it’s different\n\n`Enter`\n\nor `←`\n\nto collapse\nany thread, `→`\n\nto expand, `[`\n\n/`]`\n\nto fold by depth level, `n`\n\n/`N`\n\nto jump\nbetween top-level comments. Vim-style `j`\n\n/`k`\n\nnavigation moves a highlighted cursor through the visible list.\n`s`\n\nand the right panel switches to an AI summary\nview. DeepSeek V4 Flash streams text word-by-word with a braille\nspinner in the status bar. Summaries cover overall sentiment, key\npoints, standout comment quotes, consensus & debate breakdowns,\nand meta-observations. All cached in SQLite — reopen any thread\nand the summary appears instantly without another API call.\n`h`\n\n/`l`\n\nor direct\n`1`\n\n-`6`\n\nkeys. Each feed loads 50 stories per\npage from the 500-item HN ID pool. `n`\n\n/`p`\n\npaginates; the page indicator shows `1/17`\n\nin the tab\nbar. Switching feeds resets to page one.\n`'`\n\n, `<p>`\n\n).\ncwnews decodes all HTML entities and strips tags before rendering,\nso you never see `'`\n\nor raw `<p>`\n\nmarkers in comment text.\n`~/.local/share/cwnews/cwnews.db`\n\n.\nRe-opening a previously viewed thread shows comments immediately\nwhile a background refresh fetches any new replies. Cached summaries\nmean the AI panel is instant on the second press of `s`\n\n.\n## What it looks like\n\n## Install\n\nDownload a pre-built binary from the\n[Google Drive release folder](https://drive.google.com/drive/folders/10u8t-tPC0cPRsGpCwaCniqqbzMxLDcb2?usp=sharing)\n(current build: v0.1; macOS arm64 / amd64 and Windows amd64). Drop it\nsomewhere on your `PATH`\n\nand make it executable:\n\n```\n# macOS\ncurl -L <download-url> -o ~/.local/bin/cwnews\nchmod +x ~/.local/bin/cwnews\n\n# Windows (PowerShell)\nInvoke-WebRequest <download-url> -OutFile cwnews.exe\n```\n\nCreate a config file at `./config.json`\n\nor\n`~/.config/cwnews/config.json`\n\n:\n\n```\n{\n  \"theme\": \"hn\",\n  \"ai\": {\n    \"api_key\": \"sk-...\",\n    \"model\": \"deepseek-v4-flash\",\n    \"summary_language\": \"zh\"\n  },\n  \"ui\": {\n    \"sidebar_width_ratio\": 0.40\n  },\n  \"cache_ttl_minutes\": 5\n}\n```\n\nSet `\"summary_language\"`\n\nto `\"en\"`\n\nfor\nEnglish summaries or `\"zh\"`\n\nfor Chinese. The AI API key\nis the same DeepSeek key used by cwcode and cwmail.\n\nRun it.\n\n```\ncwnews\n```\n\n## FAQ\n\n`s`\n\nfor a summary.`t`\n\nto cycle through three themes:\n**hn**(dark, orange accents),\n\n**hn-classic**(cream background, matches real HN), and\n\n**zinc**(cyan-accented dark). The active theme shows in the footer.\n\n`j`\n\n/`k`\n\nto\nnavigate, `g`\n\n/`G`\n\nfor top/bottom,\n`d`\n\n/`u`\n\nfor half-page scroll,\n`h`\n\n/`l`\n\nto switch feeds,\n`Enter`\n\nto open a story and focus comments,\n`Tab`\n\nto switch between panels, `q`\n\nto quit.\nThe footer bar in each view shows the context-relevant keys.[Google Drive](https://drive.google.com/drive/folders/10u8t-tPC0cPRsGpCwaCniqqbzMxLDcb2?usp=sharing). Source currently private. Reach out at\n\n[haojng@gmail.com](mailto:haojng@gmail.com)for access.", "url": "https://wpnews.pro/news/native-hacker-news-tui-client-with-ai-comments-summary-written-in-golang", "canonical_source": "https://code.intellios.ai/cwnews/", "published_at": "2026-06-27 16:04:40+00:00", "updated_at": "2026-06-27 16:34:59.097120+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "developer-tools"], "entities": ["cwnews", "DeepSeek V4 Flash", "Hacker News", "Bubbletea", "SQLite", "Google Drive"], "alternates": {"html": "https://wpnews.pro/news/native-hacker-news-tui-client-with-ai-comments-summary-written-in-golang", "markdown": "https://wpnews.pro/news/native-hacker-news-tui-client-with-ai-comments-summary-written-in-golang.md", "text": "https://wpnews.pro/news/native-hacker-news-tui-client-with-ai-comments-summary-written-in-golang.txt", "jsonld": "https://wpnews.pro/news/native-hacker-news-tui-client-with-ai-comments-summary-written-in-golang.jsonld"}}