HomeDocs
DocsCommunityTestimonialsUsersGitHubTwitterBlogJobsTermsPrivacyCookies
TermsPrivacyCookies

Configuring Pants

Creating the initial pants.toml config file.

Pants has a robust options system, allowing you to configure hundreds of options. Every Pants option can be set via a command-line flag, an environment variable, or, most commonly, a config file.

The options system is described in detail here. This page will set up your initial Pants config file.

Creating the config file

Pants configuration lives in a file called pants.toml in the root of the repo. This file uses the TOML format.

To create an initial config file, paste this content into a root-level file named pants.toml:

[GLOBAL]
pants_version = "$PANTS_VERSION"
v1 =  false  # Turn off the v1 execution engine.
v2 = true  # Enable the v2 execution engine.
dynamic_ui = true
pantsd = true  # Enable the Pants daemon for better performance.

backend_packages = []  # Deregister all v1 backends.  

# List v2 backends here.
backend_packages2 = []

# List v2 plugins here. 
plugins2 = []

where $PANTS_VERSION is the version you configured during the initial installation.

When you'd like to upgrade Pants, edit pants_version and the <<pantscmd>> script will self-update on the next run.