How does this differ from htmx?

htmx is a javascript library that reads configuration from html attributes and sends http requests based on that configuration

hyperclay is a web server that stores and serves versions of html files

htmx requires a server. This enables a single html file to modify itself.

But it needs a server too?

No, this need a server too. Everything that saves changes to non local (shareable) locations needs some kind of a server. The best solutions are of course when OP hosts the server and you pay for it /s