Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
6 changes: 3 additions & 3 deletions docs/source/de/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ Einige Abhängigkeiten von `huggingface_hub` sind [optional](https://setuptools.

Sie können optionale Abhängigkeiten über `pip` installieren:
```bash
# Abhängigkeiten sowohl für torch-spezifische als auch für CLI-spezifische Funktionen installieren.
pip install 'huggingface_hub[cli,torch]'
# Abhängigkeiten sowohl für torch-spezifische als auch für MCP-spezifische Funktionen installieren.
pip install 'huggingface_hub[mcp,torch]'
```

Hier ist die Liste der optionalen Abhängigkeiten in huggingface_hub:

- `cli`: bietet eine komfortablere CLI-Schnittstelle für huggingface_hub.
- `mcp`: MCP-spezifische Funktionen für huggingface_hub.
- `fastai`, `torch`: Abhängigkeiten, um framework-spezifische Funktionen auszuführen.
- `dev`: Abhängigkeiten, um zur Bibliothek beizutragen. Enthält `testing` (um Tests auszuführen), `typing` (um den Type Checker auszuführen) und `quality` (um Linters auszuführen).

Expand Down
54 changes: 17 additions & 37 deletions docs/source/en/guides/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,9 @@ The `huggingface_hub` Python package comes with a built-in CLI called `hf`. This

## Getting started

First of all, let's install the CLI:
### Standalone installer (Recommended)

```
>>> pip install -U "huggingface_hub"
```

> [!TIP]
> The CLI ships with the core `huggingface_hub` package.

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

On macOS and Linux:

Expand All @@ -35,23 +28,9 @@ On Windows:
>>> powershell -ExecutionPolicy ByPass -c "irm https://hf.co/cli/install.ps1 | iex"
```

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

On macOS and Linux:
Once installed, you can check that the CLI is correctly set up:

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

On Windows:

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

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

```
>>> hf --help
Usage: hf [OPTIONS] COMMAND [ARGS]...

Expand All @@ -67,6 +46,7 @@ Commands:
auth Manage authentication (login, logout, etc.).
cache Manage local cache directory.
download Download files from the Hub.
endpoints Manage Hugging Face Inference Endpoints.
env Print information about the environment.
jobs Run and manage Jobs on the Hub.
repo Manage repos on the Hub.
Expand All @@ -81,32 +61,32 @@ If the CLI is correctly installed, you should see a list of all the options avai
> [!TIP]
> The `--help` option is very convenient for getting more details about a command. You can use it anytime to list all available options and their details. For example, `hf upload --help` provides more information on how to upload files using the CLI.

### Other installation methods
### Using uv

#### Using uv
The easiest way to use the `hf` CLI is with [`uvx`](https://docs.astral.sh/uv/concepts/tools/). It always runs the latest version in an isolated environment - no installation needed!

You can install and run the `hf` CLI with [uv](https://docs.astral.sh/uv/).
Make sure `uv` is installed first. See the [uv installation guide](https://docs.astral.sh/uv/getting-started/installation/) for instructions.

Make sure uv is installed (adds `uv` and `uvx` to your PATH):
Then use the CLI directly:

```bash
>>> curl -LsSf https://astral.sh/uv/install.sh | sh
>>> uvx hf auth login
>>> uvx hf download
>>> uvx hf ...
```

Then install the CLI globally and use it anywhere:
> [!TIP]
> `uvx hf` uses the [`hf` PyPI package](https://pypi.org/project/hf/).

```bash
>>> uv tool install "huggingface_hub"
>>> hf auth whoami
```
### Install with pip

Alternatively, run the CLI ephemerally with `uvx` (no global install):
The CLI is also shipped with the core `huggingface_hub` package:

```bash
>>> uvx --from huggingface_hub hf auth whoami
>>> pip install -U "huggingface_hub"
```

#### Using Homebrew
### Using Homebrew

You can also install the CLI using [Homebrew](https://brew.sh/):

Expand Down
4 changes: 2 additions & 2 deletions docs/source/en/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ Some dependencies of `huggingface_hub` are [optional](https://setuptools.pypa.io

You can install optional dependencies via `pip`:
```bash
# Install dependencies for both torch-specific and CLI-specific features.
pip install 'huggingface_hub[cli,torch]'
# Install dependencies for both torch-specific and MCP-specific features.
pip install 'huggingface_hub[mcp,torch]'
```

Here is the list of optional dependencies in `huggingface_hub`:
Expand Down
6 changes: 3 additions & 3 deletions docs/source/fr/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ Toutefois, certaines fonctionnalités de `huggingface_hub` ne seront pas disponi

Vous pouvez installer des dépendances optionnelles via `pip`:
```bash
#Installation des dépendances spécifiques à Pytorch et au CLI.
pip install 'huggingface_hub[cli,torch]'
#Installation des dépendances spécifiques à Pytorch et à MCP.
pip install 'huggingface_hub[mcp,torch]'
```

Voici une liste des dépendances optionnelles dans `huggingface_hub`:
- `cli` fournit une interface d'invite de commande plus pratique pour `huggingface_hub`.
- `mcp`: fonctionnalités spécifiques à MCP pour `huggingface_hub`.
- `fastai`, `torch` sont des dépendances pour utiliser des fonctionnalités spécifiques à un framework.
- `dev` permet de contribuer à la librairie. Cette dépendance inclut `testing` (pour lancer des tests), `typing` (pour lancer le vérifieur de type) et `quality` (pour lancer des linters).

Expand Down