Skip to content

Yukaii/ykhn

Repository files navigation

YKHN

Retro terminal Hacker News client. Successor to vimify-hackernews, a retake on the same topic.

Features

  • Feeds: Top / New / Best / Ask / Show / Jobs.
  • Fast navigation: keyboard-first UI with vim-style movement, count prefixes, and a ? help overlay.
  • Story list: select rows, open comments or the external link (same tab or new tab).
  • Item view: story metadata + sanitized HTML, threaded comments with expand/collapse.
  • Login actions: JWT-backed HN login via hn-api.yukai.dev, powered by hn-auth-proxy, with item-page vote/unvote actions and account lists.
  • Progressive loading: load more stories / comments; optional recursive comment prefetch.
  • State restore: remembers scroll + selection per feed/item (session-based).
  • Themes & UI: Commander/Dark/Light themes + adjustable font size.
  • Offline-friendly PWA: installable, runtime-caches HN API responses, prompts when updates are available.

Screenshots

Theme Desktop Mobile
Dark Dark theme desktop screenshot Dark theme mobile screenshot
Light Light theme desktop screenshot Light theme mobile screenshot
Commander Commander theme desktop screenshot Commander theme mobile screenshot

Development

  • bun install
  • bun run dev (Vite @ http://localhost:5173)

Local development proxies auth requests through Vite at /auth-proxy, avoiding browser CORS issues. The default proxy target is https://hn-api.yukai.dev.

Auth configuration:

  • HN_AUTH_PROXY_TARGET: dev-server proxy target for /auth-proxy.
  • VITE_HN_AUTH_PROXY_URL: browser-facing auth API base URL. Leave unset locally to use /auth-proxy; set it when you need the client to call a specific origin directly.

Icons

Generate PWA icons from public/pwa.svg:

  • node scripts/render-icons.mjs
  • Rounded-corner variants (for iOS): node scripts/render-icons.mjs --rounded
  • Custom radius / inset / background: node scripts/render-icons.mjs --rounded --rounded-radius 0.22 --inset 0.10 --background "#fff"

Keyboard shortcuts

Shortcuts are ignored while typing in inputs.

Global

  • ? toggle shortcuts overlay
  • Esc close menus/help
  • F1..F6 switch feeds
  • g1..g6 go to feed
  • [ / ] prev/next feed
  • F9 open About / System Setup
  • r refresh (current page action)
  • PgUp / PgDn prev/next (or load more)
  • Ctrl+o / Ctrl+i back/forward
  • Ctrl+y / Ctrl+e scroll one row
  • Ctrl+u / Ctrl+d scroll half page
  • Ctrl+b / Ctrl+f scroll full page
  • Ctrl+r hard reload

Feed list

  • j / k move selection
  • gg / G jump to top/bottom
  • [count]j / [count]k / [count]G numeric prefix
  • zt / zz / zb scroll active row to top/center/bottom
  • Enter / d open comments; D opens in new tab
  • o open link; O opens in new tab
  • v vote/unvote the selected story when logged in

Item page (comments)

  • j / k next/prev comment
  • gg / G top/bottom comment
  • [count]G jump to comment
  • h jump to parent
  • { / } prev/next thread
  • H collapse comment
  • l expand + load one level + go to first child
  • L expand + load recursively + go to first child
  • v vote/unvote the selected story or comment when logged in
  • zt / zz / zb scroll active comment to top/center/bottom

Roadmap / future ideas

  • Search: integrate HN Algolia search (title/author), plus filters.
  • Bookmarks & history: read-later list, “mark as read”, hide stories, and a local reading history.
  • Better offline mode: persist more UI state across sessions, prefetch comment threads, background cache warming.
  • Power-user UX: command palette, jump-to feed/item, configurable keybindings.
  • Performance: list virtualization for very long feeds; smarter comment prefetch caps.
  • Accessibility: more ARIA coverage, focus management, and high-contrast theme tuning.
  • Sharing: share target (receive shared URLs) and richer share metadata.
  • More HN actions: favorite/unfavorite, reply form integration, and hide/unhide once those actions are promoted from raw /hn/* proxy links.

License

MIT

About

vibe coded yet another hackernews client.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors