diff --git a/docs/source/_toctree.yml b/docs/source/_toctree.yml
index de564fc48a..bd2f7643bc 100644
--- a/docs/source/_toctree.yml
+++ b/docs/source/_toctree.yml
@@ -18,6 +18,8 @@
title: Repository
- local: guides/search
title: Search
+ - local: guides/hf_file_system
+ title: HfFileSystem
- local: guides/inference
title: Inference
- local: guides/community
@@ -30,6 +32,8 @@
title: Manage your Space
- local: guides/integrations
title: Integrate a library
+ - local: guides/webhooks_server
+ title: Webhooks server
- title: "Conceptual guides"
sections:
- local: concepts/git_vs_http
@@ -52,6 +56,8 @@
title: Mixins & serialization methods
- local: package_reference/inference_api
title: Inference API
+ - local: package_reference/hf_file_system
+ title: HfFileSystem
- local: package_reference/utilities
title: Utilities
- local: package_reference/community
@@ -62,3 +68,5 @@
title: Repo Cards and Repo Card Data
- local: package_reference/space_runtime
title: Space runtime
+ - local: package_reference/webhooks_server
+ title: Webhooks server
\ No newline at end of file
diff --git a/docs/source/guides/hf_file_system.mdx b/docs/source/guides/hf_file_system.mdx
new file mode 100644
index 0000000000..7d0d5581a3
--- /dev/null
+++ b/docs/source/guides/hf_file_system.mdx
@@ -0,0 +1,105 @@
+# Interact with the Hub through the Filesystem API
+
+In addition to the [`HfApi`], the `huggingface_hub` library provides [`HfFileSystem`], a pythonic [fsspec-compatible](https://filesystem-spec.readthedocs.io/en/latest/) file interface to the Hugging Face Hub. The [`HfFileSystem`] builds of top of the [`HfApi`] and offers typical filesystem style operations like `cp`, `mv`, `ls`, `du`, `glob`, `get_file`, and `put_file`.
+
+## Usage
+
+```python
+>>> from huggingface_hub import HfFileSystem
+>>> fs = HfFileSystem()
+
+>>> # List all files in a directory
+>>> fs.ls("datasets/my-username/my-dataset-repo/data", detail=False)
+['datasets/my-username/my-dataset-repo/data/train.csv', 'datasets/my-username/my-dataset-repo/data/test.csv']
+
+>>> # List all ".csv" files in a repo
+>>> fs.glob("datasets/my-username/my-dataset-repo/**.csv")
+['datasets/my-username/my-dataset-repo/data/train.csv', 'datasets/my-username/my-dataset-repo/data/test.csv']
+
+>>> # Read a remote file
+>>> with fs.open("datasets/my-username/my-dataset-repo/data/train.csv", "r") as f:
+... train_data = f.readlines()
+
+>>> # Read the content of a remote file as a string
+>>> train_data = fs.read_text("datasets/my-username/my-dataset-repo/data/train.csv", revision="dev")
+
+>>> # Write a remote file
+>>> with fs.open("datasets/my-username/my-dataset-repo/data/validation.csv", "w") as f:
+... f.write("text,label")
+... f.write("Fantastic movie!,good")
+```
+
+The optional `revision` argument can be passed to run an operation from a specific commit such as a branch, tag name, or a commit hash.
+
+Unlike Python's built-in `open`, `fsspec`'s `open` defaults to binary mode, `"rb"`. This means you must explicitly set mode as `"r"` for reading and `"w"` for writing in text mode. Appending to a file (modes `"a"` and `"ab"`) is not supported yet.
+
+## Integrations
+
+The [`HfFileSystem`] can be used with any library that integrates `fsspec`, provided the URL follows the scheme:
+
+```
+hf://[
+ How to interact with the Hub through a convenient interface that mimics Python's file interface? +
+ ++ How to create a server to receive Webhooks and deploy it as a Space? +
+ +