You can browse the web using command-line tools via the bash tool.
Quick fetch (raw HTML or API responses)
bash
curl -sL "https://example.com"
Use -sL to follow redirects silently. Add -o /dev/null -w "%{http_code}" to check status codes.
Rendered text (readable output)
bash
lynx -dump "https://example.com"
Or with w3m:
bash
w3m -dump "https://example.com"
These render HTML to plain text, making web pages readable without HTML tags.
Downloading files
bash
curl -sLO "https://example.com/file.tar.gz"
JSON APIs
bash
curl -s "https://api.example.com/data" | jq .
Use jq to parse and filter JSON responses.
Tips
- •Always use
curl -sL(silent + follow redirects) as the default. - •For long pages, pipe through
head -n 100to avoid excessive output. - •Use
lynx -dumpwhen you need to read a web page — it handles tables, links, and formatting. - •Check if
lynxorw3mare available withwhich lynx w3mbefore using them.