A terminal-based application for browsing Hacker News. Navigate stories, read comments, search, and open links - all from your terminal with keyboard-driven controls.
- Browse multiple feeds: Top, New, Best, Ask HN, and Show HN
- View story details and navigate nested comment threads
- Search stories using the Algolia HN Search API
- Open story URLs in your default browser
- Vim-style keyboard navigation (hjkl)
- Dart SDK 3.0 or higher
# Clone the repository
git clone <repository-url>
cd hndart
# Install dependencies
dart pub get
# Run the application
dart runLaunch the application:
dart run| Key | Action |
|---|---|
| j / Down | Next story |
| k / Up | Previous story |
| l / Right / Enter | View story comments |
| o | Open URL in browser |
| / | Search |
| r | Reload feed |
| 1-5 | Switch feed (Top/New/Best/Ask/Show) |
| Tab | Cycle to next feed |
| Esc | Quit |
| Key | Action |
|---|---|
| j / Down | Next comment |
| k / Up | Previous comment |
| l / Right / Enter | View replies to selected comment |
| h / Left | Go back |
| o | Open URL in browser |
| Esc | Quit |
| Key | Action |
|---|---|
| Enter | Submit search |
| Esc | Cancel search |
| j / Down | Next result |
| k / Up | Previous result |
| o | Open URL in browser |
hndart/
bin/
hndart.dart # Application entry point
lib/
src/
api/
hn_client.dart # Hacker News API client
models/
story.dart # Story data model
comment.dart # Comment data model
tui/
app.dart # Main application component
story_list.dart # Story list view
story_detail.dart# Story detail and comments view
feed_selector.dart# Feed tab selector
search_view.dart # Search interface
test/
tui/ # Component tests
dart test --concurrency=1The --concurrency=1 flag is required because the terminal UI test framework uses a singleton binding.
This application uses two APIs:
- Hacker News Firebase API (
https://hacker-news.firebaseio.com/v0) - Story and comment data - Algolia HN Search API (
https://hn.algolia.com/api/v1) - Story search
MIT