Files
kage/docs/content/getting-started/quick-start.md
T
wehub-resource-sync 9c9576b5b9
ci / test (macos-latest) (push) Has been cancelled
ci / test (ubuntu-latest) (push) Has been cancelled
ci / lint (push) Has been cancelled
ci / govulncheck (push) Has been cancelled
ci / tidy (push) Has been cancelled
ci / webview (push) Has been cancelled
ci / windows-gui (push) Has been cancelled
release / check (push) Has been cancelled
release / release (push) Has been cancelled
Docs / build (push) Has been cancelled
Docs / deploy-pages (push) Has been cancelled
Docs / deploy-cloudflare (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-14 10:24:05 +08:00

1.8 KiB

title, description, weight
title description weight
Quick start From an empty terminal to a self-contained offline mirror you can click through. 30

This walks the core loop: clone a small site, look at what landed on disk, and serve it back so links and assets resolve the way they would on a real host.

1. Clone a site

kage clone example.com

kage launches headless Chrome, renders the home page, strips its scripts, and follows in-scope links breadth-first. A live counter shows pages, assets, and errors as it goes; the final summary tells you where the mirror landed.

kage cloning https://example.com
done $HOME/data/kage/example.com
  pages 12   assets 38
  open kage serve $HOME/data/kage/example.com

2. Look at what landed

ls $HOME/data/kage/example.com
index.html        # the home page, scripts stripped
about/index.html  # /about
_kage/            # localised assets and crawl state

Open index.html directly in a browser and it renders offline, with no network. Grep it and you will find no <script>, no onclick, no javascript:.

3. Serve it back

Opening files directly works, but some sites use root-relative links. kage serve runs a local static server so everything resolves exactly as it would live:

kage serve $HOME/data/kage/example.com
# open http://127.0.0.1:8800

4. Scope a bigger crawl

For a large site, bound the crawl so it does not run away:

# Just the docs section, three levels deep, at most 200 pages
kage clone example.com --scope-prefix /docs --max-depth 3 --max-pages 200

If you stop a run with Ctrl-C, kage saves its state. Run the same command again and it resumes, skipping the pages it already wrote.

Where to go next

  • The guides cover scoping, serving, and resuming in depth.
  • The CLI reference lists every flag.