Files
Duc-Tam Nguyen e6afa91e09 Add the clone engine, CLI, tests, CI, and docs
kage renders every page in headless Chrome, snapshots the final
DOM, strips all JavaScript, and localises CSS, images, and fonts
so a site can be browsed offline as a plain folder of files.

The engine is split into small packages:

  urlx      deterministic URL to local-path mapping and scope rules
  sanitize  remove scripts, on* handlers, and javascript: URLs
  asset     rewrite HTML and CSS references, download assets
  browser   headless Chrome pool over the DevTools protocol
  robots    robots.txt matcher
  clone     the orchestrator: a polite resumable breadth-first crawl

The cli package wires a cobra and fang command surface with two
commands, clone and serve. Every pure package has table tests; the
browser and clone packages add Chrome-driven end-to-end tests that
skip when no browser is present or under -short.

CI runs gofmt, vet, build, race tests, golangci-lint, govulncheck,
and a tidy check on Linux and macOS. A goreleaser config fans one
tag out to archives, deb/rpm/apk, a Chromium-bundled GHCR image,
and the package managers. A tago docs site builds to Pages and
Cloudflare.
2026-06-14 18:22:25 +07:00

1.6 KiB

title, description, weight
title description weight
Installation Install kage from Go, Homebrew, a release archive, a Linux package, or the container image, and point it at a browser. 20

kage is a single binary. Pick whichever channel suits you.

Go

go install github.com/tamnd/kage/cmd/kage@latest

Homebrew

brew install tamnd/tap/kage

Release archives and Linux packages

Every release attaches tar.gz archives (and a .zip for Windows) for Linux, macOS, Windows, and FreeBSD, plus .deb, .rpm, and .apk packages and a checksums.txt with a cosign signature. Download the one for your platform, extract kage, and put it on your PATH.

# Debian/Ubuntu
sudo dpkg -i kage_*_linux_amd64.deb

# Fedora/RHEL
sudo rpm -i kage_*_linux_amd64.rpm

Container

The image bundles Chromium, so it needs nothing else:

docker run -v "$PWD/out:/out" ghcr.io/tamnd/kage clone example.com

The mirror lands in ./out/example.com/ on your host.

You need a browser

kage drives a real Chrome to render pages. Outside the container image, it needs Chrome or Chromium available on the machine. It looks for a system install automatically (Google Chrome on macOS and Windows, google-chrome/chromium on Linux). To use a specific binary:

kage clone example.com --chrome /path/to/chromium
# or
export KAGE_CHROME=/path/to/chromium

If no browser is found, kage's launcher can download a private copy of Chromium on first use.

Next: the quick start.