rune inspect

rune inspect <name> [--root]

Prints exactly what rune run <name> would execute, and where every part of it came from. It spawns nothing — not the command, and not the shell. The shell is consulted for its name only, because that is what decides how arguments are quoted.

$ cd packages/legacy && rune inspect test
test

command      vitest run --reporter=dot --maxWorkers=1
directory    packages/legacy
environment  NODE_ENV=test
ignored      `DATABASE_URL` from `.env.test` was ignored: the process environment already sets it

resolved through
  rune.config.ts                  test  runs `vitest run --reporter=dot`
  packages/legacy/rune.config.ts  test  appends `--maxWorkers=1`

The report opens with the script name, then a labelled block, then the chain that produced it.

The labelled block

A label appears only when the script gave it something to say. A script with no environment of its own prints no environment line at all, so the lines that are there are the decisions the config made.

LabelContent
commandThe final string, after inheritance, per-OS selection and argument quoting
runsA serial group's members, in order, joined by arrows
all at onceA parallel group's members
succeeds ifWhat the group's success policy means, said rather than named
on failurePrinted when the group sets continueOnError
runs firstThe script's dependsOn chain
lifecycleOne line per declared timeout, retry, kill signal and kill timeout
directoryThe working directory, relative to the config root
environmentEvery variable the config adds or changes
ignoredAssignments that did not take effect, and why

environment is the config's own delta. PATH and the RUNE_ variables are not listed: Rune sets them for every script, so printing them would bury the one line that was a choice.

Chains

Every step that contributed appears under resolved through, base first, each naming the config it came from and what it put in:

$ rune inspect test:ci
test:ci

command      vitest run --reporter=dot --coverage --reporter=junit
directory    .

resolved through
  rune.config.ts  test           runs `vitest run --reporter=dot`
  rune.config.ts  test:coverage  appends `--coverage`
  rune.config.ts  test:ci        appends `--reporter=junit`

Groups

A group has no command, so it reports its members and how they are run:

$ rune inspect ci
ci

runs         build → test → lint
directory    .

resolved through
  rune.config.ts  ci  runs build, test, lint
$ rune inspect dev
dev

all at once  dev:api, dev:web
succeeds if  the member that finishes first succeeds
directory    .

resolved through
  rune.config.ts  dev  runs dev:api, dev:web at once

Inspect a member by name to see the command it resolves to.

Lifecycle

Declared timeouts and retries print as what they do:

$ rune inspect e2e
e2e

command      playwright test
lifecycle    ends the whole tree after 600000 ms
             retries 2 more times on failure, waiting 2^attempt seconds between them
directory    .

resolved through
  rune.config.ts  e2e  runs `playwright test`

Defaults are left out. A report that printed SIGTERM after 5000 ms for every script would hide the one line that was a decision.

Flags

--root inspects the root definition, ignoring anything a package narrowed.

rune inspect takes no pass-through arguments. Use rune run for that.

Exit code

0 when the script resolves. 1 when the name is unknown, with the same suggestion and listing rune run produces.