
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
local-npm-config
Advanced tools
Do you work across multiple machines on JavaScript projects? If yes is your answer, then you might want to answer the question:
How many times do you type npm init -y in your favorite shell?
What if you could keep a stable npm configuration across those machines and set up sensible defaults for npm?
The primary goal of this project is to make it easy to create, share and apply npm init configuration files without exposing your ".npmrc" content, which might contain sensible info about your npm account (tokens maybe?).
Note: to use this CLI application, you have to have installed Node.js and a console you can run commands into. The minimum required version of Node.js is: 14 - codename "Fermium".
In your console, run the following command:
$ npm install -g local-npm-config
In your console, all the following commands print the help of the module:
$ local-npm-config --help$ localnpm -hYou can export the npm init configuration from a file so that you can share it between environments easily. This feature goes through the CLI prompt and writes the result into a JSON file in the current working directory (the directory in which you run the app).
$ local-npm-config -e
Note: at the moment, you can not change the name of the generated file.
The generated file, named "local-npm-config.json", has the following structure:
{
"author": {
"name": "<name>",
"email": "<email>",
"url": "<url>"
},
"license": "<license>",
"version": "<version>"
}
To minimize file size (even though it currently isn't a problem), if a value is left blank, it does not exist in the generated file. The app validates the exported configuration against a JSON schema before writing it to the file.
This command supports the dry run option (-d argument).
You can apply the npm init configuration from a file, maybe exported by this very app, so that you can keep configurations synced easily.
$ local-npm-config -i <local_or_remote_path>
For example, if my configuration lives on this gist, I could use either one of the following commands to apply it to my current local environment:
# First option!
# Since I need the raw JSON file from the gist, I just copied the URL of the "raw" gist
$ local-npm-config -i https://gist.githubusercontent.com/niktekusho/b4f229c24db26512f02b552401053a7c/raw/188f486f0433759bf9b3a2b6c3de29111cd38fc1/npm-init-config.json
# Second option!
# Use the browser to download the file into my "downloads" directory and give the CLI its path
$ local-npm-config -i ~/downloads/npm-init-config.json
This command supports the dry run option (-d argument).
FAQs
Manage your local npm configuration across multiple machines easily!
We found that local-npm-config demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.