Forrest logo
tool overview
On this page you find all important commands for the CLI tool hn. If the command you are looking for is missing please ask our AI.

hn

"hn" is a command line tool that provides a way to view and interact with news articles from Hacker News. It allows users to browse the top stories, read article contents, and view comments associated with each article.

The tool retrieves the latest data from the Hacker News API and presents it in a terminal-friendly format, making it easy for users to consume the information without leaving the command line.

Users can navigate through the list of articles using arrow keys or j/k keybindings, and select an article to read by pressing enter. Once an article is selected, the tool displays the article title, URL, points, author, and timestamp.

Users can also view the comments associated with an article by pressing the 'c' key. The comments are displayed in a hierarchical format, with indentation indicating the parent-child relationship. Users can navigate through the comments using j/k and expand or collapse comment threads using the enter key.

To exit the tool, users can press 'q' or Ctrl+C. The tool also provides a search functionality, allowing users to search for specific articles by entering keywords.

Overall, "hn" offers a convenient way to stay updated with the latest news and discussions on Hacker News, all within the command line environment.

List of commands for hn:

  • hn:tldr:59ca4 hn: View stories on Hacker News.
    $ hn
    try on your machine
    explain this command
  • hn:tldr:86f6e hn: View stories on Hacker News, and keep the list open after selecting a link.
    $ hn --keep-open
    try on your machine
    explain this command
  • hn:tldr:952db hn: View stories on Hacker News sorted by submission date.
    $ hn --latest
    try on your machine
    explain this command
  • hn:tldr:953c9 hn: View _number_ of stories on Hacker News.
    $ hn --limit ${number}
    try on your machine
    explain this command
tool overview