Installing Pants

Most installations can use our one-step setup script to get a minimal version of Pants set up. If you need to make use of an advanced or non-standard setup, see our manual installation page.

First, set up a minimal pants.toml config file to instruct the script to download the latest 2.13 release:

Pants has a launch script (called ./pants) that handles downloading, bootstrapping, and upgrading Pants, which you need to save at the root of your repository.

Pants also needs a pants.toml file, where you will eventually add all of the configuration needed to run testing, linting, and formatting rules. For now, it just needs to specify the version of Pants that you want to use.

To streamline this, we provide a script that will create a minimal pants.toml file specifying the latest released version of Pants, download, and run the ./pants launch script.

/bin/bash -c "$(curl -fsSL https://static.pantsbuild.org/setup/one_step_setup.sh)" 

If the installation process was successful, you will see Pants was installed successfully! echoed to your terminal.

If you had difficulty installing Pants, see our getting help for community resources to help you resolve your issue.

📘

Add ./pants to version control

You should check the ./pants script into your repo so that all users can easily run Pants.

👍

Upgrading Pants

The ./pants script will automatically install and use the Pants version specified in pants.toml, so upgrading Pants is as simple as editing pants_version in that file.