TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

DevOps .npmrc CLI

npm version npm version

CLI tool for adding Azure DevOps artifact feed to .npmrc on unix based systems like macOS or Linux.

Works for both npm and yarn.


To use the tool you will need:

  • DevOps organization name
  • DevOps artifact feed name
  • A personal access token (global file only)
  1. Find the name of your organization and feed

    • Go to and log in to your organization.
    • Select the project where your feed is located and navigate to Artifacts in the menu to the left.
    • Select the feed you wish to add to .npmrc from the dropdown menu in the top left corner.
    • Retrieve organization and feed from the url:<organization>/Your.Project/_artifacts/<feed>
  2. Generate a personal access token

Quick start

Before using the tool make sure you have all the prerequisites.

Add a registry to the global .npmrc file

npx devops-npmrc@latest

To be able to install packages you also need to add a .npmrc file to your project

# cd to your project
cd /path/to/your/project

# Then run
npx devops-npmrc@latest -p

To verify that everything is working you can run the following

npm config get registry

# Or using yarn
yarn info <package_in_devops_registry>


Add a registry to the global .npmrc file

npx devops-npmrc@latest

Add a .npmrc file to a project

npx devops-npmrc@latest -p

Available options

  • -p, --projectGenerate a .npmrc file for a project instead of a global file
  • -V, --versionoutput the version number
  • -h, --helpdisplay help


If you are using yarn you can select yarn when asked what package manager you are using, this will generate both a .npmrc file and a .yarnrc.yml file.


If you wish to contribute, here are some steps to get started:

  1. Fork the repo and clone it to your local machine.
  2. Install dependencies by running yarn
  3. Make your changes
  4. Build and bundle the project
  5. Push to github and submit a pull request

Build and bundle the project

Build the project

yarn build

Bundle the project

yarn bundle

Run the executable (located in the bin directory)

yarn run-bin

Package Sidebar


npm i devops-npmrc

Weekly Downloads






Unpacked Size

911 kB

Total Files


Last publish