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

Upload Runner

KATHEESKUMAR

| (0) | Free
VS Code extension with an upload icon in status bar that executes a Python script in the integrated terminal. Configured via upload-runner.json in your workspace.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Upload Runner - VS Code Extension

A VS Code extension that adds an upload icon to the status bar. When clicked, it executes a Python script for custom upload operations.

Features

  • 🚀 Quick Access: Upload icon in the status bar for instant access
  • 🐍 Python Integration: Runs a customizable Python script
  • ⚙️ Project-Based Configuration: Uses upload-runner.json in your workspace
  • 🔄 Smart Detection: Button only appears when configuration file exists
  • 📊 Progress Feedback: Shows progress notifications and output
  • 🎨 Clean UI: Uses VS Code's native icons and styling

Installation

From VSIX (Local Installation)

  1. Download the .vsix file
  2. Open VS Code
  3. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  4. Click the "..." menu → Install from VSIX
  5. Select the downloaded file

From Marketplace

Once published, you can install directly from the VS Code Marketplace.

Quick Start

1. Create Configuration File

Create a file named upload-runner.json in your workspace root:

{
  "pythonPath": "python3",
  "scriptPath": "upload_script.py"
}

2. Create Your Upload Script

Create your Python script (e.g., upload_script.py):

#!/usr/bin/env python3
import sys

def main():
    print("Starting upload...")
    # Your upload logic here
    print("Upload complete!")
    return 0

if __name__ == "__main__":
    sys.exit(main())

3. Use the Extension

The upload button (📤) will automatically appear in the status bar when upload-runner.json exists!

Configuration

The extension reads configuration from upload-runner.json in your workspace root folder.

Configuration File: upload-runner.json

⚠️ IMPORTANT: The upload button only appears when this file exists in your workspace root.

{
  "pythonPath": "python3",
  "scriptPath": "upload_script.py"
}

Configuration Options

Field Type Required Default Description
pythonPath string No "python3" Path to Python executable
scriptPath string No bundled script Path to your Python script (relative or absolute)

Configuration Examples

Basic Configuration:

{
  "pythonPath": "python3",
  "scriptPath": "scripts/upload.py"
}

Custom Python Installation:

{
  "pythonPath": "/usr/local/bin/python3.11",
  "scriptPath": "deploy/upload.py"
}

Using Virtual Environment:

{
  "pythonPath": ".venv/bin/python",
  "scriptPath": "upload.py"
}

Windows Configuration:

{
  "pythonPath": "C:\\Python311\\python.exe",
  "scriptPath": "scripts\\upload.py"
}

See CONFIG_SCHEMA.md for detailed configuration documentation.

How It Works

  1. Detection: Extension checks for upload-runner.json in your workspace root
  2. Button Visibility: Upload button appears only when the config file exists
  3. Auto-Update: Button automatically appears/disappears when you create/delete the config file
  4. Execution: When clicked, reads config and executes your Python script
  5. Feedback: Shows progress, output, and any errors

Python Script Examples

Example 1: Simple File Upload

#!/usr/bin/env python3
import sys
import os

def main():
    print("Starting upload...")
    
    # Your upload logic here
    files = ["file1.txt", "file2.txt"]
    for file in files:
        print(f"Uploading {file}...")
        # Upload logic here
    
    print("Upload complete!")
    return 0

if __name__ == "__main__":
    sys.exit(main())

Example 2: Upload to S3

#!/usr/bin/env python3
import sys
import boto3

def main():
    print("Uploading to S3...")
    
    s3 = boto3.client('s3')
    s3.upload_file('local_file.txt', 'my-bucket', 'remote_file.txt')
    
    print("Upload complete!")
    return 0

if __name__ == "__main__":
    sys.exit(main())

Example 3: FTP Upload

#!/usr/bin/env python3
import sys
from ftplib import FTP

def main():
    print("Connecting to FTP...")
    
    ftp = FTP('ftp.example.com')
    ftp.login('username', 'password')
    
    with open('file.txt', 'rb') as f:
        ftp.storbinary('STOR file.txt', f)
    
    ftp.quit()
    print("Upload complete!")
    return 0

if __name__ == "__main__":
    sys.exit(main())

Development

Prerequisites

  • Node.js (v14 or higher)
  • npm
  • Python 3.x

Setup

# Clone or navigate to the extension directory
cd /path/to/upload-runner

# Install dependencies
npm install

# Install vsce (VS Code Extension Manager)
npm install -g @vscode/vsce

