Defuddle
Purpose
Extract readable Markdown from ordinary web pages by stripping navigation, ads, and page chrome.
When to Use
- User provides a documentation page, article, or blog post URL.
- Clean Markdown extraction is preferable to noisy HTML.
- Web page clutter would waste context.
Do not use when:
- URL already points to Markdown.
- Response is an API payload.
- Page requires authentication the tool cannot satisfy.
Requirements
Required tool:
- Defuddle CLI
Check:
Get-Command defuddle -ErrorAction SilentlyContinue
defuddle --version
Install:
npm install -g defuddle
Rules:
- Do not assume Defuddle is installed.
- Do not auto-install without user approval.
- Show the install command before running it.
Inputs
- URL to parse
Workflow
- Check whether Defuddle CLI is available.
- If missing, tell the user before attempting extraction.
- Prefer Markdown output:
defuddle parse <url> --md
- Save to a file when needed:
defuddle parse <url> --md -o content.md
- For metadata-only needs, query a specific property:
defuddle parse <url> -p title
defuddle parse <url> -p description
defuddle parse <url> -p domain
Output
- Clean Markdown content
- Optional metadata fields
Verification
- Defuddle availability was checked first
- No extraction was claimed if the tool was missing
- Output is the article or documentation body, not page chrome
Failure Modes
- Page blocks automated access
- JavaScript-heavy page renders poorly
- Auth-gated content is inaccessible
Missing Dependency Behavior
If Defuddle is missing:
- Say extraction did not happen.
- Tell the user Defuddle CLI is required.
- Ask before installing it.
- Show the install command.
- Fall back to another web-reading method.