visual-studio-codevscodium

How do I list extensions installed from VSIX?


I'm using Codium with some extensions I installed from VSIX since they're not available on Open VSX. I want to get a list of them (so that, for example, I can check if they've been added to Open VSX or check for updates), but I can't figure out how to do that easily. The only way I've found is to go through all extensions one-by-one and check if they have a Marketplace link (or other marketplace info like install count).

Research


Solution

  • In the user extensions.json file, it looks like ones that were installed from VSIX don't have a uuid under identifier and have very little metadata (e.g. no id).

    In my case, the file is at ~/.vscode-oss/extensions/extensions.json and this command gets the list:

    file=~/.vscode-oss/extensions/extensions.json
    jq -r '.[] | select(.identifier.uuid == null) | .identifier.id' "$file" | sort
    

    (For the opposite, use != null.)


    Then I found out you can use vsce to query the VSCode Marketplace and the equivalent for Open VSX is ovsx, e.g.

    vsce show "$name"
    ovsx get --metadata "$name"
    

    So to check if any were published on Open VSX after I installed them, I wrote this Bash script that'll go through the VSIX ones and check if they're on the marketplace, plus double-check the non-VSIX ones:

    file=~/.vscode-oss/extensions/extensions.json
    
    for operator in '==' '!='; do
        condition=".identifier.uuid $operator null"
        echo "$condition"
        jq -r ".[] | select($condition) | .identifier.id" "$file" |
            sort |
            while read -r name
        do
            if ovsx get --metadata "$name" > /dev/null; then
                echo "Found: $name"
            fi  # Otherwise ovsx prints an error
        done
        echo
    done
    

    This identified one extension, so I uninstalled it and reinstalled it from the Marketplace, and after it has a .identifier.uuid, which seems to confirm this method works! I noticed though, it already had a Marketplace link, so I suppose it would have updated automatically, but no updates were published since I installed it.


    Lastly, just to be sure, I did check that all the names in extensions.json match codium --list-extensions.