npm init -y

Category: Node.js & npm/yarn

npm init -y

Initialize npm project with all defaults, no prompts

Creates a package.json with all default values, skipping the interactive questions. -y means 'yes to everything'.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.