nros CLI reference
Reference · Level 2: Building real applications
The help of every user-tier nros command, exactly as the CLI prints it:
nros --help, then each verb in the groups nros --help lists, then each
subcommand a verb lists. The page is generated from the CLI’s own help, so
it reads the same as nros <command> --help on the release it documents.
nros help --all adds the build-system tier, which is not part of this page,
and the extension commands your workspace’s packages provide.
Where each verb is explained
| Command | Page |
|---|---|
nros setup | Install |
nros setup, pin | Install options, pinning, working offline |
nros new | Run a talker on an emulated board |
nros build, list | Organize a larger workspace |
nros configure, config | Configure an image |
nros run, flash, monitor, bench | Deploy to production |
nros interface | Message generation |
nros doctor | Troubleshoot |
nros locate | Build inside an existing CMake or vendor tree |
nros toolchain | Move a ROS 2 project over |
nros
nros — command-line tool for nano-ros (a lightweight ROS 2 client for embedded RTOS).
Quick start:
nros setup <board> provision a board's toolchains + sources (board-scoped)
nros new <name> scaffold a project
nros configure generate msg bindings, models and build settings
nros plan resolve a launch topology
nros check check a package, a plan or a workspace
nros doctor check SDK paths / toolchains / env
Run `nros setup --list` to see available packages, and `nros help --all` for the build-system tier as well.
Usage: nros [OPTIONS] [COMMAND]
Start:
new Scaffold a new nano-ros package (`--template`: talker, listener, server, client, action-server, action-client), workspace, image or component
template List the node roles `nros new --template` scaffolds, or show one
setup Resolve + fetch a board's toolchain/SDK packages
Build:
build Build a nano-ros workspace
configure Configure a project: generate message bindings and the cargo patch config, then resolve and generate every image's build inputs
fix Apply the mechanical remedies the build's refusals name; prints the change, and writes it with --apply
clean Remove the generated bindings and the managed patch block from each Rust package. Leaves user-written sections alone
materialize Take ownership of a generated entry package
Run on a target:
run Run an image on its target: a host process or an emulator. Builds it if stale, starts the router it needs, streams its console and stops everything on exit. `--expect` grades the console; `--dry-run [--why]` prints the resolved plan instead. A hardware image is `nros flash --monitor`
flash Flash an image onto a real board: builds it if stale, runs the board's human steps, flashes, and with `--monitor` watches the console on the same port. `--expect` grades it; `--dry-run [--why]` prints the plan instead
monitor Attach to a running board's console: `--expect` grades it, `--send` writes to it. In a workspace the image's board states the port and baud; elsewhere `--port` names the device
bench This machine's boards: `scan` records which attached USB device is which board in `$NROS_HOME/bench.toml`, `list` prints it with what is attached now. It supplies ports and probes, never test scope
debug Debug an image on its target (reserved: not available yet)
Workspace:
list List the workspace's packages: kind, name and directory per row
image List the workspace's images, or show one: what it declares and what the build resolves for it
graph Print the workspace's packages in dependency order, each with the workspace packages it depends on
Interfaces:
interface Generate message bindings, list the interfaces the workspace can reach, or show one interface's definition
Inspect:
doctor Health-check the workspace (SDK paths, toolchains, env)
board Inspect supported boards
platform List the platforms boards build on, or show one: its boards and capabilities
rmw List the RMW backends, or show one: its host side and its boards
runner List the runners and extension commands this workspace reaches, or show one
knob List the knobs a project can state, or show one: where to state it, the values it takes and its default
code List the diagnostic codes a refusal prints, or show one: what it reports and how to fix it
config Inspect or validate the current project's resolved configuration
plan Resolve launch files, manifests, and metadata into nros-plan.json
check Check a runner, command or board package, a plan, a system.toml or a workspace
explain Explain a diagnostic code, or render a generated nros-plan.json
Toolchain:
toolchain List, remove and garbage-collect installed toolchains and SDK packages
pin Report this project's `nros-toolchain.toml`, or move it
update Move one pin, leaving one diff to review
locate Print where a resource is, and with `--why`, which rung answered
Other:
version Print toolchain + library versions
completions Generate shell completions (bash | zsh | fish | powershell)
help Print this message or the help of the given subcommand(s)
Options:
--codegen-version
Print the codegen version this binary emits, and exit.
The compatibility token between this binary's emitted code and the nano-ros runtime that compiles it — deliberately not a release version. A codegen-version refusal asks you to compare this number against the runtime's accepted range.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
Start
nros new
Scaffold a new nano-ros package (`--template`: talker, listener, server, client, action-server, action-client), workspace, image or component
Usage: nros new [OPTIONS] [NAME] [SYSTEM_NAME]
Arguments:
[NAME]
Project directory to create, or a mode keyword.
The literal keyword `system` enters bringup-scaffold mode: `nros new system <name>_bringup --components <pkg1,pkg2,...>`.
[SYSTEM_NAME]
The bringup package directory, or the package name in a package-scaffold mode.
The bringup directory when the first positional is the literal `system`; the <name> when it is the literal `platform` or `board`.
Options:
--for-platform <FOR_PLATFORM>
The platform a `nros new board <name>` targets.
A platform directory name, e.g. `zephyr`, `bare-metal`, or one scaffolded via `nros new platform`.
--inherits <INHERITS>
The built-in platform family a `nros new platform <name>` builds as, written as its `nros-platform.toml` `inherits` (e.g. `bare-metal`, `freertos`).
A board naming the platform builds as the first built-in platform this chain reaches. Without it the line is written commented out, and a board naming the platform is refused until it is set.
--components <COMPONENTS>
Comma-separated component package names for `nros new system <bringup> --components <list>`
--component-name <COMPONENT_NAME>
One component package name; repeatable.
An alternative to `--components <a,b,c>` when commas in the shell are awkward. Merged with `--components`.
--workspace-root <WORKSPACE_ROOT>
Workspace root holding the cargo `Cargo.toml` to update.
Defaults to the parent of the bringup dir.
--into <INTO>
Parent dir under which the bringup package is created.
Defaults to the current working directory.
--no-config
Skip the optional `config/` sub-dir
--no-readme
Skip the optional `README.md`
--platform <PLATFORM>
Target platform. In project mode give this or `--board`.
`--board` alone reads the platform from the board. `linux` is the host board. `esp32` is not offered: ESP32 support is dormant.
[possible values: linux, freertos, nuttx, threadx, zephyr, baremetal]
--rmw <RMW>
RMW backend, as `nros rmw list` names it. Defaults per mode: `zenoh` for project/component scaffolds (matches the tracked examples), `cyclonedds` for `--workspace` (needs no router — the quick-start default)
--ros-edition <ROS_EDITION>
ROS edition (drives the `ros-<edition>` cargo feature). Defaults to the sourced ROS 2 (`$ROS_DISTRO`) when it is one of these, else humble
[possible values: humble, iron, jazzy]
--lang <LANG>
Source language. Defaults per mode: `rust` for project/component scaffolds, `cpp` for `--workspace` (the quick-start language)
[possible values: rust, c, cpp]
--template <TEMPLATE>
The node the package holds: a talker (std_msgs/String on /chatter), a listener, an AddTwoInts `server` / `client`, or a Fibonacci `action-server` / `action-client` — the roles of the ROS demos, under the demos' own interfaces. Default: `talker`
[possible values: talker, listener, server, client, action-server, action-client]
--node-name <NODE_NAME>
The node's ROS name (as `ros2 pkg create --node-name`). Default: the package name (`-` spelled `_`); for `--component`, the role's demo node name (`talker`, `add_two_ints_server`, …)
--dependencies <DEPENDENCIES>...
Extra `<depend>` packages for package.xml, after the template's own interface package (as `ros2 pkg create --dependencies`). Space- or comma-separated
--license <LICENSE>
package.xml `<license>` (as `ros2 pkg create --license`). Default: `Apache-2.0`
--description <DESCRIPTION>
package.xml `<description>` (as `ros2 pkg create --description`)
--maintainer-name <MAINTAINER_NAME>
package.xml maintainer name (as `ros2 pkg create --maintainer-name`). Default: `git config user.name`
--maintainer-email <MAINTAINER_EMAIL>
package.xml maintainer email (as `ros2 pkg create --maintainer-email`). Default: `git config user.email`
--destination-directory <DESTINATION_DIRECTORY>
Directory to create the package in (as `ros2 pkg create --destination-directory`). Default: the current directory
--component
Scaffold a planned-mode component instead of a direct-mode binary project.
A component is a reusable library node with an `nros::Component` and a folded `[component]` `nros.toml`. It is platform-agnostic (platform and RMW are chosen at deploy time), so `--platform` is not needed.
--image <IMAGE>
Scaffold an `[image.<name>]` — a buildable image — into the bringup package's `system.toml` instead of a project
--host <HOST>
Scaffold a `[host.<name>]` — a machine nodes run on — into the bringup package's `system.toml`
--deploy <DEPLOY>
Deprecated: use `--image` or `--host`.
`[deploy.*]` split into `[image.*]` (what is built) and `[host.*]` (where it runs). Still accepted, and dispatched by `--kind`: `self` scaffolds a host, anything else an image.
--workspace
Scaffold a minimal multi-node workspace instead of a standalone project.
The workspace holds node packages, a bringup and an entry: the canonical copy-out template with the RMW choice baked into every file that spells it. Defaults: `--lang cpp --rmw cyclonedds`.
--from <PACKAGE>
With `--workspace`: grow this single package into a workspace.
Takes a package made by `nros new <name> --board <board>`. Its node moves to `<name>/src/<package>/` unchanged, and its `system.toml` moves to the bringup `<name>/src/<package>_bringup/`. `nros new node <name>` inside the workspace then adds a second node.
--kind <KIND>
`runner` or `command`: scaffold a runner or command package.
The package holds its `package.xml`, its descriptor and a stub on `nros-extension` (`--lang rust`, the default) or a CMake executable that speaks the protocol JSON itself (`--lang cpp`). Inside a workspace it lands in `src/<name>/`. Check it with `nros check <name>`.
--target <TARGET>
Deprecated: accepted and ignored.
The rustc triple comes from the board descriptor, so an image carries none.
--board <BOARD>
The board the new workspace's bringup image runs on (`nros new <name> --board <board>`: the platform is the board's), or the board an `--image` is built for. With `--platform` instead, a project defaults to the platform's own board from the board catalog (`freertos` -> `mps2-an385-freertos`) and refuses, naming the candidates, when the platform has several (`threadx`)
--bringup <BRINGUP>
Deploy mode: pick the bringup package whose `system.toml` to edit when the workspace exposes more than one
--to <BRINGUP>
Inside a workspace: the bringup that runs the new node package.
`nros new <node> --to <bringup>` adds the package under `src/`, a `[[component]]` row for it in the bringup's `system.toml` and an `<exec_depend>` in its `package.xml`. Without `--to` no bringup is touched.
--from-launch <FROM_LAUNCH>
Deploy mode: also set the bringup `[system].default_launch` (bootstrap)
--from-profile <FROM_PROFILE>
Fork an existing block of the same table (`[image.<name>]` with `--image`, `[host.<name>]` with `--host`)
--force
Overwrite an existing directory / `[image.<name>]` or `[host.<name>]` table
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros template
List the node roles `nros new --template` scaffolds, or show one
Usage: nros template <COMMAND>
Commands:
list List the node roles `nros new --template` scaffolds
show Show one role: what it does, its interface and its languages
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros template list
List the node roles `nros new --template` scaffolds
Usage: nros template list [OPTIONS]
Options:
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros template show
Show one role: what it does, its interface and its languages
Usage: nros template show [OPTIONS] <ROLE>
Arguments:
<ROLE> The role, as `nros new --template` takes it (`talker`)
Options:
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros setup
Resolve + fetch a board's toolchain/SDK packages
Usage: nros setup [OPTIONS] [BOARD]
nros setup <COMMAND>
Commands:
board Provision a downstream Zephyr consumer's tree for a nano-ros board
presets Write a project `CMakePresets.json` that includes the per-board presets `nros setup <board>` wrote. Then `cmake --preset <board>` works
help Print this message or the help of the given subcommand(s)
Arguments:
[BOARD]
Board to set up (resolves its toolchain/SDK package set from the index `[board.*]` table)
Options:
--list
List every package in the index + its version
--licenses
Show the license-gated packages + how to install them
--offline-dirs
Print the directories an air-gapped copy of this host's setup needs, one per line: the nros store, then the rustup and cargo homes the builds use (nros leaves Rust in rustup's own homes). Feed it to `tar`
--tool <NAME>
Install tools by name (instead of a board's whole set), e.g. `--tool qemu`. Repeatable, like `--source`: `--tool ninja --tool make` is ONE plan — one system-package ask for the union, one lock write. The `just <module> setup` recipes call this
--by-need
With `--tool`: install each named tool as its own plan, and let its index row's `need` decide what a failure means -- a `required` tool fails the run, an `opt-in` one prints a warning and the rest go on. What `just workspace cargo-tools` runs, so the recipe never states a tool's need a second time
--source <SOURCES>
Provision a single `[source.*]` package by name from the index.
E.g. `--source freertos-kernel`. Repeatable. The index is the SSOT — `dest`/`ref`/`submodule` come from data, never a hardcoded path. The `just <module> setup` recipes call this instead of inlining `git submodule update <path>`.
--build-sources
Provision the whole build-stage source union the repo's tests need.
That is what `just test` / `build-test-fixtures` need (every RMW's `-sys` source + the platform sources the workspace graph path-deps), independent of the per-board `nros setup <board>` slice. The index's top-level `build_sources` is the SSOT. With `--check`, only VERIFY they are present and name `nros setup --source <name>` per missing — the preflight the two recipes run.
--prefix <PREFIX>
Install prefix override (only with `--tool`): place the tool here instead of the shared store, e.g. `--prefix build/qemu` so the test harness finds it where it already looks. Layout is identical (`<prefix>/bin/…`)
--index <INDEX>
Path to the SDK index
[default: nros-sdk-index.toml]
--rmw <RMW>
RMW backend whose host daemon/tool to also provision.
Orthogonal to the board: `zenoh` | `xrce` | `cyclonedds`. Defaults to `zenoh`. Resolves `board.packages ∪ rmw.packages`.
--dry-run
Resolve + print the plan without fetching/building anything
--full
Provision full git history instead of the per-source shallow default (`--depth 1`). Use when you want `git log` / `blame` / branching in a provisioned source or submodule. Overrides the index `shallow` for this invocation only — no shared-file edit. (An already-shallow checkout is deepened in place with `git -C <path> fetch --unshallow`.)
--shallow
Force shallow (`--depth 1`) even for sources that set `shallow = false` in the index. The inverse of `--full`
--system
Print the native install command for the `[system.*]` OS packages.
Resolves the `[system.*]` OS-package closure for the detected package manager and prints the one native install command (never runs it without `--sudo`). With `--check`, run each entry's presence probe instead and exit non-zero if anything is missing (the doctor surface).
--workspace [<PATH>]
Provision from what this workspace declares.
Reads every `package.xml` under the path and answers three questions the tree already states: what the code depends on (`<depend>`), which builder must exist (`<build_type>` / `<buildtool_depend>`), and where it deploys (the `[image.<id>] board` of the `system.toml` beside a package.xml).
Prints the plan, then installs it: every image's board and RMW in one store plan, then the OS-package closure — installed with `--sudo`, otherwise printed as the command to run. `--check` stops after the plan. Plain `nros setup` inside a workspace means `--workspace .`.
--role <ROLE>
Narrow `--system` to keys of these roles (repeatable).
A scope's setup wants the HOST facts — `package` and `workspace` roles — and not `infra`: reporting every cross toolchain and emulator to someone provisioning `native` is noise, and noise is how a real missing package gets scrolled past.
--check
Run presence probes and report present/missing/unknown instead of installing/printing; exits 1 when anything is missing. With `--system`, probes only the `[system.*]` class; alone, walks EVERY declared class — `[system.*]`, `[rust.*]`, `[python.*]` — printing a remedy computed from each entry
--sudo
Execute the composed native install command instead of printing it.
With `--system`, runs the native install command (which invokes sudo where the manager needs it). With `--tool`, a tool declaring its own `[tool.<name>] system = [..]` build deps installs them instead of printing a line to copy. With `<board>` and `--workspace`, the board plan's one system ask (its tools' and `[source.*]`s' `system = [..]`) is installed before any download. Any other use is refused.
-j, --jobs <N>
How many packages to install at once.
Default: this host's CPU count; `NROS_SETUP_JOBS` overrides the default, and this overrides both.
Expect less than N times faster: the link saturates long before the cores do, and a tool built from source already uses the whole machine, so source builds run one at a time and the overlap that pays is one package's build or unpack beside another's download. Output stays per package and in plan order whatever the value.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros setup board
Provision a downstream Zephyr consumer's tree for a nano-ros board.
Fetches the board's RMW source, applies the zephyr-line patch set, adds the rust targets, and checks the `zephyr-lang-rust` pin — driven by the board's provisioning contract (`board.cmake` / `[package.metadata.nros.board]`).
Usage: nros setup board [OPTIONS] --zephyr-workspace <ZEPHYR_WORKSPACE> <NAME>
Arguments:
<NAME>
Board crate suffix (after `nros-board-`), e.g. `fvp-aemv8r-smp`
Options:
--zephyr-workspace <ZEPHYR_WORKSPACE>
The downstream consumer's Zephyr workspace dir (the tree containing `zephyr/` + `modules/lang/rust/`). The patch set is applied here
--workspace <WORKSPACE>
nano-ros SDK root (where the board crate, `scripts/zephyr/`, and `nros-sdk-index.toml` live). Default: `$NROS_WORKSPACE_ROOT`, a checkout enclosing cwd, then this `nros` binary's own SDK root
--index <INDEX>
Path to the SDK index (relative paths resolve against the nano-ros workspace root). The RMW source's `dest` is index-driven
[default: nros-sdk-index.toml]
--dry-run
Resolve + print the provisioning plan without fetching/patching
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros setup presets
Write a project `CMakePresets.json` that includes the per-board presets `nros setup <board>` wrote. Then `cmake --preset <board>` works
Usage: nros setup presets [DIR]
Arguments:
[DIR] Project directory to write `CMakePresets.json` into (default: current dir) [default: .]
Options:
-h, --help Print help
-V, --version Print version
Build
nros build
Build a nano-ros workspace.
Discovers packages, resolves the image, runs preflight, generates the root, and hands off to the native tool. The final stage is an `exec`, so compiler diagnostics are byte-identical to running cargo/cmake/west directly.
Usage: nros build [OPTIONS] [IMAGES]... [-- <NATIVE_ARGS>...]
Arguments:
[IMAGES]...
Image(s) to build — `linux`, or `<bringup>:linux` when two bringups declare the same id. Empty uses `[system] default_images`
[NATIVE_ARGS]...
Arguments after `--` go to the native tool verbatim
Options:
--workspace <WORKSPACE>
Workspace root. Defaults to the current directory
--nano-ros-path <NANO_ROS_PATH>
nano-ros SDK root holding `packages/boards`. Defaults to a walk-up from the workspace, then this `nros` binary's own SDK root
--zephyr-workspace <DIR>
The west workspace holding Zephyr — the directory that contains `zephyr/`. Zephyr images only.
The explicit rung of the resolution ladder, above `$ZEPHYR_BASE`, `$NROS_ZEPHYR_WORKSPACE`, the west workspace the project sits in (a `.west/` at or above it whose manifest names `zephyr`) and the store's workspace. An environment variable is ambient state that a user has to remember to set and cannot see in the command they ran; this makes the same fact reviewable in a script and in shell history.
Pointing it at the `zephyr/` directory itself also works — that is the commonest way to get this wrong, and both spellings name one place.
--all
Build every declared image
--board <BOARD>
Build the image whose `[image.*] board` is this board.
Matches the authored word (any case), any alias of the same board descriptor, or the `nros setup` index key the board provisions through (`nros build --board mps2-an385-baremetal` finds a `baremetal` image). One match builds exactly that image, as if it were named; several or none is refused, listing them — the image id stays the unit. Not with image arguments or `--all`.
--dry-run
Print the stages and the command that would run, then stop.
Safe by construction: a `Handoff` performs no I/O until `exec`. It still GENERATES (stage 4 writes each image's generated files), which regenerates an application without building it.
-v, --verbose
Also print the explanation behind each configure note.
That is: why a pass re-runs, why a size was not derived. Sets `NROS_VERBOSE=1` for every native command; a correct build without it prints one line per fact.
--explain-sizing
Print, in full, every sizing input the image leaves to a default.
A build prints them as one summary line; this names each one, why it was not derived, and what declaring it would take. `NROS_EXPLAIN_SIZING=1` asks the same of any road (a cmake or west configure).
--offline
Do not fetch anything; fail naming what is missing.
Note this is a SCOPED guarantee: stages 1–4 touch no network, and stage 5 gets the native tool's own offline spelling. It cannot promise an arbitrary user `CMakeLists.txt` refrains from fetching.
--packages-select <PKG>...
Only these packages — no dependencies, no dependents.
colcon's flag, with two differences: a name matching no package is an error, not a warning, and a selection that leaves out a package a selected one depends on is refused, since there is no install prefix for it to come from. That holds for every selection flag.
--packages-up-to <PKG>...
These packages and everything they depend on, transitively.
The selection flags compose as an INTERSECTION, which is colcon's composition too: each deselects independently, so adding one can only ever narrow the set.
--packages-above <PKG>...
These packages and everything that depends on them, transitively.
A package here that depends on a workspace package left out is refused, as for every selection flag; add `--packages-up-to` for its dependencies. A cargo member with no `package.xml` is refused here: its dependents name it only in their `Cargo.toml`, which the selection does not read.
--packages-skip <PKG>...
Leave these packages out
--base-paths <PATH>...
The workspace's source roots, relative to the workspace (default: `.`, plus `nros.toml` `package_paths`).
They replace the workspace and its `package_paths`, and nothing else: the nano-ros packages and `NROS_PACKAGE_PATH` stay on the search path. As in colcon, the roots are peers searched recursively, their order does not matter, a path repeated or inside another counts once, and a package name found in two of them is an error. A path that does not exist is an error; one that holds no package is a warning.
--continue-on-error
Keep building the other packages when one fails.
A package that depends on a failed one is skipped, as with colcon, and the command still exits non-zero, with the first failure's status. In a workspace with images, the unit is the image: each image is one merged build, so a failure inside it fails the whole image, and the next image is still attempted.
--cmake-args=<ARGS>
Arguments for every CMake configure: a cmake image's, a west image's, and a cmake package's. A cargo image runs no CMake configure and ignores them.
The `=` is required. The value is split with plain POSIX quoting (no expansion), so one flag can carry many arguments: `--cmake-args="-DA=1 -DB='x y'"`. The flag is repeatable, and the values add up in order. `--cmake-args=@<file>` reads one argument per line, with `#` comments. Allowed: `-D`, `-U`, `-W*`, `--log-level`, `--log-context`, `--debug-find`. A name `nros build` passes itself, or `-DCONFIG_*` (Zephyr Kconfig, which goes in the image's `conf`), is refused, saying where the setting goes. An image states its own in `[image.<id>.build] cmake_args`; these come after them.
--cargo-args=<ARGS>
Arguments for every cargo command of a cargo image. A CMake or west image ignores them.
Split and repeated like `--cmake-args=`, and `@<file>` works too. Allowed: `--features`, `--no-default-features`, `--all-features`, `-v`, `-q`, `--timings`, `--locked`, `--offline`, `--frozen`. In a workspace, name a feature with its package (`--features=<pkg>/<feat>`). A feature the build chooses itself (the RMW, the platform, a board or capability feature) is refused: choose those in `system.toml`.
--profile=<NAME>
Build with this profile instead of the image's `profile`.
It takes exactly what `[image.<id>] profile` takes: a cargo profile (`dev`, `release`, …) or a CMake build type (`Debug`, `Release`, …). It is a command-line spelling of that key for one build, not a new kind of profile.
-j, --jobs <N>
Run at most N jobs at once, in total. Default: the number of CPUs.
Every tool below `nros build` (cargo, make, ninja, west's cmake) shares one GNU make jobserver of N tokens, so packages compiling side by side still run N jobs in total, not N each. A package starts once every package it depends on has finished; images build one at a time, each drawing on the same N. Under a `make -jN` that already provides a jobserver, `nros build` joins it instead. Ninja older than 1.13 does not read a jobserver and runs at its own width; a warning names it.
--build-base <DIR>
Where each package's build directory goes: `<DIR>/<package>/`. Default: `build`, under the workspace.
Only for a workspace with no bringup. An image's generated tree has a fixed place under `build/`, which the cmake module and the image's other readers all expect, so moving it for one build would split them; it is refused there.
--check[=<TOOL>]
Type-check the image instead of building it: `cargo check`, or `cargo clippy` with `--check=clippy`.
Everything before the cargo command is the same as a build — the generated message crates, the `<pkg>_nros_selection` crate, the image's settings file and its lock — because none of it is optional for a check either: a leaf whose manifest names the selection crate cannot even be LOADED until sync has written it, so a bare `cargo check` in a fresh checkout fails at manifest parse with an error that never says why. Only the final verb changes, so a check here and a build here see one dependency graph.
Cargo images only; a cmake or west image is refused, since neither tool has a check that is not a build.
Possible values:
- check: `cargo check`
- clippy: `cargo clippy`. Lint flags go after a second `--`: `nros build --check=clippy -- -- -D warnings`
--allow-overriding <NAME>...
Let a package replace another provider of this name, for this build only.
colcon's flag. A replacement of the nano-ros provider nobody declared is refused for a runner or a command, and the same name in two source trees (the workspace and a `package_paths` entry) is refused for every kind; with this flag the later root wins. To make a choice permanent, add `<name> = "<package path>"` under `[workspace.overrides]` in `nros.toml` instead.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros configure
Configure a project: generate message bindings and the cargo patch config, then resolve and generate every image's build inputs.
The message bindings and patch config, then the stages `nros build` runs before it builds (discover, preflight, census, resolve, generate), under a per-project lock. Runs no target build tool. Records a stamp per image, so a rerun with nothing changed is a no-op. An image this host cannot build is skipped unless named.
Usage: nros configure [OPTIONS] [WORKSPACE]
Arguments:
[WORKSPACE]
Workspace root (the dir containing `src/`). Defaults to cwd
Options:
--generated-base <DIR>
Output dir for the generated message crates, relative to the workspace. Models and other sync output stay under `build/`
[default: generated]
--ros-edition <ROS_EDITION>
ROS 2 edition (`humble` | `iron` | `jazzy`).
When omitted, inherits `[system].ros_edition` from a `system.toml` at the workspace root, else `humble`.
--image <ID>
Single-package leaf only: sync for this `[image.<id>]`.
Covers its selection package, its `build/<id>/nros-cargo.toml`, and message codegen for its ROS edition. A leaf may declare one image per RMW and edition; without this flag the leaf's own rule applies (one image, or `[system] default_images`).
--dry-run
Don't write — just print what would happen
--check
Exit non-zero if any patch block is missing or stale (CI hook; also used by `nros ws status`)
-v, --verbose
Verbose codegen output
--nano-ros-root <DIR>
nano-ros source tree to scan as the FIRST provider search root.
The same root every provider lookup reads, so the provider index this writes is the one later commands read.
--base-paths <PATH>...
The workspace's source roots, relative to the workspace (default: `.`, plus `nros.toml` `package_paths`).
They replace the workspace and its `package_paths`, and nothing else: the nano-ros packages and `NROS_PACKAGE_PATH` stay on the search path. As in colcon, the roots are peers searched recursively, their order does not matter, a path repeated or inside another counts once, and a package name found in two of them is an error. A path that does not exist is an error; one that holds no package is a warning.
--no-provider-index
Skip the provider index entirely (`<ws>/build/nros/providers.json`).
The index is a CACHE for later commands, not an input to this sync, so a caller that will not read it can skip the scan outright. Same shape as `--no-metadata` above: name the expensive optional step and let the caller decline it.
--model-dir <MODEL_DIR>
Write resolved SystemModels here instead of into each bringup's `config/`.
This makes them build output rather than committed source. Consumers find them through the same search order (`nros_orchestration_ir::model_location`): export `NROS_MODEL_DIR` to the same path for the build.
--no-metadata
Skip the source-metadata refresh.
The refresh compiles a host probe per Node pkg, which is the slow part of a cold sync; skipping it leaves any existing sidecars untouched and makes bakes fall back to the SystemModel's entity lower bound.
--nano-ros-path <NANO_ROS_PATH>
The nano-ros SDK root the probes and board lookups read.
Defaults to a walk-up from the workspace, then this `nros` binary's own SDK root. It adds nothing to the patch block: the canonical shape carries nros-* runtime crates as path-deps in the user's own `[dependencies]`, so duplicating them there triggers cargo's "patch unused" warnings.
--offline
Never touch the network. Passed to the `cargo update --workspace` that prunes a single-package leaf's freshly seeded `Cargo.lock`, the one step of a sync that resolves crates
--force
Configure even when every image's stamp is current
--census [<BRINGUP:IMAGE>]
Take the entity census first: build the native image generated from the same launch file, run it, and record what it registers. Every image this configure covers, or only `BRINGUP:IMAGE`: the image whose build checks the census, usually a cross image, as in `nros build BRINGUP:IMAGE`. A plain configure only reports a census that is missing or stale, because taking one builds and runs a program
--migrate
Apply the known, reversible migrations first, printing every file moved and every key rewritten: a `system.toml` beside a package's code moves into a bringup package, and the project's contracts (`*.contract.yaml`) and `system.toml` files are rewritten from spellings the contract checker no longer reads to the current ones. A rewrite changes only the renamed keys; comments and layout stay. With an installed SDK, the project's `nros-sdk.lock` also accepts this release's pin for each vendored source and host tool it pinned differently, as `nros update --source` / `--tool` would
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros fix
Apply the mechanical remedies the build's refusals name; prints the change, and writes it with --apply
Usage: nros fix [OPTIONS] [PATH]
Arguments:
[PATH] The workspace (default: the current directory)
Options:
--apply Write the change; without it, only the diff prints
-h, --help Print help
-V, --version Print version
nros clean
Remove the generated bindings and the managed patch block from each Rust package. Leaves user-written sections alone
Usage: nros clean [OPTIONS] [WORKSPACE]
Arguments:
[WORKSPACE]
Options:
--build-dir <BUILD_DIR> [default: generated]
--dry-run Don't write — just print what would be removed
-h, --help Print help
-V, --version Print version
nros materialize
Take ownership of a generated entry package.
The last resort: `panic` and `profile` are declarations on the image and need no materialising. One way — `nros build` stops regenerating it.
Usage: nros materialize [OPTIONS] <IMAGE>
Arguments:
<IMAGE>
Image whose entry to materialise — `linux`, or `<bringup>:linux`
Options:
--workspace <WORKSPACE>
Workspace root. Defaults to the current directory
--nano-ros-path <NANO_ROS_PATH>
nano-ros checkout holding `packages/boards`
--force
Overwrite an entry that was already materialised.
Off by default: the whole point is that the builder stops touching it, and so should this verb. A second `materialize` without `--force` would otherwise silently discard the edits the first one existed to enable.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
Run on a target
nros run
Run an image on its target: a host process or an emulator. Builds it if stale, starts the router it needs, streams its console and stops everything on exit. `--expect` grades the console; `--dry-run [--why]` prints the resolved plan instead. A hardware image is `nros flash --monitor`
Usage: nros run [OPTIONS] [IMAGE] [-- <PASSTHROUGH>...]
Arguments:
[IMAGE]
The image to run (`<image>` or `<bringup>:<image>`), as `nros build` names it. Omitted: the workspace's one image
[PASSTHROUGH]...
Arguments for the target, after `--`
Options:
--workspace <WORKSPACE>
Workspace root (auto-detected from cwd if omitted)
--nano-ros-path <NANO_ROS_PATH>
nano-ros checkout (auto-detected if omitted)
--dry-run
Print the resolved plan and run nothing
--why
Add the ladder rung that supplied each field
-v, --verbose
Also print the build's detail: the notes a correct build keeps quiet (as `nros build -v`)
--port <PORT>
The console device
--json
Print the plan as the JSON a runner is handed (`--plan`), not TOML
--exec <NAME>
The program to run, when the image's entry builds several, as in `ros2 run <pkg> <exe>`. Omitted: the one the bringup's launch file names for the entry package, or the entry's only program
--zephyr-workspace <DIR>
The Zephyr workspace the implicit `nros build` of a stale image uses, as `nros build --zephyr-workspace` takes it (and resolves it: the flag, then `$NROS_ZEPHYR_WORKSPACE`, then the project's and the store's)
--expect <TEXT>
Stop with exit 0 as soon as a console line contains TEXT; exit 1 if the target ends, or `--timeout` passes, first. Given more than once, every TEXT must appear, each on some line and in any order, and the run stops on the line that completes the set
--expect-regex <REGEX>
As `--expect`, with a regular expression over one console line. It may be repeated, and mixed with `--expect`: every pattern must match
--forbid <TEXT>
Fail with exit 1 as soon as a console line contains TEXT, before or after the expectation is met (a crash after the success line). Repeatable: any one of them fails the run
--forbid-regex <REGEX>
As `--forbid`, with a regular expression over one console line. Repeatable, and mixed with `--forbid`
--settle <SECONDS>
Once the expectation is met, keep watching for SECONDS before stopping with exit 0: a `--forbid` line or a failing exit inside the window still fails the run, and `console.log` holds the rest of the output. `--timeout` bounds the time to the match only, so the run can take up to `--timeout` + `--settle`
--timeout <SECONDS>
Stop the target after SECONDS
--router <auto|none|LOCATOR>
What serves the image's link on this host: `auto` starts the zenoh router or the XRCE agent when the link needs one here (reusing a zenoh router already listening there), `none` starts nothing, a locator names a router that is already running
[default: auto]
--prefix <CMD>
Run a host image under this command (`--prefix 'valgrind -q'`)
--plan <FILE>
Execute this plan file as written: resolve nothing, build nothing
--allow-overriding <NAME>...
Let a workspace package replace the nano-ros runner of this name, for this run only. A replacement nobody declared is refused; to make it permanent, add `[overrides] <name> = "<package path>"` to `system.toml` instead
--base-paths <PATH>...
The workspace's source roots, relative to the workspace (default: `.`, plus `nros.toml` `package_paths`).
They replace the workspace and its `package_paths`, and nothing else: the nano-ros packages and `NROS_PACKAGE_PATH` stay on the search path. As in colcon, the roots are peers searched recursively, their order does not matter, a path repeated or inside another counts once, and a package name found in two of them is an error. A path that does not exist is an error; one that holds no package is a warning.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros flash
Flash an image onto a real board: builds it if stale, runs the board's human steps, flashes, and with `--monitor` watches the console on the same port. `--expect` grades it; `--dry-run [--why]` prints the plan instead
Usage: nros flash [OPTIONS] [IMAGE] [-- <PASSTHROUGH>...]
Arguments:
[IMAGE]
The image to flash (`<image>` or `<bringup>:<image>`), as `nros build` names it. Omitted: the workspace's one image
[PASSTHROUGH]...
Arguments for the flasher, after `--`
Options:
--workspace <WORKSPACE>
Workspace root (auto-detected from cwd if omitted)
--nano-ros-path <NANO_ROS_PATH>
nano-ros checkout (auto-detected if omitted)
--dry-run
Print the resolved plan(s) and do nothing
--why
Add the ladder rung that supplied each field
--json
Print the plan as the JSON a runner is handed, not TOML
--port <PORT>
The board's serial device (else `NROS_PORT`, the bench file, or the one attached device matching the board)
--probe <PROBE>
The debug probe's serial number
--runner <RUNNER>
The flash method's own runner (`west flash --runner jlink`)
--no-prompt
Never wait for a person: a step that needs one fails instead
--monitor
After flashing, watch the board's console on the same port
--expect <TEXT>
Stop with exit 0 as soon as a console line contains TEXT; exit 1 if the target ends, or `--timeout` passes, first. Given more than once, every TEXT must appear, each on some line and in any order, and the run stops on the line that completes the set
--expect-regex <REGEX>
As `--expect`, with a regular expression over one console line. It may be repeated, and mixed with `--expect`: every pattern must match
--forbid <TEXT>
Fail with exit 1 as soon as a console line contains TEXT, before or after the expectation is met (a crash after the success line). Repeatable: any one of them fails the run
--forbid-regex <REGEX>
As `--forbid`, with a regular expression over one console line. Repeatable, and mixed with `--forbid`
--settle <SECONDS>
Once the expectation is met, keep watching for SECONDS before stopping with exit 0: a `--forbid` line or a failing exit inside the window still fails the run, and `console.log` holds the rest of the output. `--timeout` bounds the time to the match only, so the run can take up to `--timeout` + `--settle`
--zephyr-workspace <DIR>
The Zephyr workspace the implicit `nros build` of a stale image uses, as `nros build --zephyr-workspace` takes it
--timeout <SECONDS>
Stop after SECONDS: the console with `--monitor`, and any wait a prepare step makes
--router <auto|none|LOCATOR>
With `--monitor`: what serves the image's link on this host (`auto`, `none`, or a running router's locator)
[default: auto]
--plan <FILE>
Flash this plan file as written: resolve nothing, build nothing
--base-paths <PATH>...
The workspace's source roots, relative to the workspace (default: `.`, plus `nros.toml` `package_paths`).
They replace the workspace and its `package_paths`, and nothing else: the nano-ros packages and `NROS_PACKAGE_PATH` stay on the search path. As in colcon, the roots are peers searched recursively, their order does not matter, a path repeated or inside another counts once, and a package name found in two of them is an error. A path that does not exist is an error; one that holds no package is a warning.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros monitor
Attach to a running board's console: `--expect` grades it, `--send` writes to it. In a workspace the image's board states the port and baud; elsewhere `--port` names the device
Usage: nros monitor [OPTIONS] [IMAGE]
Arguments:
[IMAGE]
The image whose board to watch (`<image>` or `<bringup>:<image>`). Omitted: the workspace's one image, or none with `--port`
Options:
--workspace <WORKSPACE>
Workspace root (auto-detected from cwd if omitted)
--nano-ros-path <NANO_ROS_PATH>
nano-ros checkout (auto-detected if omitted)
--port <PORT>
The board's serial device (else `NROS_PORT`, the bench file, or the one attached device matching the board)
--baud <BAUD>
The serial baud rate (else the board's)
--expect <TEXT>
Stop with exit 0 as soon as a console line contains TEXT; exit 1 if the target ends, or `--timeout` passes, first. Given more than once, every TEXT must appear, each on some line and in any order, and the run stops on the line that completes the set
--expect-regex <REGEX>
As `--expect`, with a regular expression over one console line. It may be repeated, and mixed with `--expect`: every pattern must match
--forbid <TEXT>
Fail with exit 1 as soon as a console line contains TEXT, before or after the expectation is met (a crash after the success line). Repeatable: any one of them fails the run
--forbid-regex <REGEX>
As `--forbid`, with a regular expression over one console line. Repeatable, and mixed with `--forbid`
--settle <SECONDS>
Once the expectation is met, keep watching for SECONDS before stopping with exit 0: a `--forbid` line or a failing exit inside the window still fails the run, and `console.log` holds the rest of the output. `--timeout` bounds the time to the match only, so the run can take up to `--timeout` + `--settle`
--timeout <SECONDS>
Stop after SECONDS
--send <LINE>
Send LINE to the board once the console is open (repeatable)
--dry-run
Print the resolved plan and open nothing
--why
Add the ladder rung that supplied each field
--json
Print the plan as the JSON a runner is handed, not TOML
--base-paths <PATH>...
The workspace's source roots, relative to the workspace (default: `.`, plus `nros.toml` `package_paths`).
They replace the workspace and its `package_paths`, and nothing else: the nano-ros packages and `NROS_PACKAGE_PATH` stay on the search path. As in colcon, the roots are peers searched recursively, their order does not matter, a path repeated or inside another counts once, and a package name found in two of them is an error. A path that does not exist is an error; one that holds no package is a warning.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros bench
This machine's boards: `scan` records which attached USB device is which board in `$NROS_HOME/bench.toml`, `list` prints it with what is attached now. It supplies ports and probes, never test scope
Usage: nros bench <COMMAND>
Commands:
scan Record the attached devices whose USB id a board's `[board.console] usb` states, in `$NROS_HOME/bench.toml`
list Print the bench file and whether each device is attached now
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros bench scan
Record the attached devices whose USB id a board's `[board.console] usb` states, in `$NROS_HOME/bench.toml`
Usage: nros bench scan [OPTIONS]
Options:
--nano-ros-path <NANO_ROS_PATH> nano-ros checkout (auto-detected if omitted): whose board descriptors to match against
--dry-run Print what would be recorded and write nothing
-h, --help Print help
-V, --version Print version
nros bench list
Print the bench file and whether each device is attached now
Usage: nros bench list
Options:
-h, --help Print help
-V, --version Print version
nros debug
Debug an image on its target (reserved: not available yet)
Usage: nros debug
Options:
-h, --help Print help
-V, --version Print version
Workspace
nros list
List the workspace's packages: kind, name and directory per row
Usage: nros list [OPTIONS] [WORKSPACE]
Arguments:
[WORKSPACE]
Workspace root (cwd or first ancestor containing `src/`). Defaults to cwd
Options:
-t, --topological-order
List in build order, as `colcon list -t`. Default: sorted.
This and every flag below switch the listing to `colcon list`'s: one `name<TAB>path<TAB>(type)` line per package, found the way `nros build` finds them.
-n, --names-only
Print only each package's name, as `colcon list -n`
-p, --paths-only
Print only each package's path, as `colcon list -p`
--packages-select <PKG>...
Only these packages — no dependencies, no dependents.
colcon's flag, with two differences: a name matching no package is an error, not a warning, and a selection that leaves out a package a selected one depends on is refused, since there is no install prefix for it to come from. That holds for every selection flag.
--packages-up-to <PKG>...
These packages and everything they depend on, transitively.
The selection flags compose as an INTERSECTION, which is colcon's composition too: each deselects independently, so adding one can only ever narrow the set.
--packages-above <PKG>...
These packages and everything that depends on them, transitively.
A package here that depends on a workspace package left out is refused, as for every selection flag; add `--packages-up-to` for its dependencies. A cargo member with no `package.xml` is refused here: its dependents name it only in their `Cargo.toml`, which the selection does not read.
--packages-skip <PKG>...
Leave these packages out
--base-paths <PATH>...
The workspace's source roots, relative to the workspace (default: `.`, plus `nros.toml` `package_paths`).
They replace the workspace and its `package_paths`, and nothing else: the nano-ros packages and `NROS_PACKAGE_PATH` stay on the search path. As in colcon, the roots are peers searched recursively, their order does not matter, a path repeated or inside another counts once, and a package name found in two of them is an error. A path that does not exist is an error; one that holds no package is a warning.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros image
List the workspace's images, or show one: what it declares and what the build resolves for it
Usage: nros image <COMMAND>
Commands:
list List the workspace's images, as its bringups declare them
show Show one image: what it declares, and what the build resolves for it
check Check a built image. `--no-alloc` reports every allocation symbol it links, and exits 1 when there is one
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros image list
List the workspace's images, as its bringups declare them
Usage: nros image list [OPTIONS]
Options:
--workspace <WORKSPACE> Workspace root. Default: the workspace the current directory is in
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros image show
Show one image: what it declares, and what the build resolves for it
Usage: nros image show [OPTIONS] <IMAGE>
Arguments:
<IMAGE> The image, as `nros build` names it (`linux`, or `<bringup>:linux` when two bringups declare the same id)
Options:
--workspace <WORKSPACE> Workspace root. Default: the workspace the current directory is in
--json Print one JSON object instead of text
--nodes Print the nodes the image's plan will start
--topics Print the topics, services and actions the image's plan will create, and those its sizing descriptor records
--derived Print what the build derived for the image: its target, entity and type counts, each with the reason recorded for it
-h, --help Print help
-V, --version Print version
nros image check
Check a built image. `--no-alloc` reports every allocation symbol it links, and exits 1 when there is one
Usage: nros image check [OPTIONS] --no-alloc [IMAGE]
Arguments:
[IMAGE]
The image, as `nros build` names it. Default: the workspace's only image
Options:
--no-alloc
Report every allocation symbol the image links, by family: the C heap, the Rust allocator, C++ `operator new`, an RTOS heap
--tier <TIER>
What the image is held to
Possible values:
- heap-free: No allocation symbol at all, defined or referenced
- unified: Allocation only through the platform's allocator. Reads the build's objects, since a linked image no longer says who called `malloc`
[default: heap-free]
--elf <PATH>
Read this linked image instead of the one `nros build` made. May be given more than once
--objects <PATH>
With `--tier unified`: the objects, archives or build directories to read. Default: the image's build directory
--allow <SYMBOL=REASON>
Permit one symbol, with the reason: `--allow 'malloc=<why>'`
--workspace <WORKSPACE>
Workspace root. Default: the workspace the current directory is in
--json
Print one JSON object instead of text
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros graph
Print the workspace's packages in dependency order, each with the workspace packages it depends on
Usage: nros graph [OPTIONS]
Options:
--workspace <WORKSPACE> Workspace to scan. Defaults to the current directory
-h, --help Print help
-V, --version Print version
Interfaces
nros interface
Generate message bindings, list the interfaces the workspace can reach, or show one interface's definition
Usage: nros interface <COMMAND>
Commands:
generate Generate Rust / C / C++ message bindings from `package.xml`
list List the interface types the search path reaches
show Show an interface type's definition, nested types expanded
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros interface generate
Generate Rust / C / C++ message bindings from `package.xml`
Usage: nros interface generate [OPTIONS] <LANG>
Arguments:
<LANG>
Target language
Possible values:
- rust
- c
- cpp
- all: Generate Rust + C + C++ in one shot
Options:
--manifest <MANIFEST>
Path to `package.xml`
[default: package.xml]
-o, --output <OUTPUT>
Output directory for generated bindings
[default: generated]
--ros-edition <ROS_EDITION>
ROS 2 edition (`humble` | `iron` | `jazzy`)
[default: humble]
--codegen-config <CODEGEN_CONFIG>
Explicit per-field capacity config (`nros-codegen.toml`).
Wins over any file discovered by walking up from the manifest dir.
--force
Overwrite existing bindings
-v, --verbose
Verbose output
--generate-config
Generate `.cargo/config.toml` with `[patch.crates-io]` entries (Rust only)
--nano-ros-path <NANO_ROS_PATH>
Path to nros crates directory for generated Cargo config patches (Rust only)
--nano-ros-git
Use nros git repository for generated Cargo config patches (Rust only)
--rename <RENAME>
Rename a generated package: --rename old_pkg=new_crate_name (Rust only)
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros interface list
List the interface types the search path reaches
Usage: nros interface list [OPTIONS]
Options:
-m, --only-msgs Print only messages
-s, --only-srvs Print only services
-a, --only-actions Print only actions
--workspace <WORKSPACE> Workspace whose `src/` is searched first. Defaults to the current directory
-h, --help Print help
-V, --version Print version
nros interface show
Show an interface type's definition, nested types expanded
Usage: nros interface show [OPTIONS] <TYPE>
Arguments:
<TYPE> The type, as `<package>/<msg|srv|action>/<Name>`
Options:
--workspace <WORKSPACE> Workspace whose `src/` is searched first. Defaults to the current directory
-h, --help Print help
-V, --version Print version
Inspect
nros doctor
Health-check the workspace (SDK paths, toolchains, env)
Usage: nros doctor [OPTIONS]
Options:
--platform <PLATFORM>
Restrict the check to one module (e.g. `nuttx`, `zephyr`, `freertos`). Forwarded as `just <platform> doctor`
--board <BOARD>
Restrict the license-gate check to one board's package set.
When set, only `[gated.*]` entries listed in `[board.<name>].packages` are checked — keeps unrelated gated SDKs out of the report for board-scoped runs. The board's `board.cmake` `NROS_BOARD_GATED_PKGS` is the SSoT; `nros-sdk-index.toml` `[board.<name>].packages` mirrors it.
--workspace <WORKSPACE>
Path to the nano-ros workspace root (auto-detected if omitted)
--config <CONFIG>
Bringup `system.toml` (or a directory containing one) whose `[image.<id>]` and `[host.<name>]` blocks to health-check (a retired table is reported as a problem). When omitted, the cwd's `system.toml` is used if present
--report
Print the support status of every board the bringup's images name, and stop.
Reads the board support registry: a read-only report an adopter can file. Uses `--config`, else the cwd's `system.toml`.
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros board
Inspect supported boards
Usage: nros board <COMMAND>
Commands:
list List every board key, with its crate, platform, support status and cadence
show Show one board: its support evidence and every table of its descriptor
info Print a board's resolved descriptor as JSON
new Scaffold a new board package
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros board list
List every board key, with its crate, platform, support status and cadence
Usage: nros board list [OPTIONS]
Options:
--workspace <WORKSPACE> nano-ros SDK root holding the board catalog. Default: `$NROS_WORKSPACE_ROOT`, a checkout enclosing cwd, then this `nros` binary's own SDK root (the installed track needs no flag)
--json Print one JSON object instead of a table
-h, --help Print help
-V, --version Print version
nros board show
Show one board: its support evidence and every table of its descriptor
Usage: nros board show [OPTIONS] <NAME>
Arguments:
<NAME> Board: a board key (`mps2-an385-freertos`), a package (`nros-board-zephyr`), a registry key (`nros-board-zephyr@Fvp`) or an evidence page name (`fvp`)
Options:
--workspace <WORKSPACE> nano-ros SDK root holding the board catalog. Default: `$NROS_WORKSPACE_ROOT`, a checkout enclosing cwd, then this `nros` binary's own SDK root
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros board info
Print a board's resolved descriptor as JSON
Usage: nros board info [OPTIONS] <NAME>
Arguments:
<NAME>
Board key.
Resolves to a board CRATE (`packages/boards/nros-board-<name>/`) or to a conf BUNDLE under a family crate (`packages/boards/nros-board-<family>/boards/<name>/`) — e.g. `fvp-aemv8r-smp` is `nros-board-zephyr/boards/fvp-aemv8r-smp/`.
Options:
--workspace <WORKSPACE>
nano-ros SDK root holding the board catalog. Default: `$NROS_WORKSPACE_ROOT`, a checkout enclosing cwd, then this `nros` binary's own SDK root
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros board new
Scaffold a new board package
Usage: nros board new [OPTIONS] --platform <PLATFORM> <NAME>
Arguments:
<NAME> Board key, kebab-case. Becomes the directory name, the canonical `names` entry and the announcement
Options:
--platform <PLATFORM> Platform this board runs on (`zephyr`, `freertos`, `nuttx`, `threadx`, `bare-metal`, `posix`, `esp32`)
--west-board <WEST_BOARD> Zephyr board id (`<board>/<soc>/<variant>`). Required for, and only meaningful on, `--platform zephyr`
--out-of-tree <OUT_OF_TREE> Write the package outside the nano-ros tree. The board is then reached through `$NROS_EXTRA_BOARD_PATH`, which this prints
--workspace <WORKSPACE> nano-ros checkout to write the in-tree board into (auto-detected from cwd if omitted). Not read with `--out-of-tree`, which needs no checkout
--dry-run Print what would be written and write nothing
-h, --help Print help
-V, --version Print version
nros platform
List the platforms boards build on, or show one: its boards and capabilities
Usage: nros platform <COMMAND>
Commands:
list List the platforms on the descriptor search path
show Show one platform: its names, parent, boards and capabilities
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros platform list
List the platforms on the descriptor search path
Usage: nros platform list [OPTIONS]
Options:
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros platform show
Show one platform: its names, parent, boards and capabilities
Usage: nros platform show [OPTIONS] <PLATFORM>
Arguments:
<PLATFORM> The platform, by its name or an alias (`freertos`, `bare-metal`)
Options:
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros rmw
List the RMW backends, or show one: its host side and its boards
Usage: nros rmw <COMMAND>
Commands:
list List every RMW backend and the boards it is verified on
show Show one RMW backend: its names, what it needs on the host, and its boards
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros rmw list
List every RMW backend and the boards it is verified on
Usage: nros rmw list [OPTIONS]
Options:
--json Print one JSON object instead of a table
--workspace <DIR> Workspace whose own RMW providers are listed too (default: the one the current directory is in, else the SDK's backends alone)
-h, --help Print help
-V, --version Print version
nros rmw show
Show one RMW backend: its names, what it needs on the host, and its boards
Usage: nros rmw show [OPTIONS] <NAME>
Arguments:
<NAME> The RMW name, as `rmw = "…"` spells it (e.g. `zenoh`)
Options:
--json Print one JSON object instead of text
--workspace <DIR> Workspace whose own RMW providers are searched too
-h, --help Print help
-V, --version Print version
nros runner
List the runners and extension commands this workspace reaches, or show one
Usage: nros runner <COMMAND>
Commands:
list List the runners and extension commands this workspace reaches
show Show one runner or extension command: its package, verbs and needs
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros runner list
List the runners and extension commands this workspace reaches
Usage: nros runner list [OPTIONS]
Options:
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros runner show
Show one runner or extension command: its package, verbs and needs
Usage: nros runner show [OPTIONS] <NAME>
Arguments:
<NAME> A runner (`qemu`), or a command as it is typed (`router`)
Options:
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros knob
List the knobs a project can state, or show one: where to state it, the values it takes and its default
Usage: nros knob <COMMAND>
Commands:
list List every knob a project can state: its name, scope, default and what it is for
show Show one knob: where to state it, the values it takes, its default and its help
render Render a package's rows as a view it commits: `--kconfig`, the Kconfig of a package that is its own Zephyr module
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros knob list
List every knob a project can state: its name, scope, default and what it is for
Usage: nros knob list [OPTIONS]
Options:
--json Print one JSON object instead of a table
--platform <PLATFORM> Resolve each knob's value for this platform, and say which rung of the platform/board ladder set it (`builtin`, `platform`, `board`, `env`)
--board-toml <FILE> With `--platform`: the board's `nros-board.toml`, for its rung
--workspace <DIR> The workspace whose packages are searched for their knobs (and, with `--platform`, its platform packages). Default: the current directory
-h, --help Print help
-V, --version Print version
nros knob show
Show one knob: where to state it, the values it takes, its default and its help
Usage: nros knob show [OPTIONS] <NAME>
Arguments:
<NAME> The knob, as `nros knob list` names it (e.g. `net.max_sockets`)
Options:
--json Print one JSON object instead of text
--workspace <DIR> The workspace whose packages are searched for their knobs (default: the current directory)
-h, --help Print help
-V, --version Print version
nros knob render
Render a package's rows as a view it commits: `--kconfig`, the Kconfig of a package that is its own Zephyr module
Usage: nros knob render [OPTIONS] --kconfig <PACKAGE>
Options:
--kconfig <PACKAGE> The package: a directory holding its `nros-knobs.toml`, or its `package.xml` name in the workspace's provider scan
--workspace <DIR> The workspace whose packages are searched (default: the current directory)
--out <FILE> Write here instead of stdout
-h, --help Print help
-V, --version Print version
nros code
List the diagnostic codes a refusal prints, or show one: what it reports and how to fix it
Usage: nros code <COMMAND>
Commands:
list List every diagnostic code with what it reports
show Show one code: what it reports, where it is raised, and how to fix it
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros code list
List every diagnostic code with what it reports
Usage: nros code list [OPTIONS]
Options:
--all List retired codes too
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros code show
Show one code: what it reports, where it is raised, and how to fix it
Usage: nros code show [OPTIONS] <CODE>
Arguments:
<CODE> The code, as a refusal prints it (`NROS-0001`)
Options:
--json Print one JSON object instead of text
-h, --help Print help
-V, --version Print version
nros config
Inspect or validate the current project's resolved configuration
Usage: nros config <COMMAND>
Commands:
show Print the resolved effective config for a bringup system (from its typed `system.toml`) with per-value provenance
explain Print the resolved BUILD-time knob ladder for a platform
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros config show
Print the resolved effective config for a bringup system (from its typed `system.toml`) with per-value provenance
Usage: nros config show [OPTIONS]
Options:
--system [<SYSTEM>]
The bringup pkg to resolve.
Omit (or pass with no value) to default to the workspace's `default_system` (or the sole bringup).
--format <FORMAT>
Output shape. `human` (default) is the provenance report; `cmake` emits a single `set(NROS_FEATURES ...)` line for `include()` from `nano_ros_workspace()` BEFORE nano-ros is imported
[default: human]
[possible values: human, cmake]
--image <ID>
`--format cmake`: the `[image.<id>]` being built (`-DNROS_IMAGE`). Its own `features` and `node_interfaces` join the system's, as on every other road. Absent, the `[system]` list answers
--workspace <WORKSPACE>
Workspace root for resolution (default: cwd)
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros config explain
Print the resolved BUILD-time knob ladder for a platform.
Shows every knob's final value plus the rung that set it (builtin / platform / board / env).
Usage: nros config explain [OPTIONS] --platform <PLATFORM>
Options:
--platform <PLATFORM>
Platform name (a directory under the platforms root, e.g. `zephyr`, `bare-metal`, `freertos-lwip`)
--board-toml <BOARD_TOML>
Optional board package `nros-board.toml` supplying `[knobs]` deltas (the ladder's board rung). Explicit path; registry-name resolution is a follow-up
--platforms-dir <PLATFORMS_DIR>
Platforms root. Pins the search to this one directory.
Default: `$NROS_PLATFORMS_DIR`, then the platform packages in the workspace, then the SDK's own platforms.
--workspace <WORKSPACE>
Workspace whose platform packages are searched (default: the current directory)
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros plan
Resolve launch files, manifests, and metadata into nros-plan.json
Usage: nros plan [OPTIONS] <SYSTEM_PKG> [LAUNCH_FILE] [LAUNCH_ARGS]...
Arguments:
<SYSTEM_PKG>
System package name used for build/<system_pkg>/nros output. A directory here, with no `<launch_file>`, is the bringup directory and names the package
[LAUNCH_FILE]
ROS 2 launch file to parse, or a package directory to resolve.
A directory is the discovery root for its resolved SystemModel. When omitted (`nros plan <bringup-dir>`), defaults to the `<system_pkg>` argument, treated as a directory path.
[default: ""]
[LAUNCH_ARGS]...
Launch arguments forwarded as name:=value or name=value
Options:
--record <RECORD>
Precomputed play_launch record.json to use instead of parsing launch_file
--model <system_model.yaml>
Plan from a resolved SystemModel (canonical). With a package-dir input, a committed `<dir>/config/system_model.yaml` is discovered automatically; this flag overrides with an explicit path
--workspace <WORKSPACE>
Workspace root containing colcon-like src/* packages
--out-dir <OUT_DIR>
Output root for orchestration artifacts
--metadata <METADATA>
Existing source metadata JSON artifact
--manifest <MANIFESTS>
ROS launch manifest YAML artifact
--rmw <RMW>
RMW override, the top of the precedence ladder.
`--rmw` > `[image.<t>].rmw` > `[system].rmw` > `zenoh`. Sets `plan.build.rmw` regardless of `system.toml` / the `[build].rmw` overlay.
--image <IMAGE>
Select the `[image.<id>]` the planner resolves per-target values against.
Those values are the RMW override, build tuning and the rustc triple. Omitted → the sole image `default_images` picks → target-agnostic.
--nano-ros-path <NANO_ROS_PATH>
nano-ros checkout holding `packages/boards`, used to derive the selected image's rustc triple from its board descriptor. Defaults to a walk-up from the workspace, then this `nros` binary's own SDK root — the same ladder `nros build` uses
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros check
Check a runner, command or board package, a plan, a system.toml or a workspace
Usage: nros check [OPTIONS] [PLAN]
Arguments:
[PLAN]
Path to nros-plan.json, a bringup `system.toml` (or a directory containing one), or a `<bringup>` pkg directory when `--bringup` is set. Or the name of a runner, command or board package.
A bare name (letters, digits, `_` and `-`) with no file or directory of that name here is a package: the check that package's kind needs runs. A runner or command is built, located and asked whether it speaks this nros's protocol; a board's descriptor is resolved through the board catalog, its announcement compared and its network and Zephyr projection resolved.
[default: build/nros/nros-plan.json]
Options:
--package-xml-drift <PACKAGE_XML_DRIFT>
Also check a package directory for generated `package.xml` drift (a generator-marked file edited by hand).
May be passed multiple times.
--bringup
Lint the `plan` argument as a `<bringup>` package directory.
Rejects `Cargo.toml`, `CMakeLists.txt`, `src/`, or any nested `add_executable(`. The bringup package must be pure declarative.
--workspace [<DIR>]
Walk a workspace root and run the workspace layout checks.
Checks `<pkg>::<Class>` enforcement on every `[[component]]` row, a stray `system.toml` next to a component pkg, and a per-pkg `.cargo/config.toml` carrying `[patch.crates-io]` (warn-only). When the flag is passed with no value the workspace defaults to the current directory.
--image <IMAGE>
Package form: the image whose run plan a runner check resolves. Omitted: the workspace's one image, if it has one
--allow-overriding <NAME>
Package form: approve an override of a nano-ros runner or command by this name
--no-build
Package form: check what is already built; do not run `nros build`
--nano-ros-path <NANO_ROS_PATH>
Package form: nano-ros checkout (auto-detected if omitted)
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros explain
Explain a diagnostic code, or render a generated nros-plan.json
Usage: nros explain [CODE_OR_PLAN]
Arguments:
[CODE_OR_PLAN] A diagnostic code (`NROS-NNNN`) or a plan path (an nros-plan.json) [default: build/nros/nros-plan.json]
Options:
-h, --help Print help
-V, --version Print version
Toolchain
nros toolchain
List, remove and garbage-collect installed toolchains and SDK packages
Usage: nros toolchain <COMMAND>
Commands:
list What the store holds: name, version, size, when it was last read
remove Remove one nano-ros toolchain from the store. Refuses while a known pin names the version — or while no pin file could be consulted at all
gc Propose (and, with `--delete`, perform) removal of unused store entries. Dry-run by default
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
nros toolchain list
What the store holds: name, version, size, when it was last read
Usage: nros toolchain list [OPTIONS]
Options:
--root <ROOT> Store root. Defaults to `$NROS_HOME`, else `~/.nros`
-h, --help Print help
-V, --version Print version
nros toolchain remove
Remove one nano-ros toolchain from the store. Refuses while a known pin names the version — or while no pin file could be consulted at all
Usage: nros toolchain remove [OPTIONS] <VERSION>
Arguments:
<VERSION> The toolchain version, exactly as `toolchains/<version>` spells it
Options:
--pin-file <PATH> An extra file whose contents pin versions. Repeatable
--ignore-pins Uninstall without consulting any pin file. You are asserting no project pins this version
--dry-run Report what would happen and remove nothing
--root <ROOT> Store root. Defaults to `$NROS_HOME`, else `~/.nros`
-h, --help Print help
-V, --version Print version
nros toolchain gc
Propose (and, with `--delete`, perform) removal of unused store entries. Dry-run by default
Usage: nros toolchain gc [OPTIONS] --older-than <DURATION>
Options:
--older-than <DURATION> Remove entries not read for at least this long: `90d`, `12h`, `2w`. A bare number is refused — say the unit
--delete Actually remove. Without it this only reports (the default)
--dry-run Report only. The default; accept it so the safe intent can be SPELLED rather than only implied, and so it can conflict with `--delete` instead of one of them silently winning
--pin-file <PATH> An extra file whose contents pin versions. Repeatable. Any string value in it protects an entry with that version
--ignore-pins Delete without consulting any pin file. You are asserting no project needs these
--root <ROOT> Store root (see `list --root`)
-h, --help Print help
-V, --version Print version
nros pin
Report this project's `nros-toolchain.toml`, or move it.
A bump reports the codegen delta between the two toolchains' declared `share/nros/manifest.toml` first, so an upgrade that would invalidate already-generated code warns before anything is written.
Usage: nros pin [OPTIONS] [VERSION]
Arguments:
[VERSION]
The store version to pin to, exactly as `toolchains/<version>` spells it (`0.7.9-nros1`) — not the crate version `nros --version` prints. Omit to report the current pin and change nothing
Options:
--rev <SHA>
Pin one commit instead: the full 40-hex sha. A branch, a tag or a short sha is refused, since none of them is sure to name the same commit tomorrow
--git <URL>
The repository `--rev` is a commit of. Default: the pin's current `git`, else the nano-ros repository
--path <DIR>
Pin a nano-ros checkout on this machine instead: the root of a clone. The pin records it relative to the pin file
--dir <PATH>
The project directory. Defaults to the working directory; the pin is searched for at or above it, the way cargo finds a workspace root
--root <PATH>
Store root. Defaults to `$NROS_HOME`, else `~/.nros`
--dry-run
Report the delta and write nothing
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros update
Move one pin, leaving one diff to review.
A pin is a registry crate (`--crate`), a vendored source (`--source`), a host tool (`--tool`) or a west project (`--west`).
With an installed SDK, the SDK's pins are the release and do not move: the project's own `nros-sdk.lock` does. `--source <name>` and `--tool <name>` accept this SDK's pin after an upgrade (no `--ref` or `--to-version`); `nros configure --migrate` accepts every one at once. `--crate <name>` records a project override. In a nano-ros checkout, each flag edits the checkout's pin set instead.
Usage: nros update [OPTIONS] <--pins|--crate <NAME>|--source <NAME>|--tool <NAME>|--west <MODULE>>
Options:
--pins
Regenerate the registry pin set from the locked roots as they stand — after a `cargo update` or a manifest edit in one root. Disagreements between roots are settled upward first
--prune
With `--pins`: also DROP every pinned range no locked root resolves and `locks/leaf-only-pins.toml` does not keep. Regeneration alone never drops a range, so a bump leaves the old one pinned
--crate <NAME>
A Rust registry crate. In a checkout: every locked root that uses it is re-resolved with `cargo update`, the roots are brought into agreement, and the pin set is regenerated from them. With an installed SDK: it is re-resolved in this project and recorded as a project override
--precise <VERSION>
The exact version to move to. Without it, cargo picks the newest semver-compatible one. A different MAJOR is a manifest edit first
--source <NAME>
A vendored source (`[source.<name>]`). With an installed SDK: the project's lock accepts this SDK's commit. In a checkout: with `--ref`, its submodule is checked out there and the index `ref` rewritten, forward only
--ref <SHA>
The commit for `--source` (a checkout only)
--allow-rewind
Let `--source` move a pin BACKWARDS (the submodule-pin rule forbids it otherwise; say why in the commit)
--tool <NAME>
A host tool (`[tool.<name>]`). With an installed SDK: the project's lock accepts this SDK's version. In a checkout: with `--to-version`, the row's version strings are rewritten and every dist artifact is downloaded to recompute its sha256
--to-version <VERSION>
The version for `--tool` (a checkout only)
--west <MODULE>
Move a Zephyr west project's revision in every manifest that lists it
--revision <REV>
The revision for `--west`
--nano-ros-path <NANO_ROS_PATH>
The nano-ros checkout whose pin set to edit (else the usual ladder)
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
nros locate
Print where a resource is, and with `--why`, which rung answered.
The cmake/just/shell front door to `nros_build_paths::locate`.
Usage: nros locate [OPTIONS] [NAMES]...
Arguments:
[NAMES]...
Resources to locate: a `[source.<name>]` of the index, or `store` / `nano-ros` for the two roots. `artifact <name>…` instead locates a cargo-built artifact (`c-archive`, `cpp-archive`, `c-include`, `cpp-include`, `c-config-header`, `cpp-config-header`); `tool <name>` a host binary (`nros-launch-resolve`, `renode`, or `qemu-system-<arch>` through the one QEMU ladder), the install directory of an SDK tool `nros setup <board>` provisioned (`tool zephyr-sdk`), `configured` where `nros configure` put an image's answer (with `--project` and `--image`), or `nuttx-cargo-config`, the cargo settings a NuttX make build with no project takes from its board (with `--target`, `--nuttx-board`, `--target-dir` and `--out`)
Options:
--all
Every `[source.*]` row. A row that resolves nowhere is skipped in batch output (and named on stderr), never invented
--why
Print every rung and what it saw
--format <FORMAT>
Possible values:
- path: The path alone (one name) or `name<TAB>path` lines
- sh: `NROS_LOCATE_<NAME>=<path>` lines, shell-quoted
- cmake: `set(NROS_LOCATE_<NAME> "<path>")` lines — normal variables, never CACHE
[default: path]
--index <INDEX>
Path to the SDK index
[default: nros-sdk-index.toml]
--target <TARGET>
`artifact` mode: the target triple the artifact was built for. Omit for a host build cargo ran without `--target`
--profile <PROFILE>
`artifact` mode: the cargo PROFILE (`dev`, `release`, a custom one)
[default: release]
--target-dir <TARGET_DIR>
`artifact` mode: the cargo target dir. Default: cargo's own answer for the nano-ros workspace (`CARGO_TARGET_DIR`, `[build] target-dir`, else `<root>/target`)
--placed-dir <PLACED_DIR>
`artifact` mode: the directory a build PLACED its config headers in.
REQUIRED for the header artifacts, which live only in cargo's `$OUT_DIR`; an archive is never placed, so naming one with this is refused.
--image <IMAGE>
`configured` mode: the image, by its configure key (an image id for a single-package leaf, `<bringup>:<id>` for a workspace)
--project <PROJECT>
The project whose `system.toml` `[sources]` is rung 3.
Default: `$NROS_WORKSPACE_ROOT`, else the nearest ancestor of the working directory that holds a `system.toml`.
--nuttx-board <NUTTX_BOARD>
`nuttx-cargo-config` mode: the kernel's `CONFIG_ARCH_BOARD`, which picks between boards that build for the same target
--out <OUT>
`nuttx-cargo-config` mode: the file to write. Its grandparent is the directory cargo resolves the file's relative paths against
--rmw <RMW>
`nuttx-cargo-config` mode (required): the RMW the kernel's Kconfig selects. Refused unless the NuttX make road can build it (a backend the image crate bundles); with `--project`, also checked against the project's image
--ros-edition <ROS_EDITION>
`nuttx-cargo-config` mode, with `--project`: the ROS edition the kernel's Kconfig selects, checked against the project's image
--kconfig <KCONFIG>
`nuttx-cargo-config` mode: the kernel's `.config`, named when its choices are refused or disagree with the image
-h, --help
Print help (see a summary with '-h')
-V, --version
Print version
Other
nros version
Print toolchain + library versions
Usage: nros version
Options:
-h, --help Print help
-V, --version Print version
nros completions
Generate shell completions (bash | zsh | fish | powershell)
Usage: nros completions [OPTIONS] [SHELL]
Arguments:
[SHELL] The shell. Default: the one `$SHELL` names [possible values: bash, zsh, fish, powershell]
Options:
--static Print a generated script instead of the registration line: verbs and flags complete, names do not
-h, --help Print help
-V, --version Print version