Skip to main content

No project description provided

Project description

uVSCEM

unofficial VSCode Extension Manager

This little program is designed to address some limitations in air-gapped and proxy environments that currently occur due to partially missing proxy support in Visual Studio Code.
It allows for the installation of extensions in DevContainers, even when a proxy is involved, by downloading and installing them manually via Python's requests library.

It's currently a work in progress, and complete offline installation is still missing (integrating it is a minor step), but it should be good enough to be used as "postAttachCommand" in devcontainer.json for environments where a proxy is involved and where automatic extension installation currently fails due to various errors.

It's a workaround for the following upstream issues in Visual Studio Code:

Getting started

You can use this projects devcontainer.json as a template or modify your Dockerfile accordingly:

RUN pip install uvscem

(preferably after creating a virtual environment and a non-root user)

In your devcontainer.json

{
  "name": ..
  ..
  "postAttachCommand": "uvscem --config-file /path/to/devcontainer.json"
  ..
}

uVSCEM will then install (and update) all extensions listed in devcontainer.json each time Visual Studio Code / the DevContainer is started or rebuild.

Note Ensure that your Dockerfile contains Python 3.12 and pip, poetry, or pipx to install this package. It should theoretically work with Python 3.10 or later but I need to verify this first. Also, confirm that your PATH variable includes the (virtual) environment where the package was installed into.

If you have a proxy (e.g. Cntlm) listening on localhost it's best to add a line in your /etc/hosts or C:\Windows\system32\drivers\etc\hosts file (if possible):

127.0.0.1	localproxy

and configure VSCode to use that domain in (User) settings.json.

{
  ..
  "http.proxy": "http://localproxy:3128"
  ..
}

In your docker-compose.yml you could then specify (already included in the devcontainer example in this repository):

extra_hosts:
    - "host.docker.internal:host-gateway"
    - "localproxy:host-gateway"

This way, some extensions within the DevContainer still got internet connectivity (if they are proxy aware). GitHub's CoPilot for example tries to use 127.0.0.1 from the host's user proxy configuration ("http.proxy":) otherwise and unfortunately there's no possibility to configure that separately for the DevContainer.

A big thank you to the following people

Project details


Download files

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

Source Distribution

uvscem-0.1.3.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uvscem-0.1.3-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file uvscem-0.1.3.tar.gz.

File metadata

  • Download URL: uvscem-0.1.3.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.0 CPython/3.12.2 Darwin/23.2.0

File hashes

Hashes for uvscem-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f4a716196d843be86c067373fe9fafabd49f925040c174c842c66e83d4f07703
MD5 05f9a0da95a61674f03a660d7998bc64
BLAKE2b-256 7e008d5e55e5c4393084d2081e27ef1bb410320de52c0bb1cc720ac8ea08bc8b

See more details on using hashes here.

File details

Details for the file uvscem-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: uvscem-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.0 CPython/3.12.2 Darwin/23.2.0

File hashes

Hashes for uvscem-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dc3ecbf84afd5dcc429208e67b6bb2bd433faf1ba5d609349ac2f0eff1bd27d0
MD5 6faeff6de57f436bced542f5ae64ea5a
BLAKE2b-256 522dc2178a09e702585e73d5ac6c37113f9b4a9d2ec7cd55e8c6529324af1497

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page