██████╗ ██████╗ ███████╗████████╗██████╗ ███████╗███████╗
██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝██╔══██╗██╔════╝██╔════╝
██████╔╝██║ ██║███████╗ ██║ ██████╔╝█████╗ █████╗
██╔══██╗██║ ██║╚════██║ ██║ ██╔══██╗██╔══╝ ██╔══╝
██║ ██║╚██████╔╝███████║ ██║ ██║ ██║███████╗███████╗
╚═╝ ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝
Explore ROS 2 package dependencies from the command line (CLI, TUI, library).
Full demo reel · how the demo was made
Docs: docs/README.md — overview, package discovery, dependency trees, usage, development.
Quick start
pip install rostree
source /opt/ros/<distro>/setup.bash # and/or your workspace install/setup.bash
rostree # interactive TUI
Why it is fast
A ROS dependency graph is a DAG, not a tree: rcutils sits under almost every
branch. Expanding each path separately is exponential — a 159-package workspace
printed 68,081 lines at depth 7, and never finished without a depth limit.
rostree expands each package once, where it first appears, and references it
elsewhere (↩ see above), the way cargo tree does with (*). Package discovery
happens once per run instead of once per node, and manifests are parsed once.
rostree tree nav2_bringup -r |
0.2.2 | 0.3.0 |
|---|---|---|
| depth 6 | 18,273 lines / 4.4 s | 548 lines / 0.02 s |
| depth 7 | 68,081 lines / 17.4 s | 552 lines / 0.02 s |
| no depth limit (the default) | did not finish in 4 min | 552 lines / 0.02 s |
Nothing is hidden: every edge is still shown, once. --full restores the fully
expanded tree if you want it.
CLI commands
rostree # Launch interactive TUI
rostree scan # Scan host for ROS 2 workspaces
rostree list --by-source # List packages grouped by source
rostree list -f nav2 # Filter the package list
rostree tree rclcpp # Dependency tree
rostree tree rclcpp -r -d 3 # Runtime deps only, 3 levels
rostree tree rclcpp --json # Machine-readable
rostree why nav2_bringup rcutils # How did this get into my tree?
rostree rdeps rclcpp # What depends on this package?
rostree check # Cycles + unresolved deps (non-zero exit for CI)
rostree graph rclcpp --render png # PNG via Graphviz
rostree graph rclcpp --render svg --open
rostree graph -w ~/ros2_ws --render png # Whole workspace
rostree graph rclcpp -f mermaid # Mermaid text
TUI
rostree tui # Interactive terminal UI
rostree tui rclcpp # Start on a package's tree
/ filters every package as you type, Enter opens a tree, v flips to
"what depends on this", t switches between runtime and all dependencies, and
? shows the full keymap. Scanning and tree building run off the UI thread, and
rows are created as you expand them, so nothing blocks.
Python API
from rostree import list_known_packages, get_package_info, build_tree, scan_workspaces
from rostree.api import build_graph, reverse_dependencies, tree_stats
packages = list_known_packages()
root = build_tree("rclcpp", runtime_only=True)
print(tree_stats(root)) # nodes, packages, depth, repeats, missing
graph = build_graph("nav2_bringup") # the resolved DAG, linear to build
print(graph.cycles(), sorted(graph.missing))
print(reverse_dependencies("rclcpp")) # who depends on it
Links
- How the system works
- How packages are found (workspaces, AMENT_PREFIX_PATH, COLCON_WORKSPACE)
- Dependency trees (package.xml, the package index, repeat collapsing)
- Usage (CLI, TUI keys, API)
- Development (layout, pre-commit, CI)
- Changelog
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rostree-0.3.0.tar.gz.
File metadata
- Download URL: rostree-0.3.0.tar.gz
- Upload date:
- Size: 39.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1de4f7cf2241646136f12571de3f9076f06dd4d1f4d0143db4a6550eae7831db
|
|
| MD5 |
90931647dcedec6367f51182bd694707
|
|
| BLAKE2b-256 |
74e867d7c411b2adc359bfbe43f781fc3756bae394d37b8f6f23030bbc68a046
|
Provenance
The following attestation bundles were made for rostree-0.3.0.tar.gz:
Publisher:
publish.yml on guilyx/rostree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rostree-0.3.0.tar.gz -
Subject digest:
1de4f7cf2241646136f12571de3f9076f06dd4d1f4d0143db4a6550eae7831db - Sigstore transparency entry: 2407947161
- Sigstore integration time:
-
Permalink:
guilyx/rostree@42c0e8b3d00430addbde9ec0bc2b403de3768c1e -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/guilyx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@42c0e8b3d00430addbde9ec0bc2b403de3768c1e -
Trigger Event:
release
-
Statement type:
File details
Details for the file rostree-0.3.0-py3-none-any.whl.
File metadata
- Download URL: rostree-0.3.0-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fa3a0583d612cd2a1d84a1e7a84eb4cbd21ba9b2d708e4cf8b6c70c31e2ac96
|
|
| MD5 |
403857f3802470b0a39d54bf5adaa15b
|
|
| BLAKE2b-256 |
d269325a105e6eebd083246df4325079edf45abdcb5772c90c0b101215001aac
|
Provenance
The following attestation bundles were made for rostree-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on guilyx/rostree
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rostree-0.3.0-py3-none-any.whl -
Subject digest:
3fa3a0583d612cd2a1d84a1e7a84eb4cbd21ba9b2d708e4cf8b6c70c31e2ac96 - Sigstore transparency entry: 2407947587
- Sigstore integration time:
-
Permalink:
guilyx/rostree@42c0e8b3d00430addbde9ec0bc2b403de3768c1e -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/guilyx
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@42c0e8b3d00430addbde9ec0bc2b403de3768c1e -
Trigger Event:
release
-
Statement type: