List Available Targets
You want to find out which Pants targets are currently available in your project or in a subfolder within the project.
list goal and specify a folder containing a
BUILD file. This command, for example, would show all targets available in
$ ./pants list myproject/:
This command would show all targets available in the
myproject directory as well as in all subdirectories:
$ ./pants list myproject/::
Note the syntactical difference between the single colon and the double colon.
The output from a
./pants list invocation may look something like this:
$ ./pants list server/: server/server:analytics server/server:bin server/server:tests
We do not recommend using
./pants list :: unless you're working with a very small Pants project. This command will list all targets currently available in the entire project, which can be a very slow operation in larger projects.