How can I check or list all available scripts in a project's `package.json` file?

Question

Grade: Education Subject: Support
How can I check or list all available scripts in a project's `package.json` file?
Asked by:
81 Viewed 81 Answers

Answer (81)

Best Answer
(438)
You can easily inspect all scripts defined in a project's `package.json` by running the command `npm run` (without any script name). This command will output a list of all scripts found under the `"scripts"` section of your `package.json`, along with their corresponding commands. This is an extremely useful tool for quickly understanding what commands are available in an unfamiliar project or for verifying your own script definitions.