Part of #338. Depends on gap #1 (per-parameter flags).
Today
System.CommandLine's default Option<bool> is binary: presence means true, absence means false. There's no way to express "explicitly false" — which matters whenever a generated flag corresponds to a nullable: true boolean in the schema:
null (absent) → don't override the loaded base body
true → set field true
false → set field false
Without tri-state, --only-main-content (which means "yes") can't be distinguished from "omit" vs. "explicitly disable".
Target
firecrawl scrape <url> --only-main-content # → true
firecrawl scrape <url> --only-main-content false # → false
firecrawl scrape <url> # → null (don't override)
firecrawl scrape <url> --input base.json --only-main-content false # → override base to false
Proposed approach
- Emit
Option<bool?> with custom parser for properties typed bool? (or bool with nullable: true):
- parser accepts: nothing after the flag →
true; true/yes/1 → true; false/no/0 → false; anything else → parse error.
- Helper factory in
CliRuntime: CreateNullableBoolOption(string name, string? description) to keep the per-property emission concise.
- Help text: "true/false; presence alone implies true; omit to inherit".
- Plain
bool properties (non-nullable, default false) stay as Option<bool> — no behavior change.
Acceptance criteria
- Generated commands for nullable-bool body fields support all three states above.
- Snapshot test covers a spec with a nullable boolean property.
- Firecrawl
scrape --only-main-content false works end-to-end after regen.
Part of #338. Depends on gap #1 (per-parameter flags).
Today
System.CommandLine's defaultOption<bool>is binary: presence means true, absence means false. There's no way to express "explicitly false" — which matters whenever a generated flag corresponds to anullable: trueboolean in the schema:null(absent) → don't override the loaded base bodytrue→ set field truefalse→ set field falseWithout tri-state,
--only-main-content(which means "yes") can't be distinguished from "omit" vs. "explicitly disable".Target
Proposed approach
Option<bool?>with custom parser for properties typedbool?(orboolwithnullable: true):true;true/yes/1→true;false/no/0→false; anything else → parse error.CliRuntime:CreateNullableBoolOption(string name, string? description)to keep the per-property emission concise.boolproperties (non-nullable, default false) stay asOption<bool>— no behavior change.Acceptance criteria
scrape --only-main-content falseworks end-to-end after regen.