Skip to main content
Version: 2.23 (prerelease)

dependencies


pants dependencies [args]

List the dependencies of the input files/targets.

Backend: pants.backend.project_info

Config section: [dependencies]

Basic options

closed

--[no-]dependencies-closed
PANTS_DEPENDENCIES_CLOSED
pants.toml
[dependencies]
closed = <bool>
default: False

Include the input targets in the output, along with the dependencies.

format

--dependencies-format=<DependenciesOutputFormat>
PANTS_DEPENDENCIES_FORMAT
pants.toml
[dependencies]
format = <DependenciesOutputFormat>
one of: text, json
default: text

Output format for listing dependencies.

output_file

--dependencies-output-file=<path>
PANTS_DEPENDENCIES_OUTPUT_FILE
pants.toml
[dependencies]
output_file = <path>
default: None

Output the goal's stdout to this file. If unspecified, outputs to stdout.

sep

--dependencies-sep=<separator>
PANTS_DEPENDENCIES_SEP
pants.toml
[dependencies]
sep = <separator>
default: \n

String to use to separate lines in line-oriented output.

transitive

--[no-]dependencies-transitive
PANTS_DEPENDENCIES_TRANSITIVE
pants.toml
[dependencies]
transitive = <bool>
default: False

List all transitive dependencies. If unspecified, list direct dependencies only.

Advanced options

None

Deprecated options

None