Files
jackwener__opencli/docs/adapters/browser/hf.md
jakevin 55088bbb28 feat: 13 read adapters across 5 new sites + 4 extensions (round 3) (#1346)
New sites (8 commands):
- npm    : search / package / downloads (registry.npmjs.org + api.npmjs.org)
- pypi   : package / downloads (pypi.org + pypistats.org)
- crates : search / crate (crates.io)
- mdn    : search (developer.mozilla.org)
- nvd    : cve (services.nvd.nist.gov)

Extensions (5 commands; +1 dblp/author surfaced in index):
- hf            : spaces (Hugging Face Spaces by likes / created_at / last_modified)
- dblp          : venue (search dblp's venue registry by acronym/topic)
- coingecko     : derivatives (perpetual / futures markets, 24h volume)
- stackoverflow : related (related questions for a given question id)

All commands hit public unauthenticated endpoints (Strategy.PUBLIC, browser:false),
typed-fail-fast on bad inputs (no silent fallback / clamp), and round-trip listing
ids into their detail commands where applicable.

Audits (all green vs baseline):
- typed-error-lint        : 196 = 196 baseline, no new
- silent-column-drop      : 103 = 103 baseline, no new
- listing-id-pairing      : 13 advisory (was 12; +1 = dblp/venue with no
                            corresponding venue-detail command)

Doc coverage : 120/120 adapter dirs documented (+5 new doc pages, +4 updated)
Manifest     : 722 entries (was 709; +13 commands)

Live verified:
- npm search react / npm package react / npm downloads react --period last-week
- npm downloads react --period 2025-01-01:2025-01-05
- pypi package requests / pypi downloads requests --period recent / overall
- crates search tokio / crates crate serde
- mdn search fetch
- nvd cve CVE-2021-44228
- hf spaces --limit 3
- dblp venue ICLR
- coingecko derivatives --limit 3
- stackoverflow related 79935770 --limit 3
- typed-error sanity: invalid CVE id, bad npm name, bad --period
2026-05-06 13:14:41 +08:00

3.4 KiB
Raw Permalink Blame History

Hugging Face

Mode: 🌐 Public · Domain: huggingface.co

Commands

Command Description
opencli hf top Top upvoted Hugging Face papers
opencli hf paper <arxivId> Single paper detail (title / authors / summary / AI keywords / upvotes)
opencli hf models Top Hugging Face models (downloads / likes / trending / freshness)
opencli hf datasets Top Hugging Face datasets
opencli hf spaces Top Hugging Face Spaces (gradio / streamlit / docker / static demos)

Usage Examples

# Today's top papers
opencli hf top --limit 10

# Single paper detail by arXiv id (mirrors HF's paper page)
opencli hf paper 1706.03762         # Attention Is All You Need
opencli hf paper 2005.14165         # GPT-3 paper

# All papers (no limit)
opencli hf top --all

# Specific date
opencli hf top --date 2025-03-01

# Weekly/monthly top papers
opencli hf top --period weekly
opencli hf top --period monthly

# Top models by downloads (default)
opencli hf models --limit 20

# Top text-generation models with name filter
opencli hf models --pipeline text-generation --search llama --sort likes --limit 10

# Top datasets by likes
opencli hf datasets --sort likes --limit 10

# Top Spaces by likes
opencli hf spaces --limit 20

# Filter Spaces by SDK
opencli hf spaces --sdk gradio --search llm --limit 10

# JSON output
opencli hf top -f json

top Options

Option Description
--limit Number of papers (default: 20)
--all Return all papers, ignoring limit
--date Date in YYYY-MM-DD format (defaults to most recent)
--period Time period: daily, weekly, or monthly (default: daily)

Returns paper listing rows with rank, id, title, upvotes, authors. The id value round-trips into opencli hf paper <id>.

paper Options

Option Description
id (positional) arXiv id (e.g. 1706.03762, optionally with version suffix v3)

Returns one row with id, title, authors, publishedAt, upvotes, aiKeywords, summary, aiSummary, url. The summary is the original arXiv abstract; aiSummary and aiKeywords are HF's AI-generated metadata (may be empty for older or non-curated papers). Returns EmptyResultError if HF has no paper page for that id.

models Options

Option Description
--sort downloads / likes / trending / created_at / last_modified (default: downloads)
--search Optional name/owner substring filter (e.g. llama, mistralai/)
--pipeline Pipeline tag filter (e.g. text-generation, image-classification)
--limit Max models (1–100, default: 20)

datasets Options

Option Description
--sort Same set as models (default: downloads)
--search Optional name/owner substring filter
--limit Max datasets (1–100, default: 20)

spaces Options

Option Description
--sort likes / created_at / last_modified (default: likes; HF doesn't accept trending for spaces)
--search Optional name/owner substring filter (e.g. stability, openai/)
--sdk SDK filter: gradio / streamlit / docker / static
--limit Max spaces (1–100, default: 20)

Returns rows with rank, id, author, sdk, likes, tags, lastModified, url.

Prerequisites

  • No browser required — uses public Hugging Face API