# huggingface/huggingface.js

Use Hugging Face with JavaScript

Repository: https://github.com/huggingface/huggingface.js
Canonical: https://ross.abutalabs.com/products/huggingfacejs
Homepage: https://hf.co/docs/huggingface.js
Language: TypeScript
License: MIT
License Family: permissive
Topics: api-client, hub, inference, machine-learning, huggingface
Last push: 2026-08-26T14:59:03+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 93
- inputs: {"age_days": 1304, "days_push": 7, "days_rel": 7, "gap_med": 0, "n_releases_24m": 124}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2501, forks 852 (observed 2026-08-28T04:06:56.934619+00:00)

## What it is
A collection of TypeScript JavaScript libraries for interacting with the Hugging Face ecosystem, including Hub repository management, unified inference across providers, an MCP client, and GGUF parsing. It ships with full TS types and works in Node, Deno, and browsers.

## Use cases
- call hugging face inference api from javascript
- upload and download models from the hugging face hub in node
- run chat completions with llama models via inference providers
- generate images from text prompts in a js app
- build an ai agent with tool calling in typescript
- parse a remote gguf model file in the browser
- connect an mcp client to hugging face models

## When to choose
- you need typed JavaScript/TypeScript access to the Hugging Face Hub or Inference API
- you want a unified client across multiple inference providers (SambaNova, Replicate, Together, etc.)
- you're building JS apps or browser tools that interact with HF models, datasets, or Spaces

## When to avoid
- you need to run ML models locally in the browser (use Transformers.js instead)
- your stack is Python (use huggingface_hub or transformers)
- you need training or fine-tuning capabilities, which this client does not provide

## Facets
- artifact type: library
- maturity: active
- function: http-client, llm-inference, sdk, agent-framework, mcp, parser, templating
- domain: machine-learning, large-language-models, artificial-intelligence, developer-tools, apis
- platform: browser, bun, cross-platform
- tags: huggingface, api-client, inference-providers, model-hub, gguf, chat-completions, text-to-image, monorepo, nodejs, deno, typescript

## Member repositories
- huggingface/huggingface.js (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:56.934619+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:26:55.449373+00:00, confidence not recorded.
  - readme: https://github.com/huggingface/huggingface.js (fetched 2026-08-28T04:06:56.934619+00:00, sha c2e6ab1eb573)
  - homepage: https://hf.co/docs/huggingface.js (fetched 2026-08-29T10:09:16.421235+00:00, sha 61828b1a769b)
  - site_page: https://huggingface.co/docs (fetched 2026-08-29T10:09:16.423981+00:00, sha bdec26667b98)
  - site_page: https://huggingface.co/docs/huggingface.js/inference/README (fetched 2026-08-29T10:09:16.427820+00:00, sha 77106ccd9023)
  - site_page: https://huggingface.co/docs/huggingface.js/inference/modules (fetched 2026-08-29T10:09:16.430352+00:00, sha c4fcffbb4c0d)
  - site_page: https://huggingface.co/docs/huggingface.js/inference/classes/HfInference (fetched 2026-08-29T10:09:16.432619+00:00, sha 5ed795cbc4cb)
  - site_page: https://huggingface.co/docs/huggingface.js/inference/classes/InferenceClient (fetched 2026-08-29T10:09:16.434729+00:00, sha 4473d4aea311)
  - site_page: https://huggingface.co/docs/huggingface.js/inference/classes/InferenceClientEndpoint (fetched 2026-08-29T10:09:16.437139+00:00, sha 6174c42dd813)
  - site_page: https://huggingface.co/docs/huggingface.js/inference/classes/InferenceClientError (fetched 2026-08-29T10:09:16.439394+00:00, sha 1ee67ffada6c)
  - site_page: https://huggingface.co/pricing (fetched 2026-08-29T10:09:16.425871+00:00, sha de6b7a178be5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
