Pants commands are known as _goals_, such as `
test` and `
To see the current list of goals, run:
You'll see more goals activated as you activate more [backends](🔗).
# Running goals
You can also run multiple goals in a single run of Pants, in which case they will run sequentially:
Finally, Pants supports running goals in a `
--loop`. In this mode, all goals specified will run
sequentially, and then Pants will wait until a relevant file has changed to try running them again.
Ctrl+C` to exit the `
# Goal arguments
Most goals require arguments to know what to work on.
You can use several argument types:
|File path||Match the file||`|
|Directory path||Match everything in the directory||`|
|`||Match everything in the directory and below||`|
|[Target addresses](🔗)||Match the target||`|
You can combine argument types, e.g. `
./pants fmt src/go:: src/py/app.py`.
To ignore something, prefix the argument with `
-`. For example,
./pants test :: -project/integration_tests` will run all your tests except for those in the
[GLOBAL].use_deprecated_directory_cli_args_semantics = false` in `
This will become the default in Pants 2.14.
Tip: advanced target selection, such as running over changed files
See [Advanced target selection](🔗) for alternative techniques to specify which files/targets to run on.
## Goal options
Many goals also have [options](🔗) to change how they behave. Every option in Pants can be set via an environment variable, config file, and the command line.
To see if a goal has any options, run `
./pants help $goal` or `
./pants help-advanced $goal`. See [Command Line Help](🔗) for more information.
You can then use the option by prefixing it with the goal name:
You can also put the option after the file/target arguments:
As a shorthand, if you put the option after the goal and before the file/target arguments, you can leave off the goal name in the flag: