Skip to content

Instantly share code, notes, and snippets.

@michael-jennings
Last active April 7, 2026 05:16
Show Gist options
  • Select an option

  • Save michael-jennings/505453fcc4dbd10ce7857f97cd2de77b to your computer and use it in GitHub Desktop.

Select an option

Save michael-jennings/505453fcc4dbd10ce7857f97cd2de77b to your computer and use it in GitHub Desktop.
Antigravity VS Code Extension Toolkit

Get it here: Antigravity VS Code Extension Toolkit

One of the biggest annoyances with Antigravity/VSCodium is the extension gap. Open VSX lags behind, some extensions are missing entirely, and the ones that do exist are sometimes published by unverified third parties. But if you switch your marketplace setting to Microsoft's, all your existing Open VSX extensions stop updating. Lose-lose.

agvs lets you have both. It downloads .vsix packages directly from the VS Code Marketplace and installs them via CLI. Your Open VSX marketplace stays untouched, those extensions keep updating normally. You just also get the real, current versions of anything that's lagging or missing.

# install claude code v2.1.81 from VS Code Marketplace instead of Open VSX's older v2.0.13.
agvs -i anthropics.claude-code

agvs -s          # check for updates & install them
agvs -c          # compare what's installed across your IDEs
agvs -l          # list what agvs is managing
agvs -sst        # optional: daily auto-sync scheduled task

One PowerShell script (~200 lines, heavily commented) + a 5-line .cmd wrapper so you can just type agvs from any terminal. Only talks to marketplace.visualstudio.com.

No telemetry, no tracking, all paths portable.

Just drop both files in the same folder and run agvs from there.

Set it and forget it:

Run agvs -sst once as admin to set up a daily scheduled task that runs agvs -s (sync) and never think about it again.

If you run VS Code alongside Antigravity, the compare flag (-c) shows you exactly which extensions differ between them.

You can uninstall extensions normally via Antigravity:

The tool will detect the removal and will not reinstall it. It will detect the manual uninstall and remove it from its list of extensions to auto-update, next time you run agvs -s manually or automatically via the optional scheduled task.

Show the commands:

PS C:\dev\antigravity-vscode-extension-toolkit> .\agvs -h

--- agvs Status ---
[+] Mode: Administrator
[+] Scheduled Task: Active
-------------------

agvs - Antigravity VS Code Extension Manager

Usage:
  agvs -i <ext>     Install extension(s) by Marketplace ID
  agvs -s           Sync: check for updates & install them
  agvs -l           List managed extensions
  agvs -c           Compare extensions across IDEs
  agvs -sst         Setup daily auto-sync (requires Admin)

Examples:
  agvs -i ms-python.python
  agvs -i ms-python.python, esbenp.prettier-vscode
  agvs -s

Install an extension from the VS Code Marketplace:

PS C:\dev\antigravity-vscode-extension-toolkit> .\agvs -i anthropic.claude-code

--- agvs Status ---
[+] Mode: Administrator
[+] Scheduled Task: Active
-------------------

Target: anthropic.claude-code
  Downloading v2.1.81...
  Installing...
[createInstance] extensionManagementService depends on antigravityAnalytics which is NOT registered.
Installing extensions...
Extension 'anthropic.claude-code-2.1.81.vsix' was successfully installed.

List all extensions managed by this tool:

PS C:\dev\antigravity-vscode-extension-toolkit> .\agvs -l

--- agvs Status ---
[+] Mode: Administrator
[+] Scheduled Task: Active
-------------------

anthropic.claude-code
SingularityInc.claude-notifier
vishalraut.vscode-toon
vscode-icons-team.vscode-icons

List ALL extensions and which IDEs have an installed matching extension name:

Matches extensions by name, not publisher, because the name usually matches between the VS Code and Open VSX marketplaces, but the publisher is different.
So, bob.thingy in VS Code = dave.thingy in Antigravity*.*
The VS Code full name takes precedence for display in the list, but shows Y in both IDE columns.

PS C:\dev\antigravity-vscode-extension-toolkit> .\agvs -c

--- agvs Status ---
[+] Mode: Administrator
[+] Scheduled Task: Active
-------------------

Extension ID                                      Insiders Antigravity VS Code
------------                                      -------- ----------- -------
076923.python-image-preview                       Y        N           Y
10nates.ollama-autocoder                          Y        N           Y
akamud.vscode-theme-onedark                       N        N           Y
alfredbirk.tailwind-documentation                 Y        N           Y
anthony-c-martin.vscode-bicep                     N        Y           N
antigravity-jules-bridge.antigravity-jules-bridge N        Y           N

