npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hackerpub

v1.1.2

Published

Post items to Hacker News

Readme

hackerpub

Post items to Hacker News

Installation

$ npm install --save hackerpub

Usage

The example shown below will post a link on HackerNews.

var hackerpub = require('hackerpub');

hackerpub({
  username: '{{your HN username}}',
  password: '{{your HN password}}',
  title: 'Example Blog Article',
  url: 'http://exampleblog.com/articles/example-blog-article'
}, done);

function done (err, res, body, discuss) {
  // handle response
}

API

hackerpub(options, done)

Posts an article on HN by making a series of requests against their website. Takes some options, detailed below.

Property | Description -----------|------------------------------------------------------------------------------------ username | Your HackerNews username, used to authenticate, and to post the news on your behalf password | Your HackerNews password, used to authenticate title | A title for the news item url | The URL to the news item text | A description of the news item

Note that url and text are exclusive. If you include both, the url will take precedence and the text will be ignored.

When the requests against HN are done, the done callback will be invoked with four arguments.

  • err will have an error if one occurred, and null otherwise
  • res will be a response object
  • body will be the response body
  • discuss will be a link to the discussion on Hacker News

CLI

The CLI has a simple interface. You'll be asked for your credentials once, and they'll be stored at ~/.hpub. You can edit that file directly, the CLI expects YAML.

$ cat ~/.hpub
username: foo,
password: foo
$ hpub -t "some title" -u http://exampleblog.com -x "some text"
> https://news.ycombinator.com/item?id=$YOUR_HN_DISCUSSION

CLI Usage

Usage:
  hpub <options>

Options:
  -t, --title      | Title for the news item
  -u, --url, --uri | URL to the news item
  -x, --text       | Text describing the news item

Note that you should use either an URL or the --text option.

License

MIT