Skip to content

INFERENCE-INIT-03: Preview without writing using --dry-run

–dry-run prints every would-be file to stdout and writes nothing, so you can inspect the scaffold before committing it.

Builds on: INFERENCE-INIT-01: Scaffold a contract from a folder of notes

A terminal session: the command as you’d run it, followed by the output it prints; trailing comments note the exit status.

Terminal window
markdown-contract init ./notes --dry-run
# prints each would-be file as a `# <path>` banner + body, then writes nothing:
# # markdown-contract.yaml
# mcVersion: 1
# kind: config
# ...
# # notes.contract.yaml
# mcVersion: 1
# kind: contract
# ...
# nothing is written to disk (exit 0)
  • init --dry-run branch
  • renderDryRun (per-file banners + warnings trailer)