Skip to main content

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​

CommandPurpose
scanDiscover packages and show workspace health
packagesInspect package metadata and dependencies
nodesList statically detected nodes and endpoints
graphRender dependency, communication, or full graphs
vizGenerate a self-contained interactive HTML graph
auditRun built-in connectivity and isolation checks
validateEnforce a YAML architecture policy
designDesign packages in the browser and generate ament_python code
docsWrite Markdown or HTML architecture documentation
watchRe-run validation or the audit when files change
doctorCheck the installation, workspace layout, and cache

Global options​

OptionPurpose
--version, -vPrint the installed version and exit
--quiet, -qSuppress diagnostic headers and progress output
--helpShow command help

Output formats​

  • scan, packages, nodes, and validate: 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​

CodeMeaning
0Command completed and no configured failure threshold was reached
1audit or validate found results at or above --fail-on
2Invalid invocation or invalid policy configuration
3Workspace 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.