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

npm-profile-manager

v0.1.1

Published

Profile management for .npmrc files.

Downloads

4

Readme

npm Profile Manager

A cross-platform .npmrc profile manager based on Conrad Pankoff's npmrc. npm Profile Manager seeks to improve on npmrc by enabling:

  1. Complete management of profiles through the CLI, including creation, deletion, renaming, and upgrading of profiles without having to manipulate the file system directly.
  2. Availability of an API to be used in other packages in addition to the npmrc CLI.
  3. Functionality on Windows

Installation

npm i -g npm-profile-manager
npmrc upgrade default # Upgrades your current .npmrc to a profile named "default"

Windows Users

npm Profile Manager uses symbolic links to both identify which profile is currently in use and redirect npm to the correct profile. Sadly, Windows treats symbolic links as a security threat and requires the SeCreateSymbolicLinkPrivilege privelage that is by default granted to only the Administrators group. You can grant the permission to other individuals or groups (including the Everyone group) by setting up a local policy. However, if you are an administrator and have the UAC enabled, you must elevate in order to create symbolic links, no matter what permissions are set. This means you must either:

  1. run npmrc with elevated privileges (using runas or elevating the hosting process), or
  2. disable the UAC

As one of the key goals of npm Package Manager is to be cross-platform, a future version of this package may use a different strategy to redirect .npmrc.

Usage

  • To see a summary of the available commands, use npmrc --help
  • To see the current version of npm Profile Manager, use npmrc --version

Commands

list, ls

Lists the available profiles and notes the current one (if any).

$ npmrc list
  * default
    foo
    bar

switch, sw

Switches to the specified profile. Use with --force to overwrite an existing .npmrc file that is not managed by npm Profile Manager.

$ npmrc switch foo
Switched to profile foo

create, mk

Creates and switches to a profile with the specified name. Use with --force to overwrite an existing profile with the same name.

$ npmrc mk foo
Created profile foo
Switched to profile foo

remove, rm

Removes the profile with the specified name. Use with --force to skip the confirmation step.

$ npmrc rm foo
Are you sure you want to delete npmrc profile "foo" and its cache? [yes/no] (no) yes
Removed profile foo

rename, mv

Renames the current profile to the specified name. use with --force to overwrite an existing profile with the same name.

$ npmrc list
  default
* test
$ npmrc rename foo
test is now named foo
Switched to profile foo

upgrade, up

Creates a profile using the current, unmanaged npmrc. Use with --force to overwrite an existing profile with the same name.

The name of the new profile may be provided as an argument:

$ npmrc upgrade foo
Switched to profile foo

or, if it is not specified, it will be prompted:

$ npmrc upgrade
New profile name: foo
Switched to profile foo