hckrnews - Hacker News CLI Viewer
A command line tool to display the top stories from Hacker News using the API provided by hckrnews.com.
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 browserspace- Open story URL in browser1- Show top 10 stories2- Show top 20 stories3- Show top 50% stories4- Show all storiesp- Sort by pointsc- Sort by commentsd- Sort by dater- Refresh current viewq- Quit the application- Arrow keys - Navigate between stories
Data Source
Data is fetched from the hckrnews.com API:
https://hckrnews.com/data/YYYYMMDD.js
Development Tools
Version Bumping
The project includes a version bumping script that helps maintain consistent versioning across the codebase. It updates:
- Version in pyproject.toml
- User-Agent version in API requests
- Git commits (optional)
- Git tags (optional)
Usage:
# Increment patch version (0.1.0 -> 0.1.1)
python bump_version.py patch
# Increment minor version (0.1.0 -> 0.2.0)
python bump_version.py minor
# Increment major version (0.1.0 -> 1.0.0)
python bump_version.py major
# Set specific version
python bump_version.py --set 0.2.0
# Increment version and create git commit
python bump_version.py patch --commit
# Increment version, create commit and git tag
python bump_version.py patch --tag
When using the --tag option, the script automatically creates a commit with message "chore: version bump to x.y.z" before tagging.
Metadata
Release files for hckrnews 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hckrnews-0.1.1.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hckrnews-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.2 kB
Release files / hckrnews-0.1.1.tar.gz
| Download URL | hckrnews-0.1.1.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
14720734319d10e563563e254e55549c941d669ce17c89bf774cf327354de2b7
|
|
BLAKE2b-256 checksum How to use checksums |
d19d7496d756d599a0fa9e222719f960993570c7443a1ce6990b1c4d69bfa427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / hckrnews-0.1.1-py3-none-any.whl
| Download URL | hckrnews-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef11e721e2f0543fada61664f17b0d4ea82450234493a50ec7525b11d3c0db52
|
|
BLAKE2b-256 checksum How to use checksums |
21f94392e02d0c153485baf379f2e9cf4d05075e7a1a18ab84424a01a86d061a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|