Aller au contenu
login
arrow_backRetour aux issues
fu351/Doberman-Core #441

cli: add `--quiet` to `doberman demo` so it can run as a CI smoke test

ecoDébutant enhancement good first issue level-3

descriptionDescription

`doberman demo` runs the scripted attack reel through the real engine, prints one narrated line per scenario, a summary table, and exits non-zero when a scenario's verdict doesn't match (`src/doberman/cli/main.py:1430` onward). That makes it a useful "is the engine alive" check in a pipeline, except there's no way to silence the narration: its options are `--path`, `--mode`, `--fast`. `scan` already has the flag this needs (`--quiet`, `:248-253`: "Suppress human-readable stdout... useful for CI"). **What to do** 1. Add `quiet: bool = typer.Option(False, "--quiet", "-q", help=...)` to `demo`, copied from `scan`'s option. 2. When set, skip the banner, the per-scenario `on_scenario` echo and the closing "Run `doberman dash`" hint; keep the summary table (or a one-line "N/N scenarios matched") and the exit code exactly as they are. 3. New `tests/unit/test_cli_demo_quiet.py`: `demo --fast --quiet` prints far fewer lines than `demo --fast`, and the exit code is identical. Display only; the scenarios and the engine path are untouched.
codeOuvre sur GitHub