Skip to content
Build scripts for XPI: creating, publishing and providing auto-update.
JavaScript Shell Makefile
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Utilities for Firefox/Thunderbird Add-on Developers

Building XPI packages


  • bash
  • sed
  • zip
  • GNU cp
  • GNU sha1sum

For Windows, you must setup Cygwin for these required commands and add the path to the Cygwin's bin directory via the envrionemnt variable PATH, like:

set PATH=C:\cygwin\bin;C:\Program Files\TortoiseGit\bin;...

How to install scripts to build XPI packages?

First, put these tools under a directory named makexpi, at the root of your project. If it is a Git repository, you should add this as a submodule, like:

$ git clone
$ cd new-addon
$ git submodule add

Next, run the script as:

$ makexpi/ -n "package-name-of-new-addon"

Even if you forget to specify the -n option, the script will ask it to you with a prompt. Then you'll get three new files:

  • Makefile
  • make.bat, a batchfile for Windows with Cygwin.
  •, a bash script for Windows with Cygwin.

How to build XPIs with GNU make?

You'll just have to type make to build XPI package, like:

$ make
$ ls *.xpi
package-name-of-new-addon.xpi package-name-of-new-addon_noupdate.xpi

The file with a suffix _noupdate is a sanitized version for the Mozilla Add-ons. Even if you specify your custom updateURL and updateKEY in your install.rdf, they are automatically sanitized.

For Windows, launch the batch file make.bat by double click.

How to sign to XPIs? / How to upload built XPI to Mozilla Add-ons website?

First, you must generate an API key. See the entry:

For example, if you get the result:

  • JWT issuer: user:xxxxxx:xxx
  • JWT secret: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

then set them to environment variables JWT_KEY and JWT_SECRET and run make signed.

$ export JWT_KEY=user:xxxxxx:xxx
$ export JWT_SECRET=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
$ make signed

If your XPI package is automatically signed, it will be downloaded to the current directory. However, if it requires manual review by AMO editors, you'll have to download it by hand after preliminary or full review.

You can use this command to upload new version for your public (listed) addon also. Note that a new version uploaded by this command will have no version description. After you upload a new version, you'll have to log in to the developer hub and complete the version manually.

Something went wrong with that request. Please try again.