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

mdreflink

v0.0.8

Published

Convert Markdown inline links to reference links with smart placement

Readme

MDREFLINK

mdreflink rewrites Markdown files to use reference-style links. It finds all inline links, such as [text](href), and converts them to the shortcut reference format, [text].

A link's definition is placed at the end of the first section in which the link's link text appears. Definitions are collected, de-duplicated, and sorted lexicographically by their link text within their respective sections.

The program is a command-line tool that reads from standard input or a file and writes to standard output or back to the source file.

Installation

Install globally using npm:

npm install -g mdreflink

Or run directly without npm installation using npx:

npx mdreflink document.md

This npx approach is beneficial when you want to use mdreflink occasionally without permanently installing it on your system, or when you want to ensure you're always using the latest version without managing updates manually.

Usage

The mdreflink tool operates in several modes.

Read from a file, write to standard output:
Provide a file path as an argument. The formatted content is written to stdout.

mdreflink document.md > formatted.md

Read from standard input, write to standard output:
If no file path is given, or if the path is -, the program reads from stdin.

mdreflink < document.md > formatted.md

Modify a file in-place:
The -w flag instructs the program to modify the Markdown file directly.

mdreflink -w document.md

Note: The in-place flag is invalid when reading from standard input.

Developer and Maintainer Instructions

Note that I am not a fluent JavaScript or TypeScript developer, so I am providing this mostly for posterity for myself. This was probably my deepest foray into that ecosystem for a project.

Notes

This tool was initially developed through — drum roll — vibe coding the initial project specification and heavily hand iterating on the output. It taught me a lot about a complex and ornate ecosystem that I otherwise knew little about.

This was my first time really vibe coding a project. If you see something curious or suboptimal, please flag it. At this point, will be developing this exclusively by hand.

CI Security Cross-Platform Package Health

npm version npm downloads Node.js Version

codecov License

Development Setup

A Node.js environment is required for development. After cloning the repository, install the project dependencies:

npm install

This command installs libraries necessary for TypeScript compilation, code execution, and testing.

Building

To compile the TypeScript source code into JavaScript, run the build script:

npm run build

This command uses the TypeScript compiler (tsc) to transpile the source files from src/ into the dist/ directory, as specified in tsconfig.json, and then uses esbuild to bundle the sources and transitive dependencies into a CLI executable.

Testing

To run the general test suite:

npm test

To update the test golden files ("snapshots"):

npm run test:update

Smoke testing can be achieved with:

npm test test:e2e

To run tests with coverage reporting:

npm run coverage

Developer Workflows

For local development, after building, you can link the package to make the mdreflink command available globally:

npm link
mdreflink document.md

To uninstall the global link:

npm unlink -g mdreflink

For local development without npm link, you can also run directly:

node dist/index.js document.md > formatted.md

Package Validation

To validate the package configuration before publishing:

npm run lint:package

This runs publint to check for common packaging issues.

To preview what will be published:

npm pack

This creates a tarball showing exactly what files will be included in the published package. Remember to clean up the generated .tgz file afterward.

Release Tagging

This project uses automated releases triggered by Git tags. Tags must follow the v{version} format (e.g., v1.2.3) to match JavaScript ecosystem conventions.

To create a new release:

  1. Update the version in package.json:

    npm version patch  # or minor, major
  2. Create an annotated tag with release notes:

    git tag -a v1.2.3 -m "Release v1.2.3
    
    - Add feature X
    - Fix bug Y
    - Update dependencies"
  3. Push the tag to trigger automated release:

    git push origin v1.2.3

The GitHub Actions workflow will automatically:

  • Run all tests (unit and e2e)
  • Validate the package
  • Publish to npm with provenance
  • Create a GitHub release

Note: The tag version (without 'v' prefix) must exactly match the version in package.json or the release will fail.