sincecutoff.com
← all changes

hf CLI accepts Hugging Face web URLs

Introduced 2026-06-05 · score 0.97

HOW TO USE IT

When a Hub file is identified by a Hugging Face web URL, pass that URL to `parse_hf_uri` or use it as `SRC` in `hf cp` to read the file.

from huggingface_hub import parse_hf_uri uri = parse_hf_uri("https://huggingface.co/datasets/<namespace>/<name>/blob/<revision>/<path>")
hf cp https://huggingface.co/nvidia/LocateAnything-3B/blob/main/config.json - | jq '.architectures'

WHY THIS HELPS

When reading a Hub file during repository work, pass its Hugging Face web URL directly to the CLI or library parser.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.18.0
  • parse_hf_uri(uri) — `uri` (required): HF URI or Hugging Face URL to parse; returns an `HfUri`.
  • parse_hf_uri(uri, endpoint=...) — `endpoint`: Custom Hub base URL; recognizes web URLs on that endpoint.
  • hf cp — `SRC` (required): Source file; docs list local files, `hf://` URIs, or `-` for stdin. Release-note example uses a Hugging Face web URL.
  • hf cp — `[DST]`: Destination path or `-` for stdout.
  • hf cp — `--token TEXT`: User Access Token.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card