ScriptDeck (run-project)
ScriptDeck is a VS Code extension that lists scripts from your project's package.json
and lets you run or stop them directly from a panel in the Activity Bar.
Features
- Lists all scripts from your workspace's
package.json
in a dedicated panel.
- Run any script with a single click (context menu or inline button).
- Stop the running script from the same panel.
- Scripts execute in a VS Code terminal and show output live.
- Refresh scripts if you update your
package.json
.
- Pre-script support: Run a custom one-line command before each script (configurable in settings or via command).
- Choose your package manager: Select between
npm
, yarn
, or pnpm
for running scripts.

Requirements
- Your workspace must contain a
package.json
file with scripts defined.
- Node.js and your chosen package manager (
npm
, yarn
, or pnpm
) should be installed and available in your system PATH.
Usage
- Open a folder with a
package.json
.
- Click the Script Deck icon in the Activity Bar.
- See all available scripts listed.
- Right-click a script to Run Script or Stop Script.
- The script runs in a dedicated terminal. You can stop it from the panel.
Example
Suppose your package.json
contains:
{
"scripts": {
"start": "node index.js",
"test": "echo \"Running tests...\""
}
}
ScriptDeck will show both start
and test
scripts in the panel. You can run or stop either script directly from the ScriptDeck panel.
Extension Settings
Pre-Script
You can configure a command to run before every script executed from ScriptDeck by setting the scriptDeck.preScript
property in your workspace or user settings.
How to Set the Pre-Script Property
You can set the pre-script in two ways:
Method 1: Using the Command Palette
- Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) to open the Command Palette.
- Type
Set Pre-Script
and select the ScriptDeck: Set Pre-Script
command.
- Enter your desired one-line script (e.g.,
echo 🔥 ScriptDeck: Preparing to run your script! && timeout /t 2 /nobreak > nul
) and press Enter.
- The pre-script will now run before every script you execute from ScriptDeck.
Method 2: Editing settings.json Directly
Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).
Type Preferences: Open Settings (JSON)
and select it.
Add or edit the following line in your settings.json
:
if you need to set up your Node.js environment Or load any modules before running scripts:
// Example: Set Node.js path before running script
"scriptDeck.preScript": "C:\\Windows\\System32\\cmd.exe /k \"C:\\Program Files\\nodejs\\nodevars.bat\""
Note: Adjust the path as needed for your system. Double backslashes are required in JSON.
Or,
// Example: Show a message and wait 2 seconds before each script
"scriptDeck.preScript": "echo 🚀 ScriptDeck: Preparing to run your script! && timeout /t 2 /nobreak > nul"
Note: Adjust the command as needed for your workflow.
Save the file.
Now, every time you run a script from ScriptDeck, your pre-script will execute first.
Package Manager
You can choose which package manager (npm
, yarn
, or pnpm
) ScriptDeck uses to run scripts.
How to Set the Package Manager
Known Issues
- Only one script can be run at a time from the panel. Running a new script will stop the previous one.
- Only scripts from the root
package.json
are shown.
Release Notes
2.1.0
- Added support for running a configurable pre-script before each script execution (via settings or command).
- Added
Set Pre-Script
command to easily set or clear the pre-script from the command palette.
- Added support for choosing the package manager (
npm
, yarn
, or pnpm
) via settings or command.
1.1.1
- Show scripts from
package.json
in a panel.
- Run and stop scripts from the panel.
- Scripts run in a VS Code terminal.
Enjoy using ScriptDeck!
For feedback or issues, visit the GitHub repository