Batch Execution (rnex exec)
rnex exec runs arbitrary shell commands sequentially across every active (enabled) member repository in ./repos/.
Syntax
rnex exec <command...>Repo Nexus automatically navigates into each enabled repository directory (./repos/<name>), runs the command in a subshell, prefixes output with repository headings, and checks exit codes.
Behavior & Execution Model
Sequential Execution
Commands execute one repository at a time in the order declared in rnex.yaml. This ensures predictable output logs and avoids parallel resource contention during intensive builds or test suites.
Exit Code Bubbling
If a command produces a non-zero exit code in any member repository:
rnex execimmediately prints an error header highlighting the failed repository.- Downstream repositories are aborted.
rnex execexits with the failed command's exit code (exit 1or specific error code).
Continuous Execution
To continue through repositories regardless of errors, chain with a shell fallback:
rnex exec sh -c "npm test || true"Common Use Cases & Examples
1. Multi-Repo Git Status
Inspect working tree changes across all repositories:
rnex exec git status -s=== [backend] ===
M src/routes.ts
?? test/new-test.ts
=== [frontend] ===
On branch main (working tree clean)2. Fast-Forward Pull Across Repositories
Pull upstream changes cleanly:
rnex exec git pull --ff-only3. Running Lints or Formatting
rnex exec npm run lint4. Running Custom Shell Pipelines
For commands involving pipes, redirects, or complex variables, invoke them inside sh -c:
rnex exec sh -c "git branch --show-current && git log -1 --oneline"