(...list is lengthy so I cut it off here)
@echo off
setlocal
set SCRIPT_PATH=%~dp0agvs.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File "%SCRIPT_PATH%" %*
endlocal
<#
.SYNOPSIS
agvs - Antigravity VS Code Extension Manager
.DESCRIPTION
Manages VS Code extensions across multiple IDE installs (VS Code, Insiders, Antigravity, forks).
What it does:
- Downloads .vsix packages from the official VS Code Marketplace
- Installs them via your IDE's CLI, tracks what it manages in a plain text file
- Syncs (auto-updates) managed extensions, compares installs across IDEs
- Optionally sets up a daily Windows Scheduled Task for hands-free sync
What it does NOT do:
- Collect, send, or store any personal data
- Contact any server other than marketplace.visualstudio.com
- Modify system settings, registry, or environment variables
- Run silently unless YOU explicitly create the scheduled task
Local files created (same folder as this script):
- managed_extensions.txt : One extension ID per line (hand-editable)
- temp_vsix\ : Temp .vsix downloads, cleaned up after each install
.EXAMPLE
agvs -i ms-python.python, esbenp.prettier-vscode
agvs -s # sync & update all managed extensions
agvs -c # compare across IDE installs
agvs -l # list managed extensions
agvs -sst # setup daily auto-sync (run as admin)
.NOTES
Author : 1personlabs
License : MIT
Requires: PowerShell 5.1+, Windows, target IDE CLI in PATH
#>
# ── Config ──────────────────────────────────────────────────────────────────
# All paths use $HOME or $scriptRoot — portable across machines.
# Update $idePaths if your IDE stores extensions.json somewhere nonstandard.
$scriptRoot = Split-Path -Parent $MyInvocation.MyCommand.Definition
$listFile = Join-Path $scriptRoot "managed_extensions.txt"
$tempFolder = Join-Path $scriptRoot "temp_vsix"
$taskName = "antigravity vscode extension toolkit sync"
# Where each IDE keeps its installed-extensions manifest (read-only, never written by agvs)
$idePaths = @{
Antigravity = "$HOME\.antigravity\extensions\extensions.json"
"VS Code" = "$HOME\.vscode\extensions\extensions.json"
Insiders = "$HOME\.vscode-insiders\extensions\extensions.json"
}
# ── Init ────────────────────────────────────────────────────────────────────
if (!(Test-Path $listFile)) { New-Item $listFile -ItemType File -Force | Out-Null }
if (!(Test-Path $tempFolder)) { New-Item $tempFolder -ItemType Directory -Force | Out-Null }
else { Get-ChildItem $tempFolder -Filter *.vsix | Remove-Item }
# ── Status ──────────────────────────────────────────────────────────────────
$isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(
[Security.Principal.WindowsBuiltInRole]::Administrator)
Write-Host "--- agvs Status ---" -ForegroundColor Gray
Write-Host $(if ($isAdmin) { "[+] Mode: Administrator" } else { "[!] Mode: Standard User (Run as Admin for Scheduled Tasks)" }) `
-ForegroundColor $(if ($isAdmin) { "Green" } else { "Yellow" })
try { $null = Get-ScheduledTask -TaskName $taskName -ErrorAction Stop
Write-Host "[+] Scheduled Task: Active" -ForegroundColor Cyan }
catch [Microsoft.Management.Infrastructure.CimException] {
Write-Host "[-] Scheduled Task: Not Found (use 'agvs -sst')" -ForegroundColor DarkGray }
catch { Write-Host "[?] Scheduled Task: Unknown (Access Denied)" -ForegroundColor DarkGray }
if (!(Get-Command antigravity -ErrorAction SilentlyContinue)) {
Write-Host "[!] 'antigravity' not found in PATH" -ForegroundColor Red
}
Write-Host "-------------------`n"
# ── Helpers ─────────────────────────────────────────────────────────────────
function Get-MarketplaceVersion($extId) {
# Queries the public VS Code Marketplace API for the latest STABLE version.
# Same endpoint VS Code itself uses. No auth/API key needed.
try {
$body = @{
filters = @(@{ criteria = @(@{ filterType = 7; value = $extId }) })
flags = 914 # include version + asset info
} | ConvertTo-Json -Depth 10
$resp = Invoke-RestMethod -Uri "https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery" `
-Method Post -Body $body -ContentType "application/json" `
-Headers @{ "Accept" = "application/json;api-version=7.2-preview.1" }
$ext = $resp.results[0].extensions[0]
if ($ext) {
return ($ext.versions |
Where-Object { $_.properties.key -notcontains "Microsoft.VisualStudio.Code.PreRelease" } |
Sort-Object lastUpdated -Descending | Select-Object -First 1).version
}
} catch { return $null }
}
function Install-Extension($extId) {
# 1) Look up latest version 2) Download .vsix 3) Install via CLI 4) Cleanup 5) Track
Write-Host "Target: $extId" -ForegroundColor Cyan
$version = Get-MarketplaceVersion $extId
if (!$version) { Write-Host " Error: version not found" -ForegroundColor Red; return }
$vsixPath = Join-Path $tempFolder "$extId-$version.vsix"
try {
$pub, $name = $extId.Split('.')
Write-Host " Downloading v$version..."
Invoke-WebRequest -Uri "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/$pub/vsextensions/$name/$version/vspackage" -OutFile $vsixPath
Write-Host " Installing..."
antigravity --install-extension $vsixPath
}
catch { Write-Host " Failed: $($_.Exception.Message)" -ForegroundColor Red }
finally { if (Test-Path $vsixPath) { Remove-Item $vsixPath -Force } }
$managed = Get-Content $listFile
if ($extId -notin $managed) { Add-Content $listFile $extId }
}
function Get-IdeExtensions($path) {
# Returns extension IDs from an IDE's manifest, or empty array if IDE isn't installed
if (Test-Path $path) { return (Get-Content $path -Raw | ConvertFrom-Json).identifier.id }
return @()
}
# ── Commands ────────────────────────────────────────────────────────────────
switch -Wildcard ($args[0]) {
{ $_ -in "-i", "--install" } {
# Install one or more extensions by Marketplace ID (comma-separated)
$targets = ($args[1..($args.Length-1)] -join " ").Split(", ") | Where-Object { $_ -ne "" }
foreach ($ext in $targets) { Install-Extension $ext.Trim() }
}
{ $_ -in "-s", "--sync" } {
# Check managed extensions for updates; drop any you manually uninstalled
if (!(Test-Path $listFile)) { return }
$managed = Get-Content $listFile
$agJson = Get-Content $idePaths["Antigravity"] -Raw | ConvertFrom-Json
$newList = @()
foreach ($extId in $managed) {
$installed = $agJson | Where-Object { $_.identifier.id -eq $extId }
if ($null -eq $installed) {
Write-Host "Removed (manual uninstall): $extId" -ForegroundColor Yellow; continue
}
$newList += $extId
$market = Get-MarketplaceVersion $extId
if ($market -and $market -ne $installed.version) {
Write-Host "Updating $extId ($($installed.version) -> $market)" -ForegroundColor Green
Install-Extension $extId
}
}
$newList | Out-File $listFile -Encoding utf8
}
{ $_ -in "-l", "--list" } {
Get-Content $listFile | Sort-Object | ForEach-Object { Write-Host $_ }
}
{ $_ -in "-c", "--compare" } {
# Compare extensions across all detected IDEs — gracefully skips missing ones
$data = @{}
$sources = @()
foreach ($ide in $idePaths.Keys) {
$ids = Get-IdeExtensions $idePaths[$ide]
$data[$ide] = $ids
if ($ids.Count) { $sources += $ide }
else { Write-Host "[-] $ide not detected, skipping." -ForegroundColor DarkGray }
}
if ($sources.Count -lt 2) {
Write-Host "Need at least 2 IDE installs to compare." -ForegroundColor Yellow; break
}
$allIds = ($data.Values | ForEach-Object { $_ }) | Select-Object -Unique | Where-Object { $_ }
$results = foreach ($id in $allIds) {
$row = [ordered]@{ "Extension ID" = $id }
$allYes = $true
foreach ($ide in $idePaths.Keys) {
$present = if ($data[$ide] -contains $id) { "Y" } else { $allYes = $false; "N" }
$row[$ide] = $present
}
if (!$allYes) { [PSCustomObject]$row }
}
$results | Sort-Object "Extension ID" | Format-Table -AutoSize
}
{ $_ -in "-sst", "--setup-scheduled-task" } {
# Create a Windows Scheduled Task for daily auto-sync at 10 AM (requires admin)
if (!$isAdmin) { Write-Host "ERROR: Admin required." -ForegroundColor Red; break }
$exists = Get-ScheduledTask -TaskName $taskName -ErrorAction SilentlyContinue
$prompt = if ($exists) { "Task exists. Recreate? (Y/N)" } else { "Create scheduled task? (Y/N)" }
if ((Read-Host $prompt) -ne 'Y') { break }
if ($exists) { Unregister-ScheduledTask -TaskName $taskName -Confirm:$false }
$action = New-ScheduledTaskAction -Execute "powershell.exe" `
-Argument "-ExecutionPolicy Bypass -WindowStyle Hidden -File `"$PSCommandPath`" -s"
$trigger = New-ScheduledTaskTrigger -Daily -At 10:00AM
Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger -Description "Daily Extension Sync"
Write-Host "Task registered." -ForegroundColor Green
}
Default {
@"
agvs - Antigravity VS Code Extension Manager
Usage:
agvs -i <ext> Install extension(s) by Marketplace ID
agvs -s Sync: check for updates & install them
agvs -l List managed extensions
agvs -c Compare extensions across IDEs
agvs -sst Setup daily auto-sync (requires Admin)
Examples:
agvs -i ms-python.python
agvs -i ms-python.python, esbenp.prettier-vscode
agvs -s
"@ | Write-Host -ForegroundColor Cyan
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment