npm init Explained
What npm init does, with an example.
Published November 11, 2026
npm init creates a new package.json file, prompting for basic project details.
Key points
- Part of the standard npm CLI that ships with Node.js
Example
npm init -yWhat npm init does, with an example.
Published November 11, 2026
npm init creates a new package.json file, prompting for basic project details.
npm init -y