Save a web page locally and retrieve it later by name. HTML is converted to Markdown by default.
- Fetch a page from its web URL and give it a name to reuse later.
- Keep the original content and skip Markdown conversion with
--skip-markdownify. - Check saved entries with
showor refresh a page with--refetch.
Install uv. The script specifies its own dependencies and requires Python 3.12 or later.
uv run fetch_cache_web.py get https://example.com --name exampleget prints the path to the saved file. Use the same name to get that path again. After 30 days, get fetches the URL again by default.
uv run fetch_cache_web.py get example
uv run fetch_cache_web.py show example
uv run fetch_cache_web.py showFetch again immediately or change when the cached page expires.
uv run fetch_cache_web.py get example --refetch
uv run fetch_cache_web.py get example --expiry-days 7Save the original content in a separate cache.
uv run fetch_cache_web.py get https://example.com --name example --skip-markdownify --cache-dir .cache/raw
uv run fetch_cache_web.py show --cache-dir .cache/rawRun uv run fetch_cache_web.py get --help or uv run fetch_cache_web.py show --help for more options.
Copy the fetch-cache-web folder into your agent's skills directory.