You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The goal is to read everything huggingface.co publishes and turn it into structured, linked data.
Two output planes: records (one shape per entity) and a graph (nodes and edges with stable hf:// URIs).
The API is the primary source and the rendered HTML is the fallback, so no field on a page is lost just because no endpoint returns it.
This issue is the checklist. It gets ticked as PRs land.
M0 foundations
Drop the scaffold: hf/hf.go and hf/domain.go and their tests
Point the domain at the real host, huggingface.co, with hf.co and www. as aliases
Meta envelope on every record: uri, url, kind, sources, fetchedAt, aliasOf
Extra map[string]json.RawMessage on every record, filled by a shared decoder
Gated three state decode: false, "auto", "manual"
StringList decode for card fields that are a scalar or a list
Time decode for the several timestamp shapes the hub sends
URI space: URI, SplitURI, composite ids for discussion, commit, ref, file, split
Classify for every input form: hf://, hub URL, arxiv URL, @handle, bare id
Locate for every kind
Client: auth from --token, HF_TOKEN, HUGGING_FACE_HUB_TOKEN, $HF_HOME/token
Client: shared pacer so N workers make one polite stream
Client: retry on 429 and 5xx, honour Retry-After, exponential backoff with jitter
Client: on disk response cache, long TTL for taxonomy, no expiry for sha pinned URLs
Cursor pagination over the Link header, stop on missing next rather than a short page
Status to exit code mapping: 2 usage, 3 no results, 4 auth, 5 rate limit, 6 not found, 7 unsupported, 8 network
Redirect detection so a legacy id fills aliasOf
M1 repositories
Repo base shared by model, dataset, space, kernel
Model with config, transformersInfo, safetensors, gguf, modelIndex, inference providers
EvalResult flattened one row per metric out of model-index
Dataset with promoted card fields, configs, datasetInfo
Space with runtime, hardware, replicas, domains
Kernel
Card front matter parse, universal plus model plus dataset plus space keys
Card parse failure is not fatal, record keeps going with cardError
hf model, hf dataset, hf space, hf kernel, hf get
Expand parameter sets per repo kind, verified against the server's own 400 error list
M2 lists and search
hf models, hf datasets, hf spaces, hf kernels with full cursor pagination
Filter sugar: --task, --library, --language, --license, --sdk all folding into filter=
Rewrite hf-cli into a full Hugging Face discovery tool
Spec:
~/notes/Spec/3001/(00 overview, 01 surfaces, 02 html, 03 model, 04 graph, 05 commands, 06 implementation).The goal is to read everything huggingface.co publishes and turn it into structured, linked data.
Two output planes: records (one shape per entity) and a graph (nodes and edges with stable
hf://URIs).The API is the primary source and the rendered HTML is the fallback, so no field on a page is lost just because no endpoint returns it.
This issue is the checklist. It gets ticked as PRs land.
M0 foundations
hf/hf.goandhf/domain.goand their testshuggingface.co, withhf.coandwww.as aliasesMetaenvelope on every record:uri,url,kind,sources,fetchedAt,aliasOfExtra map[string]json.RawMessageon every record, filled by a shared decoderGatedthree state decode:false,"auto","manual"StringListdecode for card fields that are a scalar or a listTimedecode for the several timestamp shapes the hub sendsURI,SplitURI, composite ids for discussion, commit, ref, file, splitClassifyfor every input form:hf://, hub URL, arxiv URL,@handle, bare idLocatefor every kind--token,HF_TOKEN,HUGGING_FACE_HUB_TOKEN,$HF_HOME/tokenRetry-After, exponential backoff with jitterLinkheader, stop on missing next rather than a short pagealiasOfM1 repositories
Repobase shared by model, dataset, space, kernelModelwith config, transformersInfo, safetensors, gguf, modelIndex, inference providersEvalResultflattened one row per metric out ofmodel-indexDatasetwith promoted card fields, configs, datasetInfoSpacewith runtime, hardware, replicas, domainsKernelCardfront matter parse, universal plus model plus dataset plus space keyscardErrorhf model,hf dataset,hf space,hf kernel,hf getM2 lists and search
hf models,hf datasets,hf spaces,hf kernelswith full cursor pagination--task,--library,--language,--license,--sdkall folding intofilter=--author,--search,--sort,--direction,--gated,--fullhf searchacross every entity kind, with per type countshf trendinghf tags, the controlled vocabulary by typehf taskshf sitemapM3 namespaces, collections, papers
UserandOrgrecords with every count fieldUserRefname normalisation, theuserandnamekeys are the same valuehf user,hf org,hf nsCollectionwith slug split into namespace, short slug, object idCollectionItemincluding the curator note and the page onlynumParametershf collection,hf collections, including--itemreverse lookupPaperwith authors, daily feed fields, ai summary and keywordshf paper,hf papers,hf citationsM4 social
Postwith the token array content, rendered to a bodyBlogPostfrom the RSS indexDiscussionwith the event thread, comments, reactionshf posts,hf blogs,hf discussions,hf discussionhf likers,hf likes,hf followers,hf following,hf members>=10minimum limit on social endpoints handled, not passed through as an errorM4b the HTML plane
SVELTE_HYDRATERpayloads, no DOM parsePagerecord andhf page--deepon repo, user, org, collection, paper readsM5 repository contents
Ref,TreeEntry,Commit,LFSInfo,SecurityStatus, pickle import scanhf refs,hf tree,hf files,hf commits,hf pathshf catandhf readmeas byte output escape hatcheshf cardM6 dataset viewer
Validity,Split,Size,Row,Feature,ColumnStats,Histogram,ParquetShardhf valid,hf splits,hf size,hf rows,hf head,hf schema,hf statshf dsearch,hf filter,hf parquet,hf croissanthf rows x | headis cheapM7 the graph
NodeandEdgetypes with asourceon every edge: api, tag, card, page, derivedhf:derivesFromemitted alongside each of the four specific derivation predicateshf graph,hf edges,hf uri,hf urlM8 crawl
--followpredicate allow list, structural by default--depth,--max-nodes,--max-requests, clean stop at a budget with a report--dbM9 RDF and bulk
hf rdf,hf dump,hf exportTests
make fixturesto refresh them, not part ofmake testextrais empty, so a new upstream field fails loudly and names itselfDocs