Skip to content

Instantly share code, notes, and snippets.

@nicinabox
Created May 1, 2012 18:27
Show Gist options
  • Save nicinabox/2570263 to your computer and use it in GitHub Desktop.
Save nicinabox/2570263 to your computer and use it in GitHub Desktop.
Pack Chrome extensions from the command line
# $ crx `pwd`
function crx() {
~/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --pack-extension=$@ --pack-extension-key=$@/key.pem
}
@elliotboney
Copy link

It's great but i rewrote it because including the singing key could be bad

function crx() {
  /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --pack-extension=$@ --pack-extension-key=$@.pem
}

@g8up
Copy link

g8up commented Aug 14, 2018

How Can I archive this under Windows platform?

@snowman
Copy link

snowman commented Apr 15, 2019

uninstall windows and buy a Apple.

@ThatOneCalculator
Copy link

How Can I archive this under Windows platform?

ok to be fair, snowman was being a bit harsh. this is called "shell" script, designed for MacOS and Linux. I wouldn't recommend using Windows (for anything tbh), but Im sure there's an alternative hidden in your %APPDATA% which could be accessed with "bat", Window's answer to "shell".

@andywerner
Copy link

Apparently this should work on Win:
chrome.exe --pack-extension=c:\myext --pack-extension-key=c:\myext.pem

@conorzhong
Copy link

How Can I archive this under Windows platform?

From official:
https://developer.chrome.com/docs/extensions/mv3/linux_hosting/#package-through-command-line

@N3zTho
Copy link

N3zTho commented Sep 15, 2023

uninstall windows and buy a Apple.

😂

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