{"_id":"@ahmd-sh/hackernuis","_rev":"3-f40a5d415e6c96dd80077956d36fdd1d","name":"@ahmd-sh/hackernuis","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@ahmd-sh/hackernuis","version":"0.1.0","keywords":["hackernews","hn","tui","terminal","cli","opentui","bun"],"author":{"name":"Ahmed Shaikh","email":"ahmeds@mun.ca"},"license":"MIT","_id":"@ahmd-sh/hackernuis@0.1.0","maintainers":[{"name":"ahmd-sh","email":"ahmeds@mun.ca"}],"homepage":"https://github.com/ahmd-sh/hackernuis#readme","bugs":{"url":"https://github.com/ahmd-sh/hackernuis/issues"},"bin":{"hackernuis":"src/index.tsx"},"dist":{"shasum":"542d415551e5068525b85ebcf18574058cfaf6cd","tarball":"https://registry.npmjs.org/@ahmd-sh/hackernuis/-/hackernuis-0.1.0.tgz","fileCount":22,"integrity":"sha512-2E+RVY9yE6L5fhGgp7/sQrnqZCmYtntPZoUa+0uAfpHHbE4uJt5xv8gEmF0oK+BX6IoMFXxS6Kek1iacUMNJOw==","signatures":[{"sig":"MEUCIHX+nyz+mWipud8ySk453AdIoCDi+bKrDwF8hoh4pQ9sAiEAiXfFSAFFdrIZ3PlAwbBVS06p4GTPRsu3wwtMh2hl4LU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44095},"type":"module","module":"src/index.tsx","engines":{"bun":">=1.2.0"},"gitHead":"bf1b8967de39248ce7a6aa13bbd20737d95f7ca1","scripts":{"dev":"bun run --watch src/index.tsx","start":"bun run src/index.tsx"},"_npmUser":{"name":"ahmd-sh","email":"ahmeds@mun.ca"},"repository":{"url":"git+https://github.com/ahmd-sh/hackernuis.git","type":"git"},"_npmVersion":"10.8.2","description":"Beautiful Hacker News browser for the terminal, built on OpenTUI + React + Bun","directories":{},"_nodeVersion":"20.19.1","dependencies":{"react":"^19.2.4","@opentui/core":"^0.1.103","@opentui/react":"^0.1.103","opentui-spinner":"^0.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/hackernuis_0.1.0_1779899623772_0.5664945360111173","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed — see https://github.com/ahmd-sh/hntui"},"0.2.0":{"name":"@ahmd-sh/hackernuis","version":"0.2.0","keywords":["hackernews","hn","tui","terminal","cli","opentui","bun"],"author":{"name":"Ahmed Shaikh","email":"ahmeds@mun.ca"},"license":"MIT","_id":"@ahmd-sh/hackernuis@0.2.0","maintainers":[{"name":"ahmd-sh","email":"ahmeds@mun.ca"}],"homepage":"https://github.com/ahmd-sh/hackernuis#readme","bugs":{"url":"https://github.com/ahmd-sh/hackernuis/issues"},"bin":{"hackernuis":"src/index.tsx"},"dist":{"shasum":"b2211f01234787eec06e42d82220f521450776cb","tarball":"https://registry.npmjs.org/@ahmd-sh/hackernuis/-/hackernuis-0.2.0.tgz","fileCount":25,"integrity":"sha512-a7rJqvHXBLEhaYaFVA7DttPM5djgdE2r4AGmSHk0qzmu0svSO/PpjbgmiOI5CC1sFj2PAjuivdoPnAsiXfWI5g==","signatures":[{"sig":"MEUCIGrI9pdHsWaMAedMPiNhjjmw4o0zXgNZaVJ2lZA3ru+jAiEAtACRn8PQVE7d9DQjtBELSo8iwmuVeJIxfHV0c6JlxgI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ahmd-sh%2fhackernuis@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":57979},"type":"module","module":"src/index.tsx","engines":{"bun":">=1.2.0"},"gitHead":"c4006e05c13550c96367c85d3b0dbfd0329f4c01","scripts":{"dev":"bun run --watch src/index.tsx","start":"bun run src/index.tsx"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ed7003da-b780-476a-999c-3066941ddd47"}},"repository":{"url":"git+https://github.com/ahmd-sh/hackernuis.git","type":"git"},"_npmVersion":"11.16.0","description":"Beautiful Hacker News browser for the terminal, built on OpenTUI + React + Bun","directories":{},"_nodeVersion":"22.22.3","dependencies":{"react":"^19.2.4","@opentui/core":"^0.1.103","@opentui/react":"^0.1.103","opentui-spinner":"^0.0.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/hackernuis_0.2.0_1780598299935_0.7646525818750234","host":"s3://npm-registry-packages-npm-production"},"deprecated":"Renamed — see https://github.com/ahmd-sh/hntui"}},"time":{"created":"2026-05-27T16:33:43.647Z","modified":"2026-09-21T17:57:56.546Z","0.1.0":"2026-05-27T16:33:43.956Z","0.2.0":"2026-06-04T18:38:20.105Z"},"bugs":{"url":"https://github.com/ahmd-sh/hackernuis/issues"},"author":{"name":"Ahmed Shaikh","email":"ahmeds@mun.ca"},"license":"MIT","homepage":"https://github.com/ahmd-sh/hackernuis#readme","keywords":["hackernews","hn","tui","terminal","cli","opentui","bun"],"repository":{"url":"git+https://github.com/ahmd-sh/hackernuis.git","type":"git"},"description":"Beautiful Hacker News browser for the terminal, built on OpenTUI + React + Bun","maintainers":[{"name":"ahmd-sh","email":"ahmeds@mun.ca"}],"readme":"# hackernuis\n\n> A beautiful Hacker News browser for the terminal — built on [OpenTUI](https://github.com/anomalyco/opentui) + React + [Bun](https://bun.sh).\n\nBrowse the front page, drill into stories, read full collapsible comment threads, and open links — without leaving the terminal.\n\n```\nbun add -g @ahmd-sh/hackernuis\nhackernuis\n```\n\n## Features\n\n- **Six feeds**: Top, New, Best, Ask, Show, Jobs — switch with one keystroke or click\n- **Threaded comments**: full nested tree, collapse/expand subtrees, depth-colored indentation\n- **Link extraction**: pop up all links in a comment, navigate, open in browser\n- **Vim, arrow, and mouse navigation** — all work simultaneously\n- **Dark / light themes** — light theme faithful to HN's classic palette\n- **Knight Rider loading scanner** in HN orange\n- **Fast**: in-memory cache, concurrent comment fetching, near-instant tab switches\n\n## Requirements\n\n- **[Bun](https://bun.sh) ≥ 1.2** — `curl -fsSL https://bun.sh/install | bash`\n- A modern terminal with truecolor, mouse, and UTF-8 support (iTerm2, WezTerm, Kitty, Ghostty, Alacritty, Terminal.app — all good)\n- macOS / Linux. Windows is supported by OpenTUI but untested.\n\n## Install\n\n```bash\nbun add -g @ahmd-sh/hackernuis\n```\n\nOr run without installing:\n\n```bash\nbunx @ahmd-sh/hackernuis\n```\n\n## Run\n\n```bash\nhackernuis\n```\n\nQuit with `q` (or `Ctrl-C`).\n\n## Keybindings\n\n### Story list\n\n| Key | Action |\n|---|---|\n| `j` / `↓` · `k` / `↑` | Move cursor |\n| `gg` · `G` | First / last |\n| `Ctrl-D` · `Ctrl-U` · `PgDown` · `PgUp` | Half-page |\n| `c` · `Enter` | Open story (read comments) |\n| `h` / `←` · `l` / `→` | Previous / next tab |\n| `Tab` · `Shift-Tab` | Cycle tabs |\n| `1` – `6` | Jump to category |\n| `o` | Open story URL in browser |\n| `r` | Refresh feed |\n| `t` | Toggle theme |\n| `q` · `Ctrl-C` | Quit |\n\n### Story detail (comments)\n\n| Key | Action |\n|---|---|\n| `j` / `↓` · `k` / `↑` | Move comment cursor |\n| `gg` · `G` | First / last |\n| `Ctrl-D` · `Ctrl-U` · `PgDown` · `PgUp` | Half-page |\n| `Space` | Collapse / expand subtree |\n| `Enter` | Open links popup (if comment has any) |\n| `o` | Open story URL |\n| `Esc` · `Backspace` · `h` / `←` | Back to list |\n| `t` | Toggle theme |\n| `q` | Quit |\n\n### Links popup\n\n| Key | Action |\n|---|---|\n| `j` · `k` · `↑` · `↓` | Move |\n| `gg` · `G` | First / last |\n| `o` · `Enter` | Open link |\n| `Esc` · `Backspace` | Close |\n\n### Mouse\n\n- Click a **tab** to switch feeds\n- Click the **`Y` tile** to jump home (Top tab)\n- Click a **story row** to select; click the selected row again to open\n- Click a **comment header** to toggle collapse\n- **Double-click** a comment body to open its links popup\n- Click the **story URL** in detail header to open in browser\n- Click outside the **links popup** to close it\n- **Scroll wheel** to scroll lists and comments\n\n### Selecting & copying text\n\nMouse mode captures clicks, so terminal selection is blocked by default. Bypass it:\n\n- **macOS** (Terminal.app, iTerm2, WezTerm, Ghostty): hold **⌥ Option** while click-dragging, then `⌘C`\n- **Linux** (Kitty, Alacritty, WezTerm, GNOME Terminal): hold **Shift** while click-dragging, then `Ctrl-Shift-C`\n\n## Themes\n\nPress `t` to toggle. Two themes ship:\n\n- **Dark** (default) — black background, orange accents, white text\n- **Light** — true to HN.com: white background, orange topbar, `#f6f6ef` highlights, classic byline greys\n\n## Development\n\n```bash\ngit clone https://github.com/ahmd-sh/hackernuis.git\ncd hackernuis\nbun install\nbun dev    # hot reload\n```\n\nTree:\n\n```\nsrc/\n├── index.tsx              # entry: renderer + <App />\n├── App.tsx                # state machine + keyboard dispatch\n├── theme.ts               # Theme context + dark/light palettes\n├── spinner.ts             # vendored Knight Rider utils\n├── api/                   # HN Firebase client + types\n├── hooks/                 # useStoryIds, useItems, useCommentTree\n├── components/            # Header, StatusBar, StoryRow, CommentNode, Loader, LinksPopup\n├── views/                 # StoryListView, StoryDetailView\n└── utils/                 # format, openUrl\n```\n\nData source: [Hacker News Firebase API](https://github.com/HackerNews/API).\n\n## Acknowledgments\n\n- **[OpenTUI](https://github.com/anomalyco/opentui)** by Anomaly — the native TUI core powering this\n- **[opentui-spinner](https://github.com/msmps/opentui-spinner)** by Matt Simpson — the Knight Rider scanner code is adapted from `examples/knight-rider/utils.ts` (MIT)\n- **[Hacker News](https://news.ycombinator.com)** — for the content and the API\n\n## License\n\n[MIT](./LICENSE) © Ahmed Shaikh\n","readmeFilename":"README.md"}