Pants v2: The ergonomic build system

Welcome to the Pants v2 documentation hub!

Pants v2 is a fast, scalable, user-friendly build system for growing codebases. It's currently focused on Python, with support for other languages coming soon.

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

Get Started

Setup for authentication with Toolchain.

Config section: [auth]

Basic options

auth_file

--auth-auth-file=<optional_file_option>
PANTS_AUTH_AUTH_FILE
default: None

Relative path (relative to the build root) for where to store and read the auth token


from_env_var

--auth-from-env-var=<str>
PANTS_AUTH_FROM_ENV_VAR
default: None

Loads the access token from an environment variable


base_url

--auth-base-url=<str>
PANTS_AUTH_BASE_URL
default: https://app.toolchain.com/api/v1

auth app base url


ci_env_variables

--auth-ci-env-variables="['<str>', '<str>', ...]"
PANTS_AUTH_CI_ENV_VARIABLES
default: []

Environment variables in CI used to identify build (for restricted tokens)


org

--auth-org=<str>
PANTS_AUTH_ORG
default: None

organization slug for public repo PRs


Advanced options

restricted_token_matches

--auth-restricted-token-matches="{'key1': val1, 'key2': val2, ...}"
PANTS_AUTH_RESTRICTED_TOKEN_MATCHES
default: {}

A dict containing environment variables with their expected values (regex) which need to match in order for the plugin to request a restricted access token.


Deprecated options

None

Updated 15 days ago


auth


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.