npm pkg get name
Category: Node.js & npm/yarn
npm pkg get name
Read a specific field from package.json without opening the file
Reads the 'name' field from package.json and prints it — useful in shell scripts that need to know the package name without parsing JSON manually.