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.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.