Skip to main content

Download and install VS Code for offline environments

Project description

vscode-offline

Build Status Ruff PyPI Version License

vscode-offline 主要用于在无网环境下安装 VS Code 和 VS Code Server,方便使用 Remote - SSH 插件进行远程开发。

安装

pip install -U vscode-offline

优势

  1. 自动识别并下载所有 .vsix 文件(包括间接依赖)
  2. 一键安装 VS Code Server 以及其所有插件

VS Code 离线安装

(1)在联网环境安装好 VS Code 和你需要的插件,如 Remote - SSH, Python 等。

(2)执行如下命令,下载 VS Code 安装包,和目前安装的所有的插件

vscode-offline download-all --client-platform win32-x64 --server-platform linux-x64

(3)复制 ./vscode-offline-installer 到内网 Windows 机器,安装 ./vscode-offline-installer/<version> 下的 VS Code,然后执行如下命令安装所有插件

vscode-offline install-extensions --installer ./vscode-offline-installer

(4)复制 ./vscode-offline-installer 到内网 Linux 服务器,执行如下命令安装 VS Code Server 和所有插件

vscode-offline install-server --installer ./vscode-offline-installer

指定 VS Code 版本号

如果你想下载或安装指定版本的 VS Code,可以先通过 code --version 获取当前版本,然后通过 --code-version 参数指定版本号,例如:

vscode-offline download-all --code-version 1.104.3

也支持使用 commit hash 作为版本号,例如:

vscode-offline download-all --code-version commit:385651c938df8a906869babee516bffd0ddb9829

文件下载地址

如果你不想使用 vscode-offline,也可以手动下载对应的文件。

VS Code / VS Code Server / VS Code CLI 下载地址格式:

curl -O https://update.code.visualstudio.com/<version>/<platform>/stable
curl -O https://update.code.visualstudio.com/commit:<commit>/<platform>/stable

# 比如
curl -O https://update.code.visualstudio.com/1.104.3/cli-alpine-x64/stable
curl -O https://update.code.visualstudio.com/commit:385651c938df8a906869babee516bffd0ddb9829/win32-x64/stable

VS Code Extension 下载地址格式:

curl -O https://marketplace.visualstudio.com/_apis/public/gallery/publishers/<publisher>/vsextensions/<extension>/<version>/vspackage?targetPlatform=<platform>

# 比如
curl -O https://marketplace.visualstudio.com/_apis/public/gallery/publishers/ms-python/vsextensions/python/2025.14.0/vspackage?targetPlatform=linux-x64

Platform 映射关系:

VS Code VS Code Server VS Code CLI VS Code Extension
win32-x64 server-win32-x64 cli-win32-x64 win32-x64
win32-x64-user server-win32-x64 cli-win32-x64 win32-x64
win32-x64-archive server-win32-x64 cli-win32-x64 win32-x64
win32-arm64 server-win32-arm64 cli-win32-arm64 win32-arm64
win32-arm64-user server-win32-arm64 cli-win32-arm64 win32-arm64
win32-arm64-archive server-win32-arm64 cli-win32-arm64 win32-arm64
linux-x64 server-linux-x64 cli-alpine-x64 linux-x64
linux-deb-x64 server-linux-x64 cli-alpine-x64 linux-x64
linux-rpm-x64 server-linux-x64 cli-alpine-x64 linux-x64
linux-arm64 server-linux-arm64 cli-alpine-arm64 linux-arm64
linux-deb-arm64 server-linux-arm64 cli-alpine-arm64 linux-arm64
linux-rpm-arm64 server-linux-arm64 cli-alpine-arm64 linux-arm64
linux-armhf server-linux-armhf cli-linux-armhf linux-armhf
linux-deb-armhf server-linux-armhf cli-linux-armhf linux-armhf
linux-rpm-armhf server-linux-armhf cli-linux-armhf linux-armhf
darwin server-darwin cli-darwin-x64 darwin-x64
darwin-arm64 server-darwin-arm64 cli-darwin-arm64 darwin-arm64

贡献

欢迎提交 Issue 和 PR 改进本项目。

License

Copyright (c) 2025 Chuck Fan.

Distributed under the terms of the MIT License.

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

vscode_offline-0.1.10.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

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

vscode_offline-0.1.10-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file vscode_offline-0.1.10.tar.gz.

File metadata

  • Download URL: vscode_offline-0.1.10.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vscode_offline-0.1.10.tar.gz
Algorithm Hash digest
SHA256 cdf8ab9591831a37aa5f280b3a01d0669ae54d0bccc4664a5248495263bfd90b
MD5 a28eb9d11846715306fcc9259d49e9cf
BLAKE2b-256 9e4b1aa91a724ead6f750c948e595e6a8b94ed0e408ca165a086a409a3c3fe94

See more details on using hashes here.

Provenance

The following attestation bundles were made for vscode_offline-0.1.10.tar.gz:

Publisher: build.yml on fanck0605/vscode-offline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vscode_offline-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for vscode_offline-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 4ab6af5f8ecdf005326048be1d805da7891ef3ae1eb8ebec63fdacdadb45cc0a
MD5 6df2d6f501098c600c6fa318985f90d8
BLAKE2b-256 19afe96b6223b2cd145109751561a05310b2f5d5922a6751d82f22bc887e2b5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for vscode_offline-0.1.10-py3-none-any.whl:

Publisher: build.yml on fanck0605/vscode-offline

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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