perch — publish a website
perch publishes a folder as a website on Swarm. deploy uploads it as a
browsable Swarm collection (a mantaray manifest with an index document, so
bzz/<ref>/ renders your site) and prints the reference; with a feed it
gives a stable URL that survives re-deploys — "Netlify for Swarm."
# one-shot (the URL changes each deploy)
perch deploy ./site --stamp <batch>
# stable URL across re-deploys
perch keygen
perch deploy ./site --key <hex> -t <topic> --stamp <batch>
# -> open <gateway>/bzz/<handle>/ and re-deploy to update it
--index sets the default document (default index.html); nested assets
resolve normally.
Use cases
- Static sites & docs hosted decentrally (censorship-resistant).
- Dapp frontends — pin your UI to Swarm with a durable address.
- One-command publishing of a build output (
./dist,./public).
How it works
deploy is two scout calls: upload the directory as a native Swarm
collection, then optionally point a feed at that manifest so one address
always serves the latest deploy.