Skip to main content

vulkro-sf role-hierarchy

Prints the role hierarchy from your role metadata as a tree, and marks roles that sit too deep.

vulkro-sf role-hierarchy .
vulkro-sf role-hierarchy . --format mermaid > roles.mmd

It builds the tree from roles/*.role-meta.xml (<parentRole> links). Every role deeper than the role-depth threshold is marked BLOAT: exactly the roles the sf-access-role-depth check flags. Output is sorted, so two runs over the same source are byte-identical, which suits a diff or a committed file.

It is informational and reports no findings. Managed-package roles and role assignments that exist only in the live org are not in static metadata, so they do not appear. No org connection is needed.

FlagWhat it does
[PATH]SFDX project or retrieved metadata. Default ..
--format <tree|json|mermaid>tree (indented text), json (nodes and edges) or mermaid (flowchart TD). Default tree.

Exit codes​

CodeMeaning
0Rendered (also when the project has no roles).
2Error (unscannable path, unknown --format).

Command reference​

Generated from vulkro-sf role-hierarchy --help (vulkro-sf 0.33.0). Run scripts/gen-docs.sh in the product repository to refresh it; do not edit this section by hand.

Print the org's role hierarchy as a tree.

vulkro-sf role-hierarchy [OPTIONS] [PATH]

Arguments​

ArgumentDescription
[PATH]Path to the SFDX project or retrieved metadata (defaults to the current directory) Default: ..

Options​

FlagDescription
-f, --format <FORMAT>Output format: tree, json, or mermaid. Default: tree.
-v, --verbose...Bump stderr log verbosity. -v enables debug-level tracing for the vulkro + vulkro_sf targets; -vv enables trace. Honoured only when RUST_LOG is unset (an explicit RUST_LOG always wins)
-q, --quietPrint only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged.
--no-colorTurn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb.
-h, --helpPrint help (see a summary with '-h')
Full vulkro-sf role-hierarchy --help
Print the org's role hierarchy as a tree.

Render the org's ROLE HIERARCHY as a deterministic tree .

Builds the role tree from `roles/*.role-meta.xml` (`<parentRole>` links), computes each role's depth with the same parent-chain walk the `sf-access-role-depth` detector uses, and annotates every role that sits deeper than the role-depth threshold as BLOAT (exactly the roles that detector flags). Output is sorted, so two runs over the same source produce byte-identical output suitable for a diff or a committed artefact.

Output formats: `tree` (indented ASCII tree, default), `json` (nodes + edges envelope), or `mermaid` (`flowchart TD`, paste into a Mermaid renderer). The render is informational: it is a visualization surface and emits no findings. Managed-package roles and live-org-only role assignments are not visible in static metadata.

Exit codes: 0 = rendered (including an empty project with no roles); 2 = error (unscannable path, unknown --format).

Usage: vulkro-sf role-hierarchy [OPTIONS] [PATH]

Arguments:
[PATH]
Path to the SFDX project or retrieved metadata (defaults to the current directory)

[default: .]

Options:
-f, --format <FORMAT>
Output format: tree, json, or mermaid

[default: tree]

-v, --verbose...
Bump stderr log verbosity. `-v` enables debug-level tracing for the `vulkro` + `vulkro_sf` targets; `-vv` enables trace. Honoured only when `RUST_LOG` is unset (an explicit `RUST_LOG` always wins)

-q, --quiet
Print only warnings and errors on stderr: no progress, tips or next-step hints. Results on stdout and exit codes are unchanged

--no-color
Turn off coloured output. Colour is also off when NO_COLOR is set to a non-empty value or TERM=dumb

-h, --help
Print help (see a summary with '-h')