Hugging Face CLI Keyboard Shortcuts

Complete Hugging Face CLI keyboard shortcuts and commands reference — 13 shortcuts across 1 category. Quick reference cheat sheet for Windows & Mac.

The Hugging Face CLI moves models and datasets between the Hub and a machine, and its dozen commands cover authentication, downloads, uploads and the cache that silently fills a disk. The table lists them as huggingface-cli; recent releases also accept the shorter hf alias. The notes cover the cache and the pattern download that saves both time and space.

Commands (13)

ShortcutActionDescription
huggingface-cli loginLoginLog in to HuggingFace.
huggingface-cli download [model]Download modelDownload a model.
huggingface-cli upload [path]UploadUpload model or dataset.
huggingface-cli repo createCreate repoCreate a new repository.
huggingface-cli envEnvironmentShow environment info.
huggingface-cli whoamiCurrent userShow which account is currently logged in.
huggingface-cli logoutLogoutRemove the stored access token.
huggingface-cli scan-cacheScan cacheList cached models and their disk usage.
huggingface-cli delete-cacheClean cacheInteractively delete cached model revisions.
huggingface-cli download [model] --include "*.safetensors"Pattern downloadDownload only files matching a pattern.
huggingface-cli versionCLI versionPrint the installed CLI version.
git clone https://huggingface.co/[model]Clone repoClone a model repository with git.
huggingface-cli lfs-enable-largefiles .Enable large filesAllow files over 5GB in a local repo.
📜 Source: Hugging Face documentation — Command Line Interface (CLI). Commands from the huggingface_hub CLI guide for the current release. Checked 2026-09-06. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

Frequently Asked Questions

What are the most useful Hugging Face CLI keyboard shortcuts?

The most essential Hugging Face CLI shortcuts are: huggingface-cli login (Login), huggingface-cli download [model] (Download model), huggingface-cli upload [path] (Upload).

How do I use Hugging Face CLI commands?

These are command-line commands — type them in your terminal or console. Combine them with shell history search (Ctrl + R) and aliases to work even faster.

What is the Hugging Face CLI shortcut for login?

The Hugging Face CLI shortcut for login is huggingface-cli login. Log in to HuggingFace.

What's the fastest way to learn all Hugging Face CLI shortcuts?

Print the Hugging Face CLI cheat sheet and keep it next to your keyboard for the first week, then switch to active recall: open Shortcut Speedrun and practice Hugging Face CLI shortcuts against the clock until they're automatic.

Can I combine Hugging Face CLI shortcuts with other tools?

Yes — use My Stack to combine Hugging Face CLI shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.

Related Shortcut Pages

ChatGPT OpenAI Codex CLI OpenClaw Claude Code Gemini Midjourney

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
🔧 Spotted an error or a missing shortcut? Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.

Authentication

huggingface-cli login stores a token from your account settings; gated models such as Llama require it, as do uploads. huggingface-cli whoami confirms which account is active and huggingface-cli logout removes the token. On a shared machine, the token can instead be passed per command or set in HF_TOKEN for CI. huggingface-cli env prints the versions and paths the library sees, which is what to paste into a bug report.

Downloading and uploading

huggingface-cli download [model] fetches a repository into the cache and prints the local path; huggingface-cli download [model] --include "*.safetensors" restricts it to a pattern, which for a repo that ships both PyTorch and safetensors weights halves the transfer. huggingface-cli upload [path] pushes a folder to a repo, after huggingface-cli repo create has made one. git clone https://huggingface.co/[model] is the git route, which needs huggingface-cli lfs-enable-largefiles . in the clone before committing files over 5 GB.

The cache

Everything downloads into ~/.cache/huggingface/hub (or HF_HOME), and models of tens of gigabytes accumulate there without any command listing them by default. huggingface-cli scan-cache reports what is cached with sizes per repo and revision, and huggingface-cli delete-cache opens an interactive selector to remove revisions — the pair to run when a workstation runs out of space. huggingface-cli version prints the CLI version.

🤖 Ask AI about Hugging Face CLI shortcuts

Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"

ChatGPT Claude Perplexity Gemini Grok