Developer Environment

Before contributing to the Jetpack monorepo, you’ll need to ensure your environment is set up properly. Development in the repo has the following dependencies:

While not required for all use cases, we also recommend the following when working in the repo:

Below we’ve listed a few ways to get Jetpack’s development environment set up on your computer.

Automated installation

Our automated installer works well on Apple Silicon and Debian-based operating systems, and is the preferred method to set up your environment.

Start by cloning the Jetpack Monorepo:

git clone git@github.com:Automattic/jetpack.git && cd jetpack

Run the installation script from the monorepo root:

./tools/install-monorepo.sh

After this completes, open a new shell and you’re done! You can additionally check if everything is set up correctly using the environment checker script:

./tools/check-development-environment.sh

All green YES or OK messages indicate you’re ready to start.

Manual Installation

We recommend Homebrew for managing installations on macOS. The official installation docs can be found here.

You can install it by running the following command in the terminal, in case you don’t have it installed already:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

You can then use it to install the several dependencies:

brew install bash jq php@8.2

You’ll also need to install nvm, composer, and pnpm. We recommend using the official install methods, as using brew to install these can cause dependency/environment complications:

Then install the correct node version using nvm:

nvm install && nvm use

Run the following to install various package dependencies:

pnpm install
composer install

Optionally link the Jetpack CLI so you can call it directly without the pnpm prefix:

pnpm jetpack cli link

At this point you should be all set! Feel free to check if everything is set up correctly with:

./tools/check-development-environment.sh

Docker

The Jetpack Monorepo comes with a pre-configured Docker development environment to get you started quickly as well as provide better integration with our existing testing infrastructure. You’ll need to have Docker installed in order to take full advantage of it. You can download Docker from its official page or use brew to install it:

brew install --cask docker