kage
Shadow any website for offline viewing, with the JavaScript stripped out
What is it?
What it is
kage is a command‑line tool that clones a website into an offline, script‑free mirror by rendering pages in headless Chrome, snapshotting the DOM, removing all JavaScript, and saving CSS, images, and fonts to local files.
Why it exists
It exists to give users a truly offline copy of a web page that works without network requests, tracking, or broken scripts—unlike a browser’s "Save As" which often leaves dead spinners or phone‑home code.
Who should use it
DevelopersResearchersArchivistsPrivacy-conscious usersAnyone needing offline, script-free website copies
Who should avoid it
Users who rely on JavaScript-heavy sites for functionalityThose who need real-time updatesUsers unable to install Chrome/ChromiumThose looking for a simple 'Save As' solution without CLI
How it works
A quick walkthrough in plain English
How kage works
Step 1 of 3
You interact with it
Open kage, send a request, or connect it to your stack.
Features
Advantages
- No tracking, analytics, or network calls in the offline copy
- Pages look exactly as they did when rendered, with all CSS, images, fonts preserved
- Content remains usable years later even if original site disappears
- Easy to share: single ZIM file or executable
- Works without internet after cloning
- Respects site owners via robots.txt
- Resumable and incremental updates
- Uses real browser rendering, so SPA content is captured correctly
- Open standard ZIM format compatible with Kiwix ecosystem
- No need for external dependencies when using packed binary (except OS)
- MIT licensed, open source
Disadvantages
- Requires Chrome/Chromium installed on host (or use container)
- Binary packs are relatively large (~13 MB base + site)
- Cloning can be slower due to headless Chrome rendering
- ZIM packs lack full-text search index (limited in-reader search)
- May struggle with sites that rely heavily on post‑load JavaScript for essential content (though JS is stripped after render)
- Windows GUI variant needed to avoid console window; standard binary shows console
- Limited to static snapshot; no interactivity after JS removal
Installation
docker
docker run --rm -v "$PWD/out:/out" ghcr.io/tamnd/kage clone paulgraham.com
native
go install github.com/tamnd/kage/cmd/kage@latest
FAQ
How do I install kage on my system?
You can install kage via Go with `go install github.com/tamnd/kage/cmd/kage@latest`, use prebuilt binaries from the releases page, or install via package managers: Homebrew (`brew install --cask tamnd/tap/kage`), Scoop (`scoop bucket add tamnd https://github.com/tamnd/scoop-bucket && scoop install kage`), apt (Debian/Ubuntu) or dnf (Fedora/RHEL) using the provided repository setup, or run the Docker image which bundles Chromium.
What does the `kage clone` command do and what are its most useful flags?
`kage clone <url>` renders the target site in headless Chrome, waits for it to settle, snapshots the DOM, strips all JavaScript, and downloads CSS, images, and fonts to a local folder under `$HOME/data/kage/<host>/`. Useful flags include `--max-pages` to limit pages, `--max-depth` to limit crawl depth, `--scope-prefix` to restrict to a path prefix, `--subdomains` to include subdomains, `--scroll` to trigger lazy-loaded images, `--workers` to set parallel renderers, `--refresh` to re‑render existing pages, and `--force` to wipe and start fresh.
How can I view a cloned site offline?
After cloning, run `kage serve <path-to-cloned-folder>` to start a tiny static file server (default http://127.0.0.1:8800). Open that URL in any browser to browse the script‑free mirror exactly as it appeared when cloned.
What are the packing options available with `kage pack` and when should I use each?
`kage pack` can produce three artifacts: a ZIM archive (`kage pack <mirror>` → `<host>.zim`) for portable, indexed offline reading compatible with Kiwix; a self‑contained binary (`--format binary -o <name>`) that bundles kage and the archive into a single executable needing no dependencies; and a double‑click desktop app (`--app`) that wraps the binary in a macOS .app, Linux AppImage/AppDir, or Windows GUI exe for a seamless launch. Use ZIM for maximal portability and compatibility, the binary when you want a single executable, and the app when you prefer a native double‑click experience without a terminal.
Does kage respect robots.txt and crawl‑delay settings, and how can I override them?
Yes. By default kage reads the target site’s robots.txt and obeys any Crawl‑delay directives. To ignore robots.txt use `--no-robots` (not recommended). To override a Crawl‑delay value, set `--crawl-delay <duration>` (e.g., `--crawl-delay 2s`). kage also honors the `--out` directory for where mirrors are stored and is idempotent, saving progress on interruption and resuming later.
Featured in Videos
YouTube tutorials and walkthroughs for kage
Alternatives
Similar projects ranked by category, topics, and text overlap.