Asset Hunter

Run it locally

Serve the catalogue locally, publish new possibilities into it with a hunt, and run the checks that tell you whether either worked.

The catalogue and the hunt engine are two systems with a documented boundary, and this is the whole of the local loop. The engine crawls, reads licences and groups candidates into possibilities; the catalogue decides what the public sees.

Serve the catalogue

Node 22 or newer, then:

npm install
npm run dev

The wall is on port 4321 and the EmDash admin at /_emdash/admin. The first run applies pending migrations and the seed schema. A fresh database has no content until you ask for the demo catalogue, which is one more request:

curl localhost:4321/_emdash/api/setup/dev-bypass

That endpoint creates a local development admin and refuses to run outside the dev server. It is not how production is set up, and it is not an authentication path anyone can reach in public.

Publish new possibilities

A hunt takes a brief, crawls permitted sources, reads the licence beside each asset rather than the repository's, and groups candidates into possibilities. It writes a payload to disk; it does not write to the CMS. The four commands below crawl, reconcile into the catalogue, and then prove the catalogue matches the payload. Without a GitHub token the search API allows ten requests a minute, which is enough to try it and slow enough to be unpleasant; gh auth token lifts it.

export GITHUB_TOKEN=$(gh auth token)
npm run hunt -- sfx.json
npm run hunt:sync
npm run hunt:verify

What a hunt does not do

A crawl never decides what the public catalogue shows. Machine entries arrive as drafts at the bottom of the wall, and promoting one is a person's decision made in the admin. The check below fails if a draft has leaked onto the public wall.

npm run doctor

Check it honestly

The gate for a change needs no server: it typechecks, validates the seed, measures every plate and runs the tests. The full gate adds the four checks that can only be made against a running site — that the catalogue really is served by EmDash, that an edit made in the admin reaches a reader and is then put back, that the masthead really is the CMS menu, and the visual pass. All of it is local: there are no hosted CI checks, and none are planned.

npm run verify
npm run verify:full

The catalogue is also a read-only JSON contract at /api/catalogue.json, so a script can ask it a question without scraping HTML. It serves published entries only, needs no token, and keeps null distinct from zero.

npm run catalogue -- summary
npm run catalogue -- search "seam"
npm run catalogue -- rights