A set of Nix tools exposed via apps for retrieving Mozilla extension IDs from an XPI add-on package. It automates the process of downloading the XPI file from Mozilla's add-ons websites, extracting the manifest.json, and displaying the unique ID.
Important: This is a fork and slight adaptation of the already useful a command-line tool by tupakkatapa.
This tool was inspired by the difficulty of retrieving the extension ID when non-declarative installations are blocked in Firefox, as discussed in this thread.
Run the script by passing it a program-specific base URL and an extension URL as arguments.
nix run github:3nol/nix-mozid#mozid -- <base-url> <extension-url>For example, use can use "https://addons.mozilla.org/firefox/downloads/file" as base URL and "https://addons.mozilla.org/en-US/firefox/addon/vimium-ff" as extension URL to determine the Mozilla ID of this XPI package.
Clone the repository and make the script executable.
git clone https://github.com/3nol/nix-mozid.git
cd nix-mozid
chmod +x mozid.shRun the script analogous to above.
./mozid.sh <base-url> <extension-url>The provided apps do not make use of the <base url> argument, they use their own default.
mozid-firefoxdefaults to using the Firefox base URL.mozid-thunderbirddefaults to using the Thunderbird base URL.
Analogously, run the script by passing an extension URL as argument.
nix run github:3nol/nix-mozid#mozid-<base> -- <extension url>Picking up the example from above, now use this instead.
nix run github:3nol/nix-mozid#mozid-firefox -- "https://addons.mozilla.org/en-US/firefox/addon/vimium-ff"