# npm init -y

npm init -y is a quick way to generate a package.json file in your project directory without having to answer all the questions manually.

**📦 What it does:**

When you run:

```plaintext
npm init -y
```

It creates a default package.json file that looks like this:

```plaintext
{
  "name": "your-project-folder-name",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}
```

You can then install packages like Vite, React, Vue, etc., and configure your scripts later.

---

**✅ When to use it:**

• When you’re starting a new Node.js or frontend project.

• When you want to install dev tools (like Vite) in an **existing folder** that’s not initialized yet.

---
