Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here


Browse Hacker News like a haxor: A Hacker News command line interface (CLI).

Subscribe to updates I use haxor-news

Statistics on haxor-news

Number of watchers on Github 2526
Number of open issues 23
Average time to close an issue 8 days
Main language Python
Average time to merge a PR about 14 hours
Open pull requests 3+
Closed pull requests 4+
Last commit almost 2 years ago
Repo Created over 4 years ago
Repo Last Updated almost 2 years ago
Size 359 KB
Organization / Authordonnemartin
Latest Release0.4.2
Page Updated
Do you use haxor-news? Leave a review!
View open issues (23)
View haxor-news activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating haxor-news for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


Build Status Dependency Status

PyPI version PyPI License


Coworker who sees me looking at something in a browser: Glad you're not busy; I need you to do this, this, this...

Coworker who sees me staring intently at a command prompt: Backs away, slowly...


Check out the haxor-news discussion in this Hacker News post.

haxor-news brings Hacker News to the terminal, allowing you to view/filter the following without leaving your command line:

  • Posts
  • Post Comments
  • Post Linked Web Content
  • Monthly Hiring and Freelancers Posts
  • User Info
  • Onions

haxor-news helps you filter the large number of comments that popular posts generate.

  • Want to expand only previously unseen comments?
    • -cu/--comments_unseen
  • How about recent comments posted in the past 60 minutes?
    • -cr/--comments_recent
  • Filter comments matching a regex query?
    • -cq/--comments_query [query]


Job hunting or just curious what's out there? Filter the monthly who's hiring and freelancers post:

$ hn hiring "(?i)(Node|JavaScript).*(remote)" > remote_web_jobs.txt

Combine haxor-news with pipes, redirects, and other command line utilities. Output to pagers, write to files, automate with cron, etc.

haxor-news comes with a handy optional auto-completer with interactive help:






Installation and Tests




$ hn <command> [params] [options]

Auto-Completer and Interactive Help

Optionally, you can enable fish-style completions and an auto-completion menu with interactive help:

$ haxor-news

If available, the auto-completer also automatically displays comments through a pager.

Within the auto-completer, the same syntax applies:

haxor> hn <command> [params] [options]



Customizable Highlighting

You can control the ansi colors used for highlighting by updating your ~/.haxornewsconfig file.

Color options include:

'black', 'red', 'green', 'yellow',
'blue', 'magenta', 'cyan', 'white'

For no color, set the value(s) to None.




View Posts

View the Top, Best, Show, Show, Ask, Jobs, New, and Onion posts.


$ hn [command] [limit]  # post limit default: 10


$ hn top
$ hn show 20


View a Post's Linked Web Content

After viewing a list of posts, you can view a post's linked web content by referencing the post #.

The HTML contents of the post's link are formatted for easy-viewing within your terminal. If available, the formatted output is sent to a pager.

See the View in a Browser section to view the contents in a browser instead.


