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

@mrbbot/hilite

v1.2.0

Published

Bulk code highlighter with HTML/PDF export

Readme

Hilite

Highlights code in bulk, and then exports an HTML and a PDF file.

Installation

Install it globally using npm or Yarn.

npm i -g @mrbbot/hilite

yarn global add @mrbbot/hilite

Usage

To highlight all files in the src directory, and output index.html and index.pdf in the current directory run the following command:

hilite src

You can specify as many locations to highlight so if you also wanted to highlight files in the dist directory:

hilite src dist

You can also specify globs to match:

hilite src/**/*.js

If you want to change the output file names, you can use the --output (-o) flag. For example, the following command will output to code.html and code.pdf instead of the normal index:

hilite src -o code

Additionally, if you're just looking for HTML output, you can disable the PDF export with the --pdf (-p) flag:

hilite src -p false

This will only generate an index.html file.

Customisation

Prism Theme

Hilite uses Prism for code highlighting, so if you don't like the default theme, you can easily change it using the --theme (-t) flag to either one of the presets, or your own custom one.

If you wanted to change the output to use the funky theme:

hilite src -t funky

Other available presets are:

  • default (this is the actual default prism theme, Hilite uses its own simplified version normally)
  • dark
  • okaidia
  • twilight
  • coy
  • solarized-light
  • tomorrow-night

If you had a custom theme stored in theme.css, you could use it with the following command:

hilite src -t theme.css

Heading Level

You can change the level of the code filename headings with the --level (-l) flag. For instance to use <h2> tags instead of the default <h1>s:

hilite src -l 2

Margin

Finally, you can also change the amount of margin in the PDF export using the --margin (-m) flag.

hilite src -m 1in

You must include the unit in your value.