Skip to main content

Visual Studio Code and extensions downloader for offline installations

Project description

VSCode Downloader

Build Status pyi pyi


vscode-dl is a Python3 script that downloads the latest Linux version of Visual Studio Code and a curated list of extensions for installation on computers without Internet connection or proxy restrictions.

The program also creates a catalog in JSON and Markdown that can be incorporated into a web page, like this example.

When run again, it tries to update extensions and VSCode to their latest version.




This installs the latest stable, released version.

pip3 install -U vscode-dl


python3 -m venv vscode-dl
vscode-dl/bin/pip install vscode-dl
vscode-dl/bin/vscode-dl --help

Basic usage

Download Visual Studio Code and extensions listed in extensions.yaml into the web/ subdirectory (screenshot) :


Scan installed extensions and add them to the download list :

vscode-dl -i

More options are available. Use vscode-dl --help to show them.

Run with Docker

A Dockerfile is provided to run the app into a container, with interpreter and requirements ready-to-use.

# build the image
docker build -t vscode_dl .

# run the downloader
docker run -ti --rm -v /path/to/mirror:/app/web vscode_dl

# run the downloader with an alternate extension list
docker run -ti --rm -v /path/to/mirror:/app/web -v /path/to/extensions.yaml:/app/extensions.yaml vscode_dl

Installation and update tool

First use

On a offline installation, install or updates Code, downloads and updates the installed extensions from the mirror.

It requires Python 3.5+ and requests that should be installed on all modern Debian/Ubuntu.

curl -skL http://mirror.url:port/ | python3 - http://mirror.url:port/

The flag -t permits to provide a minimal set of extensions to be installed. They should be listed in a JSON array.

Example of a file myteam.json (to be copied in the mirror directory):

["ms-python.python", "formulahendry.code-runner"]

The following command wil install or update Code and the extensions listed above.

python3 <(curl -sL http://mirror.url:port/ -t myteam http://mirror.url:port/

The tool : code-tool

The tool installs itself into ~/.local/bin/code-tool. This tool can be used to maintenance tasks and install new extensions. You may have to add this directory to your PATH.

# update Code and extensions
code-tool -u

# display version and mirror url
code-tool -V

# list available extensions
code-tool -l

# install an extension
code-tool -i <extension.key>

More options are available. Use code-tool --help to show them.

The development container

Code allows you to develop inside a container. Unluckily, this feature requires Internet connection since the remote server is downloaded when attaching to the container, unless this server is already installed. This is the aim of scripts into container/ subdirectory.

It can be easily adapted to an existing build environment, even for SSH remote development.

As the time of writing (December 2019), only x64, armhf, arm64 and Alpine/amd64 platforms are available.

The Go extension case

The Go extension requires some Go packages to be functional (linter, formatter, code analyzer, etc.). These dependencies are listed into the extension, that tries to install them from Internet. To bypass this step, the sync program (vscode-dl- uses go get -d commands to download the required packages, and the update tool ( aka. code-tool) installs them in ~/go (default GOPATH). Thus, the GOPATH environment variable should include at least this directory.



Unlicense aka. Public Domain 😀

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for vscode-dl, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size vscode_dl-1.0.0-py3-none-any.whl (21.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size vscode-dl-1.0.0.tar.gz (19.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page