$ hn view [#]


$ hn view 1
$ hn view 8


View and Filter a Post's Comments

View All Comments

After viewing a list of posts, you can view a post's comments by referencing the post #.


$ hn view 8 -c
$ hn view 8 --comments > comments.txt

Paged Comments

If running with the auto-completer, comments are automatically paginated. To get the same pagination without the auto-completer, append | less -r:

$ hn view 8 -c | less -r


Filter on Unseen Comments

Filter comments to expand only those you have not yet seen. Unseen comments are denoted with a [!] and are fully expanded.

Seen comments will be truncated with [...] and will be shown to help provide context to unseen comments.


$ hn view 8 -cu
$ hn view 8 --comments_unseen | less -r


Filter on Recent Comments

Filter comments to expand only those posted within the past 60 minutes.

Older comments will be truncated with [...] and will be shown to help provide context to recent comments.


$ hn view 8 -cr | less -r
$ hn view 8 --comments_recent


Filter with Regex

Filter comments based on a given regular expression query.


$ hn view 2 -cq "(?i)programmer" | less -r
$ hn view 2 --comments_regex_query "(?i)programmer" > programmer.txt

Case insensitive regex: (?i)


Hide Non-Matching Comments

When filtering comments for unseen, recent, or with regex, non-matching comments are collapsed to provide context. To instead hide non-matching comments, pass the -ch\--comments_hide flag. Hidden comments will be displayed as ..


$ hn view 8 -cu -ch | less -r


Filter the Monthly Hiring Post

Hacker News hosts a monthly hiring post where employers post the latest job openings.


$ hn hiring [regex filter]


$ hn hiring ""
$ hn hiring "(?i)JavaScript|Node"
$ hn hiring "(?i)(Node|JavaScript).*(remote)" > remote_jobs.txt

Case insensitive regex: (?i)


To search a different monthly hiring post other than the latest, use the hiring post id.


$ hn hiring [regex filter] [post id]

Filter the Freelancers Post

Hacker News hosts a monthly freelancers post where employers and freelancers post availabilities.


$ hn freelancer [regex filter]


$ hn freelancer ""
$ hn freelancer "(?i)JavaScript|Node"
$ hn freelancer "(?i)(Node|JavaScript).*(remote)" > remote_jobs.txt

Case insensitive regex: (?i)


To search a different monthly hiring post other than the latest, use the hiring post id.


$ hn freelancer [regex filter] [post id]

Combine With Pipes and Redirects

Output to pagers, write to files, automate with cron, etc.


$ hn view 1 -c | less
$ hn freelancer "(?i)(Node|JavaScript).*(remote)" > remote_jobs.txt


View User Info


$ hn user [user id]


View Onions


$ hn onion [limit]  # post limit default: all


View in a Browser

View the linked web content or comments in your default browser instead of your terminal.


$ hn <command> [params] [options] -b
$ hn <command> [params] [options] --browser

Windows Support

haxor-news has been tested on Windows 10.

Pager Support

Pager support on Windows is more limited as discussed in the following ticket. Users can direct output to a pager with the | more command:

$ hn view 1 -c | more

Config File

On Windows, the .haxornewsconfig file can be found in %userprofile%. For example:


cmder and conemu

Although you can use the standard Windows command prompt, you'll probably have a better experience with either cmder or conemu.


Pip Installation

PyPI version PyPI

haxor-news is hosted on PyPI. The following command will install haxor-news:

$ pip install haxor-news

You can also install the latest haxor-news from GitHub source which can contain changes not yet pushed to PyPI:

$ pip install git+

If you are not installing in a virtualenv, run with sudo:

$ sudo pip install haxor-news

Once installed, run the optional haxor-news auto-completer with interactive help:

$ haxor-news

Run commands:

$ hn <command> [params] [options]

Virtual Environment Installation

It is recommended that you install Python packages in a virtualenv to avoid potential issues with dependencies or permissions.

To view haxor-news virtualenv installation instructions, click here.

Mac OS X 10.11 El Capitan Users

There is a known issue with Apple and its included python package dependencies (more info at We are investigating ways to fix this issue but in the meantime, to install haxor-news, you can run:

$ sudo pip install haxor-news --upgrade --ignore-installed six

Supported Python Versions

  • Python 2.6
  • Python 2.7
  • Python 3.3
  • Python 3.4
  • Python 3.5

Supported Platforms

  • Mac OS X
    • Tested on OS X 10.10
  • Linux, Unix
    • Tested on Ubuntu 14.04 LTS
  • Windows
    • Tested on Windows 10

Developer Installation

If you're interested in contributing to haxor-news, run the following commands:

$ git clone
$ pip install -e .
$ pip install -r requirements-dev.txt
$ haxor-news
$ hn <command> [params] [options]

Continuous Integration

Build Status

Continuous integration details are available on Travis CI.

Dependencies Management

Dependency Status

Dependencies management details are available on Gemnasium.

Unit Tests and Code Coverage

Run unit tests in your active Python environment:

$ python tests/

Run unit tests with tox on multiple Python environments:

$ tox


Source code documentation will soon be available on Check out the source docstrings.

Run the following to build the docs:

$ scripts/


Contributions are welcome!

Review the Contributing Guidelines for details on how to:

  • Submit issues
  • Submit pull requests


Contact Info

Feel free to contact me to discuss any issues, questions, or comments.

My contact info can be found on my GitHub page.


I am providing code and resources in this repository to you under an open source license. Because this is my personal repository, the license you receive to my code and resources is from me and not my employer (Facebook).


Copyright 2015 Donne Martin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.
haxor-news open issues Ask a question     (View All Issues)
  • over 3 years Update latest monthly hiring post ids (December 2016)
  • over 3 years FR: please make list of posts and comments browsable
  • over 3 years Update to prompt-toolkit 1.0.0+
  • over 3 years Command to view next [#] posts
  • almost 4 years Six issue when installing package on OS X 10.11 El Capitan
  • almost 4 years Extending it to other sites
  • almost 4 years Share link to interesting article
  • almost 4 years Add support for just viewing the main text from a webpage like readability.
  • almost 4 years Firebase API does not expose several "hidden" filters/lists of data.
  • almost 4 years Feature request - upvote
  • almost 4 years Config reader parses "none" values but writes "None" back to config file
  • almost 4 years Allow to ignore certificate verification
  • almost 4 years Add support for searching posts and comments
  • almost 4 years Add support for submitting posts and comments
  • almost 4 years Add support for monthly Ask HN: Who wants to be hired?
  • almost 4 years Improve pager support for hn view of a post's linked contents on Windows
  • almost 4 years urllib3\util\ SNIMissingWarning, InsecurePlatformWarning
haxor-news open pull requests (View All Pulls)
  • New command to view next [x] posts
  • [WIP] Upgrade to prompt_toolkit 2.0
  • Feature reader mode
haxor-news list of languages used
haxor-news latest release notes


0.4.2 (2017-04-08)

Bug Fixes

  • #94 - Update to prompt-toolkit 1.0.0, which includes a number of performance improvements (especially noticeable on Windows) and bug fixes.


0.4.1 (2016-05-30)

Bug Fixes

  • #62 - Fix prompt-toolkit v1.0.0 hanging while autocompleting the hn view command. Revert back to prompt-toolkit v0.52. This bug only happens on Windows.


0.4.0 (2016-05-30)


  • #52 - Add exit and quit commands, which can be used instead of ctrl-d.
  • #53 - Allow clicking of urls in some terminals to open in a browser.

Bug Fixes

  • #36 - Fix crash caused by Unicode comments on Windows.
  • #59 - Update to prompt-toolkit 1.0.0, which includes a number of performance improvements (especially noticeable on Windows) and bug fixes.
  • Fix some comments and docstrings.


  • #48, #50 - Update latest monthly hiring post ids.
  • #56 - Update packaging dependencies based on semantic versioning.
  • Fix Config docstrings.
  • Update README:
    • Update intro
    • Add Hacker News discussion of haxor-news
    • Update comments discussion and examples
    • Update TODO
    • Fix urls based on redirects
    • Remove buggy Codecov graph
    • Add note about OS X 10.11 pip installation issue
  • Add Gemnasium dependencies management.
  • Update links in CONTRIBUTING.
Other projects in Python