One function call turns your live REPL into a navigable web app. Namespaces, databases, Java objects, files — anything with structure becomes browsable. No frontend code, no build step, no deployment.
The simplest possible agent: expose (all-ns) as a
navigable page — click into any namespace to see its public vars,
arglists and docstrings. Install
Clojure 1.12+
(brew install clojure on macOS), start a REPL, and paste one line at a time:
;; Start a REPL with snapshot updates enabled
$ clj -Sdeps '{:mvn/repos {"clojars" {:url "https://repo.clojars.org/" :snapshots {:update :always}}}}'
Clojure 1.12.3
(require '[clojure.repl.deps :refer [add-libs]])
(add-libs '{com.hyperfiddle/hyperfiddle-agent {:mvn/version "v0-alpha-SNAPSHOT"}})
(require '[hyperfiddle.navigator-agent :as agent]
'[hyperfiddle.hfql2 :refer [hfql]])
(def sitemap {`all-ns (hfql {(all-ns) {* [ns-name ns-publics]}})})
(agent/connect! "wss://index.clojure.net/agent" sitemap)
;; => {:agent-id "a1b2c3d4" :agent-url "https://a1b2c3d4.clojure.net"}
The result: a navigable, sortable table of every loaded namespace — live, from your REPL, in like 5 lines of code. Live example: demo.clojure.net/clojure.core$all-ns.
Three moving parts: a dependency, a sitemap describing what to show, and a single function call to go live.
*db* via the third
argument to connect! — dependency-injected bindings,
so the agent only sees what you provide:
;; 1. Write your query — an ordinary Clojure function
(require '[clojure.repl.deps :refer [add-libs]])
(add-libs '{com.datomic/peer {:mvn/version "1.0.7187"}})
(require '[datomic.api :as d])
(def ^:dynamic *db*)
(def conn (do (d/create-database "datomic:mem://scratch") (d/connect "datomic:mem://scratch")))
;; (def conn (d/connect "datomic:dev://localhost:4334/mbrainz-1968-1973"))
(defn schema []
(d/q '[:find [(pull ?e [:db/ident
{:db/valueType [:db/ident]}
{:db/cardinality [:db/ident]}
*]) ...]
:where [?e :db/valueType _]] *db*))
;; 2. Add one dependency, define what columns to show
(add-libs '{com.hyperfiddle/hyperfiddle-agent {:mvn/version "v0-alpha-SNAPSHOT"}})
(require '[hyperfiddle.navigator-agent :as agent] '[hyperfiddle.hfql2 :refer [hfql]])
(def sitemap {`schema (hfql {(schema) {* [:db/ident
{:db/valueType :db/ident}
{:db/cardinality :db/ident}]}})})
;; 3. Connect — get a public URL instantly
(agent/connect! "wss://index.clojure.net/agent" sitemap
(fn [] {#'*db* (d/db conn)}))
Live demo (MusicBrainz): datomic-browser.clojure.net
Everything above works the same in production. Embed the agent in your deployed services, control what’s exposed, and give your team a web UI for production data.
Anything you can write a Clojure function for becomes browsable. Databases, JVM internals, network APIs, the filesystem — here are some sitemaps that already exist:
Browse all demos at: https://demo.clojure.net/.