extension for hf to launch Claude Code with Hugging Face Inference Providers
It lets you pick:
- model (from
https://router.huggingface.co/v1/models) - provider (
autoor a concrete provider for the selected model)
Then it runs claude --model <model[:provider]> with the required env vars preconfigured.
- Claude Code CLI installed
curl,jq,bashfzf(optional) — enables fuzzy model/provider search; without it the launcher falls back to an arrow-key menu (↑/↓ to move, Enter to select)- A Hugging Face token, via either:
curl -LsSf https://hf.co/cli/install.sh | bash
hf auth login
# or
export HF_TOKEN='hf_...'hf extensions install hf-claude
# add --force to reinstall the extensionhf claude
# or
hf extensions exec claudeForward extra args to Claude Code:
hf claude --help
hf extensions exec claude -- --helpTo bill inference usage to a Hugging Face organization instead of your personal
account, pass --bill-to (you must have Write privileges in the org):
hf claude --bill-to your-org-nameThis sets the router's X-HF-Bill-To header (via ANTHROPIC_CUSTOM_HEADERS) on
every request. You can also set it via the HF_BILL_TO environment variable:
export HF_BILL_TO=your-org-name
hf claude