Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>ScriptDeckNew to Visual Studio Code? Get it now.
ScriptDeck

ScriptDeck

rajratna maitry

|
2,736 installs
| (0) | Free
A VS Code extension that lists scripts from package.json and lets you run or stop them directly from a panel.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

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.

ScriptDeck Screenshot

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

  1. Open a folder with a package.json.
  2. Click the Script Deck icon in the Activity Bar.
  3. See all available scripts listed.
  4. Right-click a script to Run Script or Stop Script.
  5. 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

  1. Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac) to open the Command Palette.
  2. Type Set Pre-Script and select the ScriptDeck: Set Pre-Script command.
  3. Enter your desired one-line script (e.g., echo 🔥 ScriptDeck: Preparing to run your script! && timeout /t 2 /nobreak > nul) and press Enter.
  4. The pre-script will now run before every script you execute from ScriptDeck.

Method 2: Editing settings.json Directly

  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P).

  2. Type Preferences: Open Settings (JSON) and select it.

  3. 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.

  4. 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

  • Use the Command Palette and run ScriptDeck: Choose Package Manager, then select your preferred package manager.
  • Or, set it directly in your settings.json:
    "scriptDeck.packageManager": "npm"
    

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

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