Skip to content

Instantly share code, notes, and snippets.

@elijahmanor
Last active November 21, 2024 16:43
Show Gist options
  • Select an option

  • Save elijahmanor/7f9762a4c2296839ad33e33513e88043 to your computer and use it in GitHub Desktop.

Select an option

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"
}
@brayhoward
Copy link
Copy Markdown

Very cool! Thanks for the Egghead videos too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment