package version displayancestry

<!-- prettier-ignore-start -->

Display the ancestry tree for a 2GP managed package version.

Aliases for package version displayancestry

force:package:version:displayancestry

Flags

Flag Name (Long) Flag Name (Short) Description
<code>‑‑api‑version</code> N/A Type: Value<br><br>Override the api version used for api requests made by this command
<code>‑‑dot‑code</code> N/A Type: Boolean<br><br>Display the ancestry tree in DOT code.<br><br>You can use the DOT code output in graph visualization software to create tree visualizations.
<code>‑‑flags‑dir</code> N/A Type: Value<br><br>Import flag values from a directory.
<code>‑‑json</code> N/A Type: Boolean<br><br>Format output as json.
<code>‑‑package</code> <code>‑p</code> Type: Value<br>Required<br><br>ID or alias of the package (starts with 0Ho) or package version (starts with 04t) to display ancestry for.<br><br>If you specify a package ID (starts with 0Ho) or alias, the ancestor tree for every package version associated with the package ID is displayed. If you specify a package version (starts with 04t) or alias, the ancestry tree of the specified package version is displayed.
<code>‑‑target‑dev‑hub</code> <code>‑v</code> Type: Value<br>Required<br><br>Username or alias of the Dev Hub org. Not required if the target-dev-hub configuration variable is already set.
<code>‑‑verbose</code> N/A Type: Boolean<br><br>Display both the package version ID (starts with 04t) and the version number (major.minor.patch.build) in the ancestry tree.

Examples for package version displayancestry

Display the ancestry tree for a package version with the specified alias, using your default Dev Hub org:

sf package version displayancestry --package package_version_alias

Similar to previous example, but display the output in DOT code:

sf package version displayancestry --package package_version_alias --dot-code

Display the ancestry tree for a package with the specified ID, using the Dev Hub org with username devhub@example.com:

sf package version displayancestry --package OHo... --target-dev-hub devhub@example.com

Display the ancestry tree of a package version with the specified ID, using your default Dev Hub org:

sf package version displayancestry --package 04t...
<!-- prettier-ignore-end -->