LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pants

scalable build system for monorepos

TLDR

List targets
$ pants list ::
copy
Run tests
$ pants test ::
copy
Format code
$ pants fmt ::
copy
Lint code
$ pants lint ::
copy
Build package
$ pants package [path/to:target]
copy
Run specific target
$ pants run [path/to:target]
copy
Check types
$ pants check ::
copy
Show dependencies
$ pants dependencies [path/to:target]
copy

SYNOPSIS

pants [options] goal [targets...]

DESCRIPTION

pants is a scalable build system for monorepos. It supports Python, Go, Java, Scala, Shell, and Docker.Target notation uses colons to separate path and target name. Double colons (::) match all targets recursively.Caching and memoization make repeated builds fast. Remote caching enables team-wide build sharing.Dependency inference automatically discovers imports. Explicit dependencies can be declared in BUILD files.Fine-grained invalidation rebuilds only affected targets. Concurrent execution uses available cores.

PARAMETERS

list

List matching targets.
test
Run tests for matching test targets.
fmt
Format source files in-place using configured formatters.
lint
Run lint checks on matching targets.
check
Run type/compilation checks (e.g. mypy, javac).
package
Build deployable artifacts (wheels, pex, jars, docker images).
run
Run an executable target.
publish
Publish deployable artifacts to a remote registry.
dependencies
Show the transitive dependencies of a target.
dependents
Show targets that depend on the given target.
roots
List all root targets that match.
peek
Print detailed metadata about matching targets.
repl
Start an interactive REPL preloaded with the specified targets.
tailor
Auto-generate or update BUILD files.
update-build-files
Apply deprecation fixes to existing BUILD files.
--changed-since REF
Limit targets to those changed since the given git ref.
--changed-dependents=MODE
Include dependents of changed targets (none, direct, transitive).
-l, --level LEVEL
Log level (trace, debug, info, warn, error).
--keep-sandboxes=MODE
Keep the execution sandbox for debugging (always, onfailure, never_).
--no-local-cache, --no-remote-cache
Disable the local or remote build cache for the run.

CAVEATS

Requires BUILD files defining targets. Initial setup has learning curve. Large codebase initial run can be slow.

HISTORY

Pants was originally developed at Twitter around 2011. Version 2.x was a ground-up rewrite focusing on Python ergonomics. Now maintained by Toolchain as an open-source project.

SEE ALSO

bazel(1), buck(1), make(1), gradle(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid