Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Startup RunnerNew to Visual Studio Code? Get it now.
Startup Runner

Startup Runner

708u

| (0) | Free
Runs script on start up workspace
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

startup-runner

Automatically run commands from trigger files when a VS Code workspace opens.

Features

  • Execute commands from trigger files on workspace startup
  • Configure multiple tasks with different trigger files
  • Enable/disable individual tasks

Usage

1. Create a trigger file

Create a file in your workspace root (e.g., .autorun) with the command to run:

echo "Hello from autorun"

2. Configure tasks

Add to your settings.json:

{
  "startupRunner.tasks": [
    { "name": "default", "file": ".autorun", "enabled": true }
  ]
}

3. Reopen workspace

When you open the workspace, enabled tasks will run automatically if their trigger files exist.

Extension Settings

This extension contributes the following settings:

  • startupRunner.tasks: List of tasks with trigger files
    • name: Task name
    • file: Trigger file name
    • enabled: Enable this task

Default: [] (empty, no tasks configured)

Security

This extension executes arbitrary shell scripts. Please be aware of the following security considerations:

Security Model

  1. Workspace Trust Integration: The extension only runs in trusted workspaces. If VS Code's Workspace Trust is not granted, no scripts will execute.

  2. Hash-based Approval: Each script's content is hashed (SHA256). When a script is first encountered or modified, you must explicitly approve it through a review dialog.

  3. Content Review: Before approval, the full script content is displayed in a webview panel so you can inspect what will be executed.

Best Practices

  • Only use in trusted repositories: Do not enable this extension for repositories from untrusted sources.
  • Review scripts carefully: Always read the script content before clicking "Allow". Be cautious of obfuscated code or external downloads (e.g., curl | bash).
  • Use "Allow Once" for unfamiliar scripts: If unsure, use "Allow Once" instead of permanent approval.

Commands

  • Startup Runner: Reset Approved Files...: Revoke previously approved scripts and require re-approval on next startup.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft