Bind a contract directly, scope the run
validate-04 · CLI transcript
No config file needed: --contract binds one contract to a folder, and --include / --exclude narrow any run without touching config.
Builds on: Check a folder of docs
The artifact
Section titled “The artifact”A terminal session: the command as you’d run it, followed by the output it prints; trailing comments note the exit status.
# bind one contract straight to a folder — no markdown-contract.yaml requiredmarkdown-contract validate ./decisions --contract decision.contract.yaml
# narrow a run with globs (relative to the validated path)markdown-contract validate ./decisions --include "2026-*/**" --exclude "**/drafts/**"
# different trees, different contracts, one run: pair each --contract with a --pathmarkdown-contract validate --contract decision.contract.yaml --path decisions --contract runbook.contract.yaml --path runbooksWhat it exercises
Section titled “What it exercises”--contract (inline binding)--include / --exclude globs--contract/--path pairing
Continue
Section titled “Continue”- Previous: Findings as JSON or SARIF
- Next: Scaffold the config with init
- Group: Validate from the terminal · All examples
- Reference: CLI reference