Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Script Runner helperNew to Visual Studio Code? Get it now.
Script Runner helper

Script Runner helper

tryToDEv

|
3 installs
| (0) | Free
Run NPM scripts directly from VS Code sidebar with quick access and terminal integration
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

NPM Runner Extension

A VS Code extension to run NPM scripts defined in package.json from a sidebar tree view.

Features

  • Sidebar Tree View: Displays all NPM scripts from package.json in a tree structure
  • Script Execution: Run any script with a single click
  • Terminal Integration: Choose between integrated VS Code terminal or external terminal
  • Auto Refresh: Automatically refreshes script list when package.json changes
  • Predefined Scripts: Quick access to common scripts (start, dev, build, test, lint)
  • Configuration: Customize package.json path, terminal behavior, and auto-refresh settings

Usage

  1. Open the NPM Runner extension
  2. Click on the "NPM Scripts" icon in the Activity Bar
  3. All scripts from your package.json will be displayed
  4. Click on a script to run it
  5. Choose "Run in Terminal" to execute in VS Code's integrated terminal
  6. Choose "Open in External Terminal" to execute in your system's default terminal

Configuration

Settings

  • packageJsonPath: Path to package.json file (default: `./package.json`)
  • autoRefresh: Automatically refresh script list when package.json changes (default: `true`)
  • showPredefinedScripts: Show predefined scripts (start, dev, build, test, lint) (default: `true`)
  • terminalBehavior: Terminal behavior - `integrated` or `external` (default: `integrated`)
  • clearTerminalBeforeRun: Clear terminal before running script (default: `false`)

Commands

  • `npmRunner.runScript`: Run selected script
  • `npmRunner.refresh`: Refresh script list
  • `npmRunner.openTerminal`: Open in integrated terminal
  • `npmRunner.openInIntegratedTerminal`: Run in integrated terminal
  • `npmRunner.openSettings`: Open extension settings

Architecture

The extension follows a clean separation of concerns:

  1. NpmScriptProvider: Handles tree data and file system watching
  2. TerminalService: Manages terminal creation and script execution
  3. Main Extension: Coordinates providers and commands

Development

Building

```bash npm install npm run compile ```

Running in Development Mode

```bash code --extensionDevelopmentPath=./npm-runner . ```

Installation

  1. Build the extension: `npm run compile`
  2. Package the extension: `vsce package`
  3. Install in VS Code: Extensions → Install from VSIX...

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft