- Python 99.7%
- Batchfile 0.2%
- Shell 0.1%
| .gitignore | ||
| CHANGELOG.md | ||
| compile.bat | ||
| compile.sh | ||
| LICENSE | ||
| log_utils.py | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| test_download.py | ||
| test_search.py | ||
| uv.lock | ||
| vsix_downloader.py | ||
| vsix_downloader.spec | ||
VS Code Extension Downloader
A command-line tool to download VS Code extensions from the marketplace.
Features
- Smart extension search with relevance scoring:
- Name matching (40%)
- Download count (30%)
- Ratings (20%)
- Last updated date (10%)
- Show top 5 most relevant extensions with detailed information:
- Display name and publisher
- Version number
- Description
- Installation count
- Rating and number of ratings
- Relevance score
- Interactive selection from multiple matches
- Progress bar for downloads
- Automatic retry on network errors
Requirements
- Python 3.6 or higher
- Required packages (install via pip):
pip install -r requirements.txt
Usage
Interactive Mode
Simply run without any arguments:
python vsix_downloader.py
The tool will:
- Prompt for extension name
- Show top 5 matching extensions with relevance scores
- Let you choose from multiple matches (if found)
- Display detailed extension information
- Ask for download confirmation
- Show download progress
Command Line Mode
Directly specify the extension name:
python vsix_downloader.py gitlens
Options
-
-o, --output-dir: Specify output directory (default: current directory)python vsix_downloader.py gitlens -o downloads/ -
-v, --verbose: Enable verbose outputpython vsix_downloader.py gitlens -v
The downloaded file will be named in the format:
{publisher}.{extension_id}-{version}.vsix
For example:
eamodio.gitlens-2025.2.2304.vsix
Extension Scoring
Extensions are scored based on multiple factors to help you find the most relevant ones:
-
Name Matching (40 points)
- Exact match: 40 points
- Contains as whole word: 30 points
- Contains as part: 20 points
-
Download Count (30 points)
- Logarithmic scale based on number of downloads
- More downloads = higher score (up to 30 points)
-
Ratings (20 points)
- Based on average rating and number of ratings
- Higher ratings and more reviews = higher score
-
Update Frequency (10 points)
- Based on how recently the extension was updated
- More recent updates = higher score
Only the top 5 scored extensions are displayed to avoid information overload.
Error Handling
The tool includes robust error handling for:
- Network connection issues (with automatic retry and timeouts)
- Invalid extension names (with input validation)
- Directory issues (permission checks, automatic creation)
- API response errors (with detailed error messages)
- User cancellation (during selection or download)
- File system errors (with proper cleanup of partial downloads)
- Non-interactive environments (auto-selection of best matches)
Automated Usage
The tool can be used in scripts and automated environments:
# Will automatically select the best match without user interaction
python vsix_downloader.py <extension_name> -o <output_dir>
Security
- Validates all user inputs
- Verifies SSL certificates
- Prevents directory traversal
- Performs permission checks before writes
- Cleans up partial downloads on errors
Note
This tool uses the official VS Code Marketplace API to search for and download extensions. See the CHANGELOG.md for details of the latest improvements.