Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d40e4ac
[1.0] Httpx migration (#3328)
Wauplin Sep 10, 2025
63278df
Bump minimal version to Python3.9 (#3343)
Wauplin Sep 10, 2025
7213f97
Remove `HfFolder` and `InferenceAPI` classes (#3344)
Wauplin Sep 11, 2025
966df29
[v1.0] Remove more deprecated stuff (#3345)
Wauplin Sep 11, 2025
72c53f4
[v1.0] Remove `Repository` class (#3346)
Wauplin Sep 12, 2025
e56ba6e
bump to 1.0.0.dev0
Wauplin Sep 12, 2025
ccca22e
Remove _deprecate_positional_args on login methods (#3349)
Wauplin Sep 12, 2025
98aa8ba
Merge branch 'main' into v1.0-release
Wauplin Sep 12, 2025
b679858
[v1.0] Remove imports kept only for backward compatibility (#3350)
Wauplin Sep 12, 2025
aef9df2
Merge branch 'v1.0-release' of github.com:huggingface/huggingface_hub…
Wauplin Sep 12, 2025
877955d
[v1.0] Remove keras2 utilities (#3352)
Wauplin Sep 12, 2025
9cb1955
[v1.0] Remove anything tensorflow-related + deps (#3354)
Wauplin Sep 12, 2025
84de3c5
Merge branch 'main' into v1.0-release
Wauplin Sep 12, 2025
3b562ca
Release: v1.0.0.rc0
Wauplin Sep 15, 2025
4a460be
[v1.0] Update "HTTP backend" docs + `git_vs_http` guide (#3357)
Wauplin Sep 17, 2025
16f3ad1
Refactor CLI implementation using Typer (#3372)
hanouticelina Sep 18, 2025
42c852c
add installers
hanouticelina Sep 19, 2025
e5b3d11
fix windows
hanouticelina Sep 19, 2025
20fd256
fix log
hanouticelina Sep 19, 2025
44e1f8a
fix workflow?
hanouticelina Sep 19, 2025
79adab0
fix workflow again
hanouticelina Sep 19, 2025
da1f8f1
add debugging steps
hanouticelina Sep 19, 2025
6c5a0a4
fix
hanouticelina Sep 19, 2025
db1a9e9
remove bin dir and install dir params
hanouticelina Sep 23, 2025
07a8b49
update workflow
hanouticelina Sep 23, 2025
e6275af
remove version param
hanouticelina Sep 24, 2025
e1c186b
document usage
hanouticelina Sep 24, 2025
f8cc841
[1.0] Httpx migration (#3328)
Wauplin Sep 10, 2025
a56a25f
Bump minimal version to Python3.9 (#3343)
Wauplin Sep 10, 2025
048050b
Remove `HfFolder` and `InferenceAPI` classes (#3344)
Wauplin Sep 11, 2025
082bb08
[v1.0] Remove more deprecated stuff (#3345)
Wauplin Sep 11, 2025
d14a88a
[v1.0] Remove `Repository` class (#3346)
Wauplin Sep 12, 2025
6adab6e
bump to 1.0.0.dev0
Wauplin Sep 12, 2025
6968fe8
Remove _deprecate_positional_args on login methods (#3349)
Wauplin Sep 12, 2025
fdaed9b
[v1.0] Remove imports kept only for backward compatibility (#3350)
Wauplin Sep 12, 2025
6a8b8eb
[v1.0] Remove keras2 utilities (#3352)
Wauplin Sep 12, 2025
a384c2b
[v1.0] Remove anything tensorflow-related + deps (#3354)
Wauplin Sep 12, 2025
81e01f6
Release: v1.0.0.rc0
Wauplin Sep 15, 2025
26aae60
[v1.0] Update "HTTP backend" docs + `git_vs_http` guide (#3357)
Wauplin Sep 17, 2025
534c799
Refactor CLI implementation using Typer (#3372)
hanouticelina Sep 18, 2025
fb68658
Make HfHubHTTPError inherit from OSError (#3387)
Wauplin Sep 24, 2025
c727e9e
Release: v1.0.0.rc1
Wauplin Sep 24, 2025
aec8318
Merge branch 'v1.0-release' of github.com:huggingface/huggingface_hub…
hanouticelina Sep 24, 2025
f1ccb74
Merge branch 'v1.0-release' into cli-installer
hanouticelina Sep 25, 2025
5b76ee9
print relevant message based on the linux distro
hanouticelina Sep 26, 2025
4f6823e
better warning message
hanouticelina Sep 26, 2025
7cc3530
log info instead of warning
hanouticelina Sep 26, 2025
88ac8f7
copilot suggestions
hanouticelina Sep 26, 2025
91429fd
Update utils/installers/install.sh
hanouticelina Sep 26, 2025
c4c0ed4
update docs
hanouticelina Sep 26, 2025
9101394
Merge branch 'cli-installer' of github.com:huggingface/huggingface_hu…
hanouticelina Sep 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/check-installers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Check CLI installers

on:
push:
branches:
- main
paths:
- "utils/installers/**"
- ".github/workflows/check-installers.yml"
pull_request:
paths:
- "utils/installers/**"
- ".github/workflows/check-installers.yml"
workflow_dispatch: {}

permissions:
contents: read

jobs:
linux-installer:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run installer
shell: bash
run: |
set -euo pipefail

HF_TEST_ROOT=$(mktemp -d)
INSTALL_DIR="$HF_TEST_ROOT/install"
BIN_DIR="$HF_TEST_ROOT/bin"

HF_HOME="$INSTALL_DIR" HF_CLI_BIN_DIR="$BIN_DIR" utils/installers/install.sh --no-modify-path

export PATH="$BIN_DIR:$PATH"

HF_VERSION_PATH="$HF_TEST_ROOT/hf-version.txt"
hf version | tee "$HF_VERSION_PATH"
if ! grep -Eq 'huggingface_hub version: [0-9]+(\.[0-9]+){1,2}' "$HF_VERSION_PATH"; then
echo "hf version output missing huggingface_hub version" >&2
cat "$HF_VERSION_PATH" >&2
exit 1
fi

NO_COLOR=1 hf --help

rm -rf "$HF_TEST_ROOT"

windows-installer:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run installer
shell: pwsh
run: |
$hfTestRoot = Join-Path $env:TEMP ([System.Guid]::NewGuid().ToString())
$installDir = Join-Path $hfTestRoot 'install'
$binDir = Join-Path $hfTestRoot 'bin'
New-Item -ItemType Directory -Path $installDir -Force | Out-Null
New-Item -ItemType Directory -Path $binDir -Force | Out-Null

$env:HF_HOME = $installDir
$env:HF_CLI_BIN_DIR = $binDir
& "$PWD/utils/installers/install.ps1" -NoModifyPath

$env:PATH = "$binDir;$env:PATH"

$hfVersionPath = Join-Path $hfTestRoot 'hf-version.txt'
& hf.exe version | Tee-Object -FilePath $hfVersionPath
if ($LASTEXITCODE -ne 0) {
throw 'hf version failed'
}
if (-not (Select-String -Path $hfVersionPath -Pattern 'huggingface_hub version: [0-9]+(\.[0-9]+){1,2}')) {
throw 'hf version output missing huggingface_hub version'
}

$env:NO_COLOR = '1'
& hf.exe --help
if ($LASTEXITCODE -ne 0) {
throw 'hf --help failed'
}
Remove-Item Env:NO_COLOR

Remove-Item -Path $hfTestRoot -Recurse -Force
14 changes: 14 additions & 0 deletions docs/source/en/guides/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ First of all, let's install the CLI:
> [!TIP]
> In the snippet above, we also installed the `[cli]` extra dependencies to make the user experience better, especially when using the `cache delete` command.

Alternatively, you can install the `hf` CLI with a single command:

On macOS and Linux:

```bash
>>> curl -LsSf https://hf.co/install.sh | sh
```

On Windows:

```powershell
>>> powershell -c "irm https://hf.co/install.ps1 | iex"
```

Once installed, you can check that the CLI is correctly setup:

```
Expand Down
16 changes: 16 additions & 0 deletions docs/source/en/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,22 @@ Python will now look inside the folder you cloned to in addition to the normal l
For example, if your Python packages are typically installed in `./.venv/lib/python3.13/site-packages/`,
Python will also search the folder you cloned `./huggingface_hub/`.

## Install the Hugging Face CLI

Use our one-liner installers to set up the `hf` CLI without touching your Python environment:

On macOS and Linux:

```bash
curl -LsSf https://hf.co/install.sh | sh
```

On Windows:

```powershell
powershell -c "irm https://hf.co/install.ps1 | iex"
```

## Install with conda

If you are more familiar with it, you can install `huggingface_hub` using the [conda-forge channel](https://anaconda.org/conda-forge/huggingface_hub):
Expand Down
Loading
Loading