A VS Code extension that adds convenient right-click options to quickly run commands (default: npm start) from any file or folder location in your workspace. Fully configurable with custom commands and terminal name formats.
Features
🚀 Quick command execution: Right-click any folder or file to run your configured command (default: npm start) in that location
🗑️ Close terminals option: Option to close all open terminals before running the command
📁 Smart directory detection: Automatically detects the correct directory from:
Right-clicked folder/file
Currently active file
Workspace root
⚡ Instant terminal: Creates a new terminal at the target location and runs the command
Usage
Method 1: Run Command (Keep Terminals)
Right-click on any folder or file in the Explorer
Select "Run Command"
A new terminal opens at that location and runs your configured command (default: npm start)
Method 2: Run Command (Close All Terminals)
Right-click on any folder or file in the Explorer
Select "Run Command (Close All Terminals)"
All open terminals are closed
A new terminal opens at that location and runs your configured command (default: npm start)
How It Works
If you right-click a folder: Runs the configured command in that folder
If you right-click a file: Runs the configured command in the file's parent directory
If no file/folder is selected: Uses the currently active file's directory
If no file is open: Uses the workspace root
Requirements
The command specified in easyCodeRunner.defaultCommand must be available in your PATH
For npm/yarn commands: Node.js and npm/yarn must be installed
A package.json file is recommended for npm/yarn commands, but not required
Extension Settings
This extension has the following settings:
Default Command: Change from npm start to any command (e.g., npm run dev, yarn start, python app.py)
Terminal Name Format: Customize how terminals are named:
"${command} - ${folderName}" → "npm start - my-project"
"${folderName}" → "my-project"
"🚀 ${command}" → "🚀 npm start"
"${folderName} (${command})" → "my-project (npm start)"
Known Issues
The extension will warn if no package.json is found for npm/yarn commands, but will still attempt to run the command
Terminal names may be truncated if directory names are very long
Release Notes
1.0.1
Initial release of Easy Code Runner
Right-click context menu options for running commands
Option to close all terminals before running
Smart directory detection from context menu, active file, or workspace