Testing

  1. Open the extension folder in VS Code
  2. Press F5 to open a new Extension Development Host window
  3. Test the extension in this window

Debugging

  • Set breakpoints in extension.js
  • Check the Debug Console for logs
  • Use console.log() for debugging

Publishing to VS Code Marketplace

One-Time Setup

  1. Create a Microsoft Account (if you don't have one)

    • Go to https://account.microsoft.com
  2. Create an Azure DevOps Organization

    • Visit https://dev.azure.com
    • Create a new organization
  3. Get a Personal Access Token (PAT)

    • In Azure DevOps, click User Settings → Personal Access Tokens
    • Click "New Token"
    • Name: vscode-marketplace
    • Organization: Select your organization
    • Scopes: Select "Marketplace" → "Manage"
    • Click "Create"
    • SAVE THE TOKEN - you won't see it again!
  4. Create a Publisher

    • Go to https://marketplace.visualstudio.com/manage
    • Click "Create publisher"
    • Enter a unique publisher ID (lowercase, no spaces)
    • This will be your publisher name in package.json

Update package.json

Before publishing, update these fields:

{
  "publisher": "your-publisher-id",
  "repository": {
    "type": "git",
    "url": "https://github.com/your-username/upload-runner"
  }
}

Package the Extension

# Create a .vsix package
vsce package

# This creates: upload-runner-1.0.0.vsix

Publish to Marketplace

# Login with your Personal Access Token
vsce login your-publisher-id
# Enter your PAT when prompted

# Publish the extension
vsce publish

# Or publish with a specific version
vsce publish minor  # 1.0.0 → 1.1.0
vsce publish major  # 1.0.0 → 2.0.0
vsce publish patch  # 1.0.0 → 1.0.1

Update an Existing Extension

# Make your changes
# Update version in package.json or use:
vsce publish patch

# This will:
# 1. Increment the version
# 2. Package the extension
# 3. Publish to marketplace

Publishing Checklist

  • [ ] Update version number in package.json
  • [ ] Test the extension thoroughly
  • [ ] Update README.md with any new features
  • [ ] Add/update icon.png (128x128 px recommended)
  • [ ] Update CHANGELOG.md
  • [ ] Ensure repository URL is correct
  • [ ] Verify publisher name
  • [ ] Test the packaged .vsix locally
  • [ ] Publish to marketplace
  • [ ] Verify on marketplace website

Files Structure

upload-runner/
├── extension.js          # Main extension code
├── upload_script.py      # Default Python script
├── package.json          # Extension manifest
├── README.md            # Documentation
├── .vscodeignore        # Files to exclude from package
├── .gitignore           # Git ignore rules
└── icon.png             # Extension icon (add your own)

Troubleshooting

Upload Button Not Appearing

Most Common Issue!

  • ✅ Verify upload-runner.json exists in your workspace root folder (not a subfolder)
  • ✅ Check the file name is exactly upload-runner.json (case-sensitive)
  • ✅ Ensure you have a folder open in VS Code (not just individual files)
  • ✅ Try reloading the window: Ctrl+Shift+P → "Developer: Reload Window"

Python Not Found

  • ✅ Ensure Python is installed: Run python3 --version in terminal
  • ✅ Use absolute path in upload-runner.json:
    {
      "pythonPath": "/usr/local/bin/python3"
    }
    
  • ✅ On Windows, use escaped backslashes: "C:\\Python311\\python.exe"

Script Not Running

  • ✅ Check the Debug Console for errors (Help → Toggle Developer Tools)
  • ✅ Verify scriptPath in upload-runner.json points to an existing file
  • ✅ If using relative path, ensure it's relative to workspace root
  • ✅ Ensure script has execute permissions (Linux/Mac): chmod +x script.py

Configuration File Errors

  • ✅ Validate JSON syntax: Use a JSON validator
  • ✅ Check for trailing commas (invalid in JSON)
  • ✅ Ensure all strings use double quotes, not single quotes
  • ✅ Example valid config:
    {
      "pythonPath": "python3",
      "scriptPath": "upload.py"
    }
    

Extension Not Working

  • ✅ Check if extension is enabled in Extensions panel
  • ✅ Look for errors in Output panel (View → Output → "Extension Host")
  • ✅ Try uninstalling and reinstalling the extension
  • ✅ Reload VS Code window

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

If you encounter any issues or have suggestions, please file an issue on the GitHub repository.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft