Quick Scripts Runner
The ultimate Visual Studio Code extension for running npm, pnpm, yarn, and bun scripts directly from the explorer sidebar. No more switching to terminal or remembering command syntax—just click and run. VS Marketplace • Features • Usage • Configuration • Multi-Workspace ✨ Features🎯 Core Functionality
🎨 User Experience
📸 Screenshots
The extension adds a new "Quick Scripts Runner" section in the explorer sidebar, displaying all available scripts from your 🚀 InstallationFrom VS Code Marketplace
Or install via command line:
From Source
📖 UsageExecuting ScriptsMethod 1: From Sidebar
Method 2: From Command Palette
Method 3: Right-Click Context Menu
Refreshing ScriptsThe scripts list automatically refreshes when:
Manual Refresh:
Changing Package ManagerMethod 1: From View Title Bar
Method 2: From Status Bar
Method 3: From Settings
Note: The extension will use your selection when auto-detection is disabled or when no lock files are found. Opening package.jsonMethod 1: From View Title Bar
Method 2: From Command Palette
Creating package.jsonIf
📁 Multi-Workspace SupportWhen working with multiple workspace folders, Quick Scripts Runner provides intelligent organization: Single Workspace
Multiple Workspaces
Workspace Detection Logic
⚙️ ConfigurationCustomize Quick Scripts Runner through Settings → Extensions → Quick Scripts Runner:
|
| Setting | Type | Default | Description |
|---|---|---|---|
| Values | string | npm |
One of: npm, pnpm, yarn, bun |
| Scope | Workspace or User settings |
Example:
{
"quickScriptsRunner.defaultPackageManager": "pnpm"
}
quickScriptsRunner.autoDetectPackageManager
Enables or disables automatic package manager detection based on lock files.
| Setting | Type | Default | Description |
|---|---|---|---|
| Values | boolean | true |
When true, detects based on lock files; when false, uses default |
| Scope | Workspace or User settings |
Example:
{
"quickScriptsRunner.autoDetectPackageManager": false
}
Detection Priority
When auto-detection is enabled, the extension checks for lock files in this order:
pnpm-lock.yaml→ pnpmyarn.lock→ yarnbun.lockb→ bunpackage-lock.json→ npm- No lock file found → Uses
quickScriptsRunner.defaultPackageManager
🎨 Supported Use Cases
Quick Scripts Runner works with any project that has a package.json, regardless of the technology stack:
Frontend Frameworks
- ✅ React -
npm run start,npm run build, etc. - ✅ Vue.js -
npm run serve,npm run build - ✅ Angular -
ng serve,ng build - ✅ Next.js -
npm run dev,npm run build - ✅ Svelte -
npm run dev,npm run build
Backend & Full-Stack
- ✅ Node.js - Standard Node.js applications
- ✅ Express -
npm start,npm run dev - ✅ NestJS -
npm run start:dev,npm run build - ✅ TypeScript -
tsc,tsc --watch
Other Technologies
- ✅ PHP/Symfony - Custom scripts in package.json
- ✅ Go - Build and test commands
- ✅ Python/Django - Management commands wrapped in scripts
- ✅ Ruby on Rails - Custom npm scripts
- ✅ Any project with custom package.json scripts
🧪 Development
Prerequisites
- Node.js >= 18
- pnpm >= 10.0.0 (enforced by project)
- TypeScript 5.0+
- VS Code 1.70+
Available Commands
# Install dependencies
pnpm install
# Compile TypeScript
pnpm run compile
# Watch mode (auto-compilation on file changes)
pnpm run watch
# Lint code
pnpm run lint
# Format code
pnpm run format
# Run tests (requires VS Code extension host)
pnpm test
Package Manager Enforcement
This project enforces pnpm as the package manager:
packageManagerfield inpackage.jsonspecifies pnpm versionpreinstallscript blocks other package managers (npm, yarn, bun)enginesfield requires pnpm >= 10.0.0
Attempting to use npm, yarn, or bun will be blocked automatically with a clear error message.
Extension Icon
The extension icon should be placed in images/icon.png:
- Size: 128x128 pixels (required)
- Format: PNG
- Recommended: Square icon with transparent background
- The icon path is specified in
package.jsonunder theiconfield
Testing the Extension
Manual Testing
- Open the project in VS Code
- Press
F5to launch the Extension Development Host - In the new window, open a project with a
package.json - Check the "Quick Scripts Runner" section in the explorer sidebar
- Test script execution, package manager detection, and multi-workspace scenarios
Running Unit Tests
Important: Tests require the VS Code extension host context to run properly because they import the vscode module.
From VS Code (Recommended):
- Open the project in VS Code
- Go to Run and Debug (
Ctrl+Shift+D) - Select "Extension Tests" from the dropdown
- Press
F5or click the play button - A new VS Code window will open and execute all tests with detailed output
From Terminal (requires VS Code context):
# This will fail without VS Code context
pnpm test
Note: Running tests directly with node will fail because the vscode module is only available in the VS Code extension host environment.
Test Suite:
PackageJsonReadertests: File existence and script parsingPackageManagerDetectortests: Package manager detection logicScriptExecutortests: Script execution interface validation
📝 License
MIT License - see LICENSE file for details
🤝 Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch using kebab-case (
git checkout -b feature/amazing-feature) - Commit your changes following Conventional Commits
- Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Commit Convention
This project follows Conventional Commits:
feat:New featuresfix:Bug fixesrefactor:Code refactoringchore:Maintenance tasksdocs:Documentation updates
Branch Naming
Use kebab-case for branch names:
- ✅
feature/add-new-command - ✅
fix/package-manager-detection - ✅
refactor/command-structure
🐛 Reporting Issues
If you encounter any issues, please open an issue in the repository with:
- Description of the problem
- Steps to reproduce
- VS Code version
- Operating system
- Expected vs actual behavior
- Screenshots (if applicable)
💬 Soporte
For questions or suggestions, please open an issue in the repository.
Authors:
- Francisco Luis Rios Vega
- Email: alckordev@gmail.com
- Website: https://alckor.dev
- Jhoel Cordova
- GitHub: @jhoelcq
- Original idea author
Made with ❤️ for the developer community
