VS Code Extensions
NPM Script Button

NPM Script Button

by FranciscoBrilhanteFernandes

Run npm scripts from the terminal toolbar with a single button click.

Downloads

3

Rating

— (0)

Version

0.0.2

Last updated

Jul 31, 2026

Adds a Run NPM Script button to the Visual Studio Code terminal toolbar. With a single click, the extension automatically finds the main script defined in your workspace's package.json and runs it in the active terminal. Other scripts will also appear under a dropdown.

The source code is open and available, go check it out (it's only 1 .ts file!).

Features

  • 🚀 Adds a convenient button to the terminal toolbar.
  • 📦 Automatically loads scripts from your workspace's package.json.
  • ▶️ Runs the script in the active terminal with one click.
  • 🛠️ No configuration required.

Requirements

  • A workspace containing a package.json file with scripts entry.

Example:

{
    "scripts": {
        "start": "vite"
    }
}

Click the toolbar button, and the extension will execute:

npm run <your_command>

Configuration

You can change the default script to run under the extension setting @ext:francisco-fernandes.npm-script-button. Just type start, dev, build, etc.

Related extensions