Skip to main content

mozconfigwrapper

PyPI version CI

Mozconfigwrapper is a Python + shell tool to manager your mozconfigs. Mozconfigwrapper hides all your mozconfigs away in a configurable directory (defaults to ~/.mozconfigs) and allows you to easily create, switch, delete and edit them. Mozconfigs remain active across shell sessions.

Installation

Mozconfigwrapper is on PyPi as the mozconfigwrapper pacakge. The recommended method to install it is via uv:

uv tool install mozconfigwrapper

Then open your ~/.bashrc file (or equivalent) and add the line:

source $(which mozconfigwrapper.sh)

Finally run:

source ~/.bashrc

Usage

You can create, remove, switch, list and edit mozconfigs.

To build with (activate) a mozconfig named foo, run:

buildwith foo

To create a mozconfig named foo, run:

mkmozconfig foo

To delete a mozconfig named foo, run:

rmmozconfig foo

To see the currently active mozconfig, run:

mozconfig

To list all mozconfigs, run:

mozconfig -l

To edit the currently active mozconfig, run (the $EDITOR variable must be set):

mozconfig -e

Configuration

mozconfig location

By default mozconfigs are stored in the ~/.mozconfigs directory, but you can override this by setting the $BUILDWITH_HOME environment variable. e.g, add:

export BUILDWITH_HOME=~/my/custom/mozconfig/path

to your ~/.bashrc file (or equivalent).

buildwith command

When running the buildwith command, export MOZCONFIG=<path to mozconfig> is run by default. You can use any other command by overriding the BUILDWITH_COMMAND environment variable. For example, if you put this in your ~/.bashrc file (or equivalent):

export BUILDWITH_COMMAND="export MOZCONFIG=#1 && launchctl setenv MOZCONFIG #1"

buildwith will also set the MOZCONFIG environment variable in launchctl (useful when running Android Studio). All occurences of #1 will be replaced by the path to the mozconfig file.

prompt prefix

Similar to Python virtualenvs, you can display the active mozconfig name as a prefix in your shell prompt. This prefix only appears when you are inside a gecko repository. To enable this feature, add to your ~/.bashrc file (or equivalent):

export BUILDWITH_SHOW_PROMPT=1

The default format is (mozconfig_name) but you can customize it with:

export BUILDWITH_PROMPT_FORMAT="[%s] "

The %s will be replaced with the mozconfig name. For example, if you activate a config named "debug" while inside a gecko repository, your prompt will show (debug) or [debug] depending on your format setting.

The prompt automatically appears when you cd into a gecko repository and disappears when you leave it. Gecko repositories are detected by the presence of mach or moz.configure files.

mozconfig template

When you make a new mozconfig, it will be populated with some basic build commands and the name of the mozconfig will be appended to the end of the OBJDIR instruction. You can modify what gets populated by default by editing the ~/.mozconfigs/.template file. For example, if I wanted my default configuration to store object directories in a folder called objdirs and enable debugging and tests, I'd edit the ~/.mozconfigs/.template file to look like:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdirs/
ac_add_options --enable-application=browser
ac_add_options --enable-debug
ac_add_options --enable-tests

Now if I ran the command 'mkmozconfig foo', foo would be populated with the above and have the word 'foo' appended to the first line.

Metadata

Release files for mozconfigwrapper 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mozconfigwrapper 1.1.0
File Size Uploaded Provenance Actions
mozconfigwrapper-1.1.0.tar.gz 5.2 kB With provenance Details for mozconfigwrapper-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mozconfigwrapper 1.1.0
File Interpreter ABI Platform Actions
mozconfigwrapper-1.1.0-py3-none-any.whl Python 3 none any Details for mozconfigwrapper-1.1.0-py3-none-any.whl

Total release size: 12.0 kB

Release files / mozconfigwrapper-1.1.0.tar.gz

Download URL mozconfigwrapper-1.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3ffa481b1cfc792017a3e04407c75e37c221286b26e37c516b90c49f9c04083b
BLAKE2b-256 checksum
How to use checksums
bc093d82a167a819166e83eaf0251dcf3a4f594649c63beed3d1068deb598b26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

Release files / mozconfigwrapper-1.1.0-py3-none-any.whl

Download URL mozconfigwrapper-1.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3719ba597f3319018e5e787078c1d06c242635ffaceba504c7d49aed5466b52e
BLAKE2b-256 checksum
How to use checksums
9bd3571a9f192758b7432bb5ef839f5ce5f6920a1be4f5efbb5331468292ae0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

Security for mozconfigwrapper 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mozconfigwrapper-1.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page