Skip to main content

Command line tool to display HN top stories

Project description

hckrnews - Hacker News CLI Viewer

A command line tool to display the top stories from Hacker News using the API provided by hckrnews.com.

Hacker News CLI Screenshot

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Features

  • View top stories from Hacker News in your terminal
  • Color-coded titles based on story score:
    • Green: Top 10 stories
    • Yellow: Stories ranked 11-20
    • Purple: Stories in the top 50% (excluding top 20)
    • Grey: Other stories
  • 2-column layout showing titles and points/comments
  • Various filtering options:
    • Top 10 stories
    • Top 20 stories
    • Top 50% of stories
    • All stories
  • Navigation between different days
  • Multiple sorting options:
    • By points
    • By comments
    • By submission date
  • Keyboard shortcuts for all actions

Installation

From PyPI (Recommended)

Install directly from PyPI:

pip install hckrnews

Or if you're using uv:

uv pip install hckrnews

Development Installation

Clone this repository and install in development mode:

cd hckrnews
pip install -e .

Or if you're using uv:

cd hckrnews
uv pip install -e .

Usage

Simply run the hckrnews command to start the application:

hckrnews

Keyboard Shortcuts

  • j - Previous day (earlier)
  • k - Next day (later)
  • l - Open comments page in browser
  • space - Open story URL in browser
  • 1 - Show top 10 stories
  • 2 - Show top 20 stories
  • 3 - Show top 50% stories
  • 4 - Show all stories
  • p - Sort by points
  • c - Sort by comments
  • d - Sort by date
  • r - Refresh current view
  • q - Quit the application
  • Arrow keys - Navigate between stories

Data Source

Data is fetched from the hckrnews.com API: https://hckrnews.com/data/YYYYMMDD.js

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hckrnews-0.1.0.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hckrnews-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file hckrnews-0.1.0.tar.gz.

File metadata

  • Download URL: hckrnews-0.1.0.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for hckrnews-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a24ce2d3837571ac1aeb6c1d0db28eabb5d849d51908a0af94958534c048f14d
MD5 7113041b463e1fbb47f4bebfc7188349
BLAKE2b-256 0669126069fbb0f119fd23041cd8c00e5227ffa2ed60be9720d8704c319681db

See more details on using hashes here.

File details

Details for the file hckrnews-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hckrnews-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for hckrnews-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4d79fb583357b78ad39eaf1e970e7493ecfa379e0d1bbfba934d349bb8391b4
MD5 7851ba1dcb9cd15f22eed363196aa760
BLAKE2b-256 efec7e47997258b120b0044b9d78e68e1827b5023ef7a3f2823fd0eb23697f57

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page