cull / html → markdown
cull turns a web page — or just the
part of it you care about — into clean Markdown with one flag:
--md. It fetches URLs itself, resolves relative links against
the page, converts tables to GFM, keeps code blocks fenced, and ships as a
single small static binary.
$ cull --md https://example.com/ # Example Domain This domain is for use in documentation examples without needing permission. Avoid use in operations. [Learn more](https://iana.org/domains/example)
No selector means the whole document. Links come out absolute — cull
resolves them against the URL you fetched (or against --base
when reading from a file or stdin).
The usual problem with page-to-Markdown converters: you get the nav, the
cookie banner, and the footer too. cull is selector-first — give it a CSS
selector and only those nodes are converted. Add -r to remove
sub-parts you don't want. A real example, output verbatim:
$ cull --md '.post' -r '.publish-date-author' https://blog.rust-lang.org/2026/07/16/Rust-1.97.1/ The Rust team has published a new point release of Rust, 1.97.1. … If you have a previous version of Rust installed via rustup, getting Rust 1.97.1 is as easy as: ``` rustup update stable ``` ## What's in 1.97.1 Rust 1.97.1 fixes a [miscompilation in an LLVM optimization](https://github.com/rust-lang/rust/issues/159035).
Headings, fenced code, blockquotes, nested lists, images, and links all survive the round-trip; tables become GitHub-flavored Markdown tables.
When there's no tidy content container, convert the whole page and cut
the noise instead — -r takes any CSS selector and is
repeatable:
$ cull --md -r 'header, nav, footer, script, style' "$URL"
Markdown is the format LLMs read best per token: markup overhead is tiny
compared to raw HTML, and structure (headings, tables, code) is preserved.
This makes cull --md a natural front-end for CLI model tools:
$ cull article --md -r 'nav, footer' "$URL" | llm "summarize this page in three bullets"
More patterns (batch conversion, cron digests, scraping pipelines) are in the cookbook.
pandoc is the universal document converter, and if you need HTML → many-formats fidelity it's the right tool. cull aims at the scraping/pipeline niche instead:
| pandoc | cull | |
|---|---|---|
| Convert only a CSS-selected region | — | cull '.post' --md |
| Remove nodes before converting | — | -r 'nav, footer' (repeatable) |
| Default Markdown dialect | pandoc-flavored (-t gfm available) | GitHub-flavored |
| Install footprint | full converter suite (dozens of formats) | single ~2 MB static binary |
| Also does | every other document format | selection → JSON / CSV / text (see cull) |
Honest limitation: cull has no automatic "reader mode" content detection. You point it at the right selector yourself — which is precisely what makes the output predictable and scriptable.
# macOS / Linux (Homebrew) $ brew install rashida-thorne/cull/cull # Rust $ cargo install cull # or: cargo binstall cull # Anywhere (prebuilt binary) $ curl -fsSL https://raw.githubusercontent.com/rashida-thorne/cull/main/scripts/install.sh | sh
All options (Scoop, Nix, Docker, mise) are on the
main page. Or try it without installing anything in the
browser playground — the real engine compiled
to WebAssembly, including --md.