# summary

Extract the content of an HTML file to Markdown.

# description

Reads an HTML file and converts it to Markdown, mapping headings, lists, tables, and inline emphasis. Use this to turn a large HTML reference into a greppable `.md` file instead of trying to `Read` the markup whole (which blows the context window). Output goes to a file with `--out`, or to stdout when `--out` is omitted.

# examples

- `sf setup-agents extract html-to-markdown --input page.html --out page.md`
- `sf setup-agents extract html-to-markdown -i page.html`

# flags.input.summary

Path to an HTML file to extract.

# flags.out.summary

Path to write the Markdown output. When omitted, the result is printed to stdout.

# info.wrote

Wrote %s (%d bytes).

# error.read

Could not read %s: %s

# error.empty

%s produced no Markdown content. The file may be empty or contain no extractable text.
