0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VS Code拡張機能をオフラインでインストールする方法【Codex/Claude Code】

0
Posted at

はじめに

社内ネットワークやインターネット接続が制限された環境では、Visual Studio Codeの拡張機能をMarketplaceから直接インストールできないことがあります。

このような場合は、インターネットへ接続できる端末で.vsixファイルをダウンロードし、オフライン環境へコピーしてインストールします。

本記事では、次の2つの公式拡張機能を例に説明します。

拡張機能 Extension ID バージョン
Codex – OpenAI’s coding agent openai.chatgpt 26.5715.31925
Claude Code for VS Code anthropic.claude-code 2.1.214

バージョンは2026年7月19日時点のものです。最新版はMarketplaceの「Version History」で確認してください。([Visual Studio Marketplace][1])

ダウンロードURLの形式

VS Code拡張機能のダウンロードURLは、次の形式で作成できます。

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/{Publisher ID}/vsextensions/{Extension ID}/{Version}/vspackage

プラットフォーム別のパッケージを取得する場合は、targetPlatformを追加します。

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/{Publisher ID}/vsextensions/{Extension ID}/{Version}/vspackage?targetPlatform={Platform}

代表的な値は次のとおりです。

環境 targetPlatform
Windows x64 win32-x64
Windows ARM64 win32-arm64
macOS Intel darwin-x64
macOS Apple Silicon darwin-arm64
Linux x64 linux-x64
Linux ARM64 linux-arm64

例1:OpenAI Codex

MarketplaceのURLは次のとおりです。

https://marketplace.visualstudio.com/items?itemName=openai.chatgpt

itemNameを分解します。

Publisher ID : openai
Extension ID : chatgpt
Version      : 26.5715.31925

Windows x64版のダウンロードURLは次のとおりです。

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/openai/vsextensions/chatgpt/26.5715.31925/vspackage?targetPlatform=win32-x64

curlでダウンロードする場合は、次のコマンドを実行します。

curl -L \
  "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/openai/vsextensions/chatgpt/26.5715.31925/vspackage?targetPlatform=win32-x64" \
  -o openai-chatgpt-26.5715.31925.vsix

例2:Anthropic Claude Code

MarketplaceのURLは次のとおりです。

https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code

itemNameを分解します。

Publisher ID : anthropic
Extension ID : claude-code
Version      : 2.1.214

Windows x64版のダウンロードURLは次のとおりです。

https://marketplace.visualstudio.com/_apis/public/gallery/publishers/anthropic/vsextensions/claude-code/2.1.214/vspackage?targetPlatform=win32-x64

curlでダウンロードする場合は、次のコマンドを実行します。

curl -L \
  "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/anthropic/vsextensions/claude-code/2.1.214/vspackage?targetPlatform=win32-x64" \
  -o anthropic-claude-code-2.1.214.vsix

VSIXファイルをインストールする

ダウンロードした.vsixファイルを、USBメモリや社内ファイルサーバーなどを使用してオフライン端末へコピーします。

VS Codeでコマンドパレットを開きます。

Windows/Linux:Ctrl + Shift + P
macOS         :Command + Shift + P

次のコマンドを選択します。

Extensions: Install from VSIX...

ダウンロードした.vsixファイルを選択すれば、インストール完了です。

コマンドラインからインストールすることもできます。

code --install-extension openai-chatgpt-26.5715.31925.vsix
code --install-extension anthropic-claude-code-2.1.214.vsix

VS Codeは、画面またはコマンドラインからのVSIXインストールを公式にサポートしています。([Microsoft][2])

注意点

バージョンを再確認する

拡張機能は頻繁に更新されます。

ダウンロード前にMarketplaceの「Version History」を開き、最新バージョンを確認してください。

OSとCPUを確認する

CodexとClaude Codeはプラットフォーム別のパッケージを提供しています。

利用する端末に合わせて、targetPlatformを変更してください。

公式の配布元を使用する

VSIXファイルは、Visual Studio Marketplaceなどの公式配布元から取得してください。

第三者が再配布しているファイルは、改ざんやマルウェア混入の可能性があります。

自動更新について

VSIXから手動インストールした拡張機能は、自動更新が無効になる場合があります。

オフライン環境では、定期的に最新版を取得して更新する運用が必要です。

まとめ

VS Code拡張機能をオフラインでインストールする流れは次のとおりです。

  1. MarketplaceでitemNameとバージョンを確認する
  2. Publisher IDとExtension IDに分解する
  3. ダウンロードURLを作成する
  4. .vsixファイルとして保存する
  5. オフライン端末へコピーしてインストールする

CodexやClaude Codeのようなプラットフォーム別拡張機能では、targetPlatformの指定を忘れないようにしましょう。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?