CLI Reference
ROS2 Inspector v0.2.0 ships eleven commands for static workspace discovery, architecture visualization, auditing, policy enforcement, documentation, and visual package design.
Global usage
ros2inspector [OPTIONS] COMMAND [ARGS]...
Commands
| Command | Purpose |
|---|---|
scan | Discover packages and show workspace health |
packages | Inspect package metadata and dependencies |
nodes | List statically detected nodes and endpoints |
graph | Render dependency, communication, or full graphs |
viz | Generate a self-contained interactive HTML graph |
audit | Run built-in connectivity and isolation checks |
validate | Enforce a YAML architecture policy |
design | Design packages in the browser and generate ament_python code |
docs | Write Markdown or HTML architecture documentation |
watch | Re-run validation or the audit when files change |
doctor | Check the installation, workspace layout, and cache |
Global options
| Option | Purpose |
|---|---|
--version, -v | Print the installed version and exit |
--quiet, -q | Suppress diagnostic headers and progress output |
--help | Show command help |
Output formats
scan,packages,nodes, andvalidate: table, JSON, or YAML.audit: table, JSON, YAML, or SARIF for code-scanning tools.graph: Mermaid, GraphViz DOT, or JSON.viz: self-contained HTML.docs: Markdown with Mermaid diagrams, or HTML.doctor: a table, or JSON with--json.
Exit codes
| Code | Meaning |
|---|---|
0 | Command completed and no configured failure threshold was reached |
1 | audit or validate found results at or above --fail-on |
2 | Invalid invocation or invalid policy configuration |
3 | Workspace packages or the requested policy file could not be found |
watch also exits 130 when stopped before its first run finishes, and doctor exits 1 when a check fails. See each command's page for details.