cat for the web. Render web pages and markdown right in your terminal — with real inline images, not just URLs.
webcat fetches a page, strips away the nav/ads/clutter, renders the text beautifully, and draws the images in place using your terminal's graphics protocol (kitty / sixel / iTerm2), with a Unicode-block fallback for plain terminals.
webcat https://github.com/alibaba/page-agentcurl | less gives you HTML soup. Reader-mode tools give you text but drop the images. webcat gives you the clean article and the pictures, in document order, without leaving the terminal. Great over SSH, on a phone (Termux), or anywhere a browser is overkill.
webcat is a small orchestrator over three excellent tools:
| Stage | Tool | Job |
|---|---|---|
| Fetch & clean | defuddle | URL → clean markdown |
| Text | glow | render the markdown |
| Images | chafa | draw each image inline |
It walks the markdown in order, sending text to glow and image URLs to chafa, so everything lands where it belongs.
webcat has two rendering engines, selectable with --engine:
stitch(default) — glow for text + chafa for images, stitched together. Most compatible: chafa auto-detects the widest range of terminal graphics protocols. Only needs glow and chafa.mdcat— if mdcat is installed, it renders text and inline images natively in a single pass. webcat finds it onPATHor in~/.cargo/bin. Note: mdcat supports fewer terminals than chafa, so images may not appear everywhere.auto— use mdcat if present, else fall back to stitch.
If images don't render with one engine, try the other: --engine stitch is the safe bet.
git clone https://github.com/MuscleGear5/webcat
cd webcat
./install.shThe installer detects your platform (Termux, Debian/Ubuntu, Fedora, Arch, macOS), installs the dependencies, and drops webcat into ~/.local/bin.
Install the deps yourself, then copy the script:
# deps (pick your platform)
pkg install glow chafa # Termux
brew install glow chafa # macOS
sudo apt install glow chafa # Debian/Ubuntu
npm install -g defuddle # all platforms (needed for URLs)
install -m 755 webcat ~/.local/bin/webcatTermux note: npm CLIs ship a
#!/usr/bin/env nodeshebang, but Termux has no/usr/bin/env. The installer runstermux-fix-shebangon defuddle automatically; if you install by hand, run it yourself.
webcat <url> # fetch a web page, render text + images
webcat <file.md> # render a local markdown file
cat file.md | webcat # render markdown from stdin
webcat <url> -w 80 # set render width (columns)
webcat <url> --img-height 10 # smaller images (default 14 rows)
webcat <url> --no-images # text only
webcat --helpImages render at full fidelity in terminals that speak a graphics protocol — kitty, sixel, iTerm2, and modern Termux builds. chafa auto-detects this. In a plain terminal you still get a recognizable Unicode-block rendering.
Smart sizing by pixel dimensions: images smaller than --img-threshold
(default 200px in both dimensions — icons, badges) keep their true natural
size and are never enlarged. Larger content images scale up to fill the
width so they aren't tiny on high-DPI screens, capped at --img-height rows
(default 24). Width is always capped to your terminal so nothing overflows.
All image types render, including SVG (e.g. shields.io badges, which
webcat rasterizes to PNG via rsvg-convert/ImageMagick), data: URIs, and
local image files referenced from a local markdown file.
[webcat: skipped image — access denied ...]means the server refused to serve that image (HTTP 401/403). webcat sends aReferer/Originmatching the page, which satisfies most hotlink protection — but some CDNs use signed, expiring URLs tied to the original page session, which can't be fetched separately by anything. Those are skipped; the rest of the page still renders.
- python3 — runs webcat (no third-party Python packages)
- glow — markdown text rendering
- chafa — terminal image rendering
- defuddle — URL → markdown (only needed for URLs; local
.mdworks without it) - librsvg (
rsvg-convert) or ImageMagick — optional; rasterizes SVG images so they render
MIT — see LICENSE.
Stands entirely on the shoulders of defuddle, glow, and chafa.