Pants 2: The ergonomic build system

Welcome to the Pants 2 documentation hub!

Pants 2 is a fast, scalable, user-friendly build system for codebases of all sizes. It's currently focused on Python, Go, Java, Scala, Shell, and Docker, with support for other languages coming soon.

Here you'll find guides to help you get started with Pants 2, comprehensive documentation on how to configure, run and customize Pants 2, and information on how to get help from the Pants community.

Why Pants build system

A lot of effort has gone into making Pants easy to adopt, easy to use and easy to extend. We're super excited to bring Pants' distinctive features to Go, Java, Python, Scala, and Shell users:

Much easier to adopt and maintain.

Pants requires very minimal BUILD file metadata/boilerplate. It uses a combination of static analysis and sensible defaults to infer most of that information on the fly. So your BUILD files can be very minimal — and even those can be generated and updated for you!

Resistant to supply chain attacks.

Pants has out-of-the-box support for multiple dependency resolves and their corresponding lockfiles, so you can have hermetic, repeatable builds that are resilient to supply chain attacks, even in complex situations where you have multiple versions of the same dependencies in different parts of the codebase.

Meets you where you are.

Pants operates, underneath it all, at the file level. So even if you have fine-grained dependency tangles (or even cycles!) that prevent you from creating modular BUILD targets and dependencies, Pants can work with that.

Easy to extend.

Pants has a rich plugin API that uses idiomatic async Python 3, in case you need any customizations. In fact the built-in rules use that same API.

Git-friendly.

Pants natively speaks git, so you can do things like "run all the tests affected by changes between main and my current branch".

Responsive community.

Pants community is welcoming, quick to answer questions, and genuinely interested in your thoughts and contributions. So come say hi on the Slack and tell us what you need next!

...not to mention Pants' first-class support for Python, Docker, Pex, Shell, linting, formatting, codegen, and more; plus brand new support for Go, Java, and Scala. Learn more.