Skip to main content
HfBucketsVFS mounts a Hugging Face Bucket at a prefix such as /hf/. The TypeScript backend mirrors the Python one and returns identical results. For credential setup, see HF Buckets Setup.
Node only. The backend uses the native opendal binding, which does not run in the browser.

Node

HfBucketsVFS takes the bucket in namespace/bucket-name form plus an optional access token. Both READ and WRITE modes are supported out of the box.

Config

Fields marked secret are redacted in snapshots.

VFS.md

The VFS.md an agent reads with HF Buckets mounted at /<path>.

Virtual Filesystem

Supported Unix Commands for VFS

Unix commands work on each path as on a local filesystem, as far as the path supports them:

Limitations of Unix Commands for VFS

Where a path differs from a local filesystem:Run man <cmd> or <cmd> --help for one command’s usage.
Bucket object keys map to virtual paths under the mount prefix: virtual /hf/data/file.txt maps to bucket key data/file.txt.

Cache

Directory listings are cached with indexTtl = 600 (10 minutes) and populate file-size/type entries that stat reads via a fast path, so a readdir followed by per-entry stat calls (what ls and most shell commands trigger) costs one HTTP request instead of N. A configured index: replaces this lifetime with its own ttl, and the mount’s ttl: caps it.

Integration

What Hugging Face buckets answers through its own API, so fewer files are read. Integration explains each command.

Shell Commands

The same command set as the Python backend, operating on real file content. Large files benefit from range reads to avoid downloading entire objects.

Read Commands

Text Processing

awk, sed, tr, sort, uniq, cut, join, paste, column, fold, expand, unexpand, fmt, rev, tac, look, shuf, tsort, comm, cmp, diff, iconv, base64.

File Operations

rm (-r removes a subtree), mkdir (a no-op: a directory exists only while it holds a file), touch, mktemp, split, csplit.

Path Utilities

ls, basename, dirname, realpath, readlink.

Compression

gzip, gunzip, zcat, zgrep, tar, zip, unzip.