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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nrd

v1.1.3

Published

Download directly from the npm registry without using npm

Downloads

66

Readme

nrd

Download an npm registry package tar file directly. nrd is short for npm registry download. It is also for nerds. nrd is useful for easily inspecting source code of modules and creating project scaffolds. Instead of creating a repo that has a template folder inside of it and copying files over, a project can be versioned, and directly downloaded from npm into a project without dependency resolution issues. For example:

# Downloads my scaffold project from npm and renames it to `myapp`
my-cli-using-nrd create myapp

# Other examples
marko create myapp
create-react-app myapp
ember new myapp
ng new myapp

Install

npm install nrd --save

nrd also comes packaged with a command line utility enabling you to download a package from npm to any specific directory from the command line. You obviously need it. You can install nrd globally with:

npm install nrd -g

Usage:

Download a package to the current directory and decompress the tar:

const nrd = require('nrd');

nrd.download('express');

Download a package to a specific directory and decompress the tar:

const nrd = require('nrd');

nrd.download('express', {
  dir: '/Users/me/Desktop'
});

Download a specific version of a package:

const nrd = require('nrd');

nrd.download('express', {
  dir: '/Users/me/Desktop',
  version: "4.13.1"
});

Options

Available options:

const nrd = require('nrd');

nrd.download('express', {
  ...
});
  • tag {String} - A version tag to download (defaults to latest)
  • version {String} - The version to download from npm
  • dir {String} - Directory to download the file to (default to current directory)
  • untar {Boolean} - Whether the registry file should be untarred or not (defaults to true)
  • registry {String} - Change the remote npm registry to use (defaults to https://registry.npm.org).

CLI

nrd comes packaged with a fantastic command line utility. Trust me, I created it.

Download a package to the current directory and decompress the tar:

nrd express

Download a package to a specific directory and decompress the tar:

nrd express --dir /Users/me/Desktop

CLI Help / Options

Running nrd --help will give you all of the information you need!

[master] $ nrd --help
Usage: nrd [options]

Examples:

  Download an npm module to a specific directory:
     nrd express --dir /Users/me/Desktop

  Download a module from npm using a specific version:
     nrd express --version 4.14.1

  Download a module from npm using a specific tag:
     nrd express --tag beta

Options:

  --help Show this help message [string]

  --dir -d Directory to download the module into (defaults to current directory) [string]

  --tag -t A version tag to download (defaults to latest) [string]

  --version -v The version to download from npm [string]

  --untar -u Whether the registry file should be untarred or not (defaults to true) [boolean]

  --registry -r Change the remote npm registry to use (defaults to https://registry.npm.org) [string]

  --module -m * npm module name [string]