Custom Script Runner is a lightweight Visual Studio Code extension that lets you configure, start, stop, and restart any script (e.g., shell, npm, Python, etc.) directly from the top-right corner of the editor interface.
No need to remember commands or repeatedly open the terminal. Just set your script once and control it with a single click.
✨ Features
🔧 Configure Command: Define the command to run, working directory, and environment variables.
▶️ Start Script: Run your configured script with one click.
♻️ Restart Script: Stop and restart the script automatically.
⛔ Stop Script: Gracefully stop the currently running script.
📌 Always-visible toolbar buttons in the top-right (next to tab previews).
💾 Configuration is saved between sessions.
🚀 Usage
Click the ⚙️ gear icon in the top-right corner of VSCode.
Enter:
✅ Command: The script or command to run.
✅ Working Directory: The directory where the script should be executed.
✅ Environment Variables: Optional semicolon-separated values like NODE_ENV=dev;DEBUG=1.
Use the ▶️, ♻️, and ⛔ icons to control the script.
Example configuration:
Command: python3 your_file.py
Working Directory: ${workspaceFolder}
Env: PORT=3000;DEBUG=true
🛠️ Supported Use Cases
This extension works across all types of projects:
✅ Python / Flask / Django
✅ Java / Maven / Gradle
✅ Go / Rust / C++ / Bash
✅ Node.js / JavaScript / TypeScript
✅ Any CLI-based command
📦 Installation
Open VSCode.
Go to Extensions (Ctrl+Shift+X).
Search for Custom Script Runner.
Click Install.
💡 Tips
Use ${workspaceFolder} to make the working directory dynamic across different projects.
You can change the configuration anytime by clicking the ⚙️ icon again.
The script output will appear in the "Custom Script" terminal inside VSCode.
🔄 Changelog
v1.0.0
Initial release with support for top-right icon buttons.
Persistent configuration storage.
Cross-platform support for any CLI script.
🧑💻 Contributing
Pull requests are welcome! If you’d like to suggest features or report issues, head to the GitHub repository.