Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@elijahmanor
Last active May 11, 2022 09:52
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save elijahmanor/7f9762a4c2296839ad33e33513e88043 to your computer and use it in GitHub Desktop.
Save elijahmanor/7f9762a4c2296839ad33e33513e88043 to your computer and use it in GitHub Desktop.
Export @code Extensions to a Markdown List

You can run either of the following snippets in your terminal to generate a markdown list of your VS Code extensions.

code --list-extensions | awk '{ print "* [" $1 "](https://marketplace.visualstudio.com/items\?itemName\=" $1 ")" }'

npx https://gist.github.com/elijahmanor/7f9762a4c2296839ad33e33513e88043

NOTE: You can append | pbcopy to either of the above commands to pipe the output to your Mac's copy/paste buffer.

#!/usr/bin/env node
const { exec } = require("child_process");
exec("code --list-extensions", (err, stdout) => {
if (err) { return; }
const markdown = stdout.split("\n").filter( e => e ).map(extension =>
`* [${extension}](https://marketplace.visualstudio.com/items\?itemName\=${extension})`
).join("\n");
console.log(markdown);
});
{
"name": "vscode-extension-markdown",
"version": "1.0.0",
"bin": "./index.js"
}