Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Commands RefreshNew to Visual Studio Code? Get it now.
Commands Refresh

Commands Refresh

Paulo Cabreira

|
1 install
| (0) | Free
Runs a configurable VS Code command after selected tasks complete successfully.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Commands Refresh

A lightweight VS Code extension that executes a configurable command whenever a selected task completes successfully. The extension monitors task execution and triggers the configured VS Code command only when the task name matches one of the specified entries and its process exits with code 0.

Features

  • Monitor selected VS Code tasks.
  • Execute any registered VS Code command after successful task completion.
  • Configure monitored tasks and commands through VS Code Settings.
  • Automatically trigger commands without additional user interaction.
  • Lightweight implementation using the VS Code Extension API.

Installation

Install locally for development

  1. Clone or extract this repository into a permanent folder.
  2. Open the project folder in VS Code.
  3. Press F5 to launch an Extension Development Host window.
  4. Configure the tasks you want to monitor in the Extension Development Host.
  5. Execute one of the configured tasks.
  6. Confirm that the configured command is executed successfully.

Install using VSIX

  1. Package the extension using vsce:

    npx @vscode/vsce package
    
  2. Install the generated .vsix file using the VS Code command:

    code --install-extension commands-refresh-1.0.0.vsix
    

Configuration

The extension can be configured through VS Code Settings.

Open your settings.json file and add the following configuration:

{
    "commandsRefresh.taskNames": [
        "Build Project",
        "Deploy Application",
        "My Custom Task"
    ],
    "commandsRefresh.commandId": "commands.refresh"
}

Configuration properties

Property Description Default
commandsRefresh.taskNames List of exact task names to monitor. []
commandsRefresh.commandId VS Code command to execute after a successful task. commands.refresh

Note: Task names must match the corresponding VS Code task labels exactly.

Example: Commands extension integration

By default, the extension is configured to execute commands.refresh, which is provided by the Commands extension.

Make sure the Commands extension is installed and enabled if you want to use this integration.

You can also configure a different command ID from another VS Code extension or a built-in VS Code command.

How It Works

The extension listens for task process completion events through the VS Code Extension API:

vscode.tasks.onDidEndTaskProcess

When a task finishes:

  1. The extension checks whether its name matches one of the configured task names.
  2. It verifies whether the process exit code is 0.
  3. If both conditions are satisfied, it executes the configured VS Code command.

Tasks that are not configured or that finish with an error do not trigger the command.

Troubleshooting

Open View > Output and select Commands Refresh to inspect the extension's activity.

If the configured command is not executed, check the following:

  • The task name matches an entry in commandsRefresh.taskNames.
  • The task completed successfully (exit code 0).
  • The configured command ID is valid and available.
  • The extension providing the configured command is installed and enabled, if applicable.

License

This project is licensed under the MIT License. See the LICENSE file for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft