/chrome-extension-downloader

Command-line shell script to download a CRX (chrome extension) for offline installation

Primary LanguageBatchfileGNU General Public License v2.0GPL-2.0

Summary:

Command-line shell script to download a CRX (chrome extension) for offline installation.

  • available for both Windows cmd and Linux bash shell
  • no installation
    • assumes that a wget binary can be found in PATH

Usage:

crxdl "ID" ["output-path"]
  • "ID"
    • the unique ID of a chrome extension
  • "output-path"
    • the optional filepath where the CRX is saved
    • can either be:
      • an absolute path
      • a filename that is saved in the working directory
    • default value:
      • saves file in the working directory
      • filename is: "$ID.crx"

Example:

To download the CRX: "uBlock Origin"

  • URL of extension:
  • ID of extension (obtained from its URL):
    • cjpalhdlnbpafiamejdnhcphjbkeiagm
  • command to save extension using default output path:
    • crxdl "cjpalhdlnbpafiamejdnhcphjbkeiagm"
      • saved to ⇒ ./cjpalhdlnbpafiamejdnhcphjbkeiagm.crx
  • command to save extension to a non-default filename in the working directory:
    • crxdl "cjpalhdlnbpafiamejdnhcphjbkeiagm" "uBlock.crx"
      • saved to ⇒ ./uBlock.crx
  • command to save extension to a non-default filepath:
    • crxdl "cjpalhdlnbpafiamejdnhcphjbkeiagm" "/save/to/path/uBlock.crx"
      • saved to ⇒ /save/to/path/uBlock.crx

How to (offline) install a saved CRX:

  • open the Extensions page
    • from the address bar:
      • open: chrome://extensions/
    • from the navigation menu:
      • click: the Settings "hamburger" icon
      • select: "More tools" > "Extensions"
  • drag & drop the saved .crx file onto the Extensions page
  • follow the prompts:
    • click: "Add extension"

Credits:

Legal: