Hacker News
Browse Hacker News directly from your terminal - view top stories, best stories, new stories, Ask HN, Show HN, and job postings.
Hacker News Plugin
Browse Hacker News directly from your terminal - view top stories, best stories, new stories, Ask HN, Show HN, and job postings.
Features
- Multiple Topics: Browse Top, Best, New, Ask HN, Show HN, and Jobs
- Story Details: View scores, comment counts, authors, and time posted
- Interactive Browser: Navigate and interact with stories using keyboard
- Quick Actions: Open articles, view comments, or copy URLs
- Smart Caching: Responses cached for 5 minutes to reduce API calls
- Domain Extraction: See which domain each story links to
Installation
lla install
# Then enable the plugin
lla use # Select hackernewsUsage
View Stories by Topic
lla plugin run hackernews top # Top stories (front page)
lla plugin run hackernews best # Best stories
lla plugin run hackernews new # Newest stories
lla plugin run hackernews ask # Ask HN
lla plugin run hackernews show # Show HN
lla plugin run hackernews jobs # Job postingsOpen a Story
# After viewing a list, open story #1
lla plugin run hackernews open -- 1View Comments
# Open HN comments for story #1
lla plugin run hackernews comments -- 1Copy Story URL
# Copy URL of story #1 to clipboard
lla plugin run hackernews copy -- 1Interactive Browser
lla plugin run hackernews browse -- # Browse default topic
lla plugin run hackernews browse -- top # Browse specific topicInteractive Menu
lla plugin run hackernews menuClear Cache
lla plugin run hackernews clear-cacheShow Help
lla plugin run hackernews helpConfiguration
The plugin stores its configuration in ~/.config/lla/hackernews/config.toml:
default_topic = "Top" # Default topic to show
story_count = 30 # Number of stories to fetch
cache_duration_secs = 300 # Cache duration (5 minutes)
[colors]
success = "bright_green"
info = "bright_cyan"
title = "bright_white"
score = "bright_yellow"
comments = "bright_cyan"
domain = "bright_blue"
time = "bright_black"
author = "bright_magenta"Output Example
đĨ Top Stories (30 stories)
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
1. Show HN: I built a terminal file manager in Rust (github.com)
â˛342 đŦ89 âĸ by rustdev 3h ago
2. The decline of the American mall (nytimes.com)
â˛256 đŦ145 âĸ by journalist 5h ago
3. PostgreSQL 17 Released (postgresql.org)
â˛198 đŦ67 âĸ by pgfan 2h ago
4. Ask HN: What's your favorite CLI tool? (news.ycombinator.com)
â˛167 đŦ234 âĸ by curious_dev 4h ago
5. Why I switched from VS Code to Neovim (medium.com)
â˛134 đŦ89 âĸ by vimuser 6h ago
ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ
âšī¸ Use 'open <number>' to open a story in your browserInteractive Browser
The interactive browser (browse action) provides a keyboard-driven interface:
- Use arrow keys to navigate stories
- Press Enter to select a story
- Choose to:
- đ Open article in browser
- đŦ Open HN comments
- đ Copy URL to clipboard
- Use menu options to:
- đ Refresh stories
- đ Change topic
- â Go back
API Information
This plugin uses the official Hacker News API:
- Stories are fetched in batches for better performance
- Results are cached locally for 5 minutes
- No authentication required
Tips
- Stay Updated: Use
topfor trending stories,newfor the latest - Job Hunting: The
jobstopic shows YC startup job postings - Quick Browse: Use
browsefor a keyboard-driven experience - Clear Cache: Use
clear-cacheif stories seem stale