๐ฅ๏ธ Manage Space secrets and variables from the CLI
You can now manage Space secrets and environment variables directly from the command line with two new hf spaces subgroups: secrets and variables. Use hf spaces secrets to add, list, and delete write-only secrets, and hf spaces variables to add, list, and delete readable environment variables. Both add commands support multiple -s/-e flags and --secrets-file/-env-file for loading from dotenv files. On the Python side, HfApi.get_space_secrets() returns secret metadata (key, description, updated timestamp) without ever revealing values.
# List secrets (values are write-only โ only keys and timestamps are shown)
$ hf spaces secrets ls username/my-space
# Add secrets
$ hf spaces secrets add username/my-space -s OPENAI_API_KEY=sk-...
$ hf spaces secrets add username/my-space --secrets-file .env.secrets
# Delete a secret (confirmation prompt, use --yes to skip)
$ hf spaces secrets delete username/my-space OPENAI_API_KEY --yes
# List, add, and delete variables (values are readable)
$ hf spaces variables ls username/my-space
$ hf spaces variables add username/my-space -e MODEL_ID=gpt2 -e MAX_TOKENS=512
$ hf spaces variables delete username/my-space MAX_TOKENS --yes- [CLI] Add hf spaces secrets and variables subgroups by @davanstrien in #4170
- [CLI] Add get_space_secrets + hf spaces secrets ls by @Wauplin in #4182
๐ Documentation: CLI guide ยท Manage your Space
๐ชฃ Rsync-style trailing slash for bucket folder copies
hf buckets cp now supports rsync-style trailing slash semantics when copying folders. A trailing / on the source path copies only the folder's contents to the destination, while omitting it nests the folder itself โ matching the behavior you'd expect from rsync. This makes it possible to flatten directory structures during copies, which was not possible before. Additionally, copy_files now raises an explicit EntryNotFoundError when the source path resolves to no files, instead of silently succeeding with zero operations.
# Without trailing slash: "logs" dir is nested => dst/logs/...
$ hf buckets cp hf://buckets/username/src-bucket/logs hf://buckets/username/dst/
# With trailing slash: only contents of "logs" are copied => dst/...
$ hf buckets cp hf://buckets/username/src-bucket/logs/ hf://buckets/username/dst/- [Buckets] Support rsync-style trailing slash in copy_files by @Wauplin in #4187
- [CLI] Raise error when copy_files source doesn't exist by @Wauplin in #4186
๐ Documentation: Buckets guide ยท CLI guide
๐ Breaking Change
- [CLI] Rename
hf skills upgrade->hf skills updateby @hanouticelina in #4176 โhf skills upgradeno longer exists; usehf skills updateinstead. - [CLI] Add
out.status()by @hanouticelina in #4171 โ status updates (spinners/progress) onhf extensions installandhf spaces dev-modeare now suppressed when using--format json,--quiet, or--format agent.
๐ฅ๏ธ CLI
- [CLI] Add hints and example to
hf datasets leaderboardby @Wauplin in #4174 - [CLI] Shortcut
hf updatewhen already on latest version by @julien-c in #4177 - [CLI] Remove progress bars on skills update by @Wauplin in #4179
- [CLI] Increase default --limit from 10 to 30 for list commands by @Wauplin in #4181
- [CLI] Support hf -v to print version by @Wauplin in #4185
- [CLI] migrate
hf skillsto bucket by @hanouticelina in #4175
๐ Bug and typo fixes
- Update typer dependency version in setup.py by @tomaarsen in #4193
๐๏ธ Internal
- Post-release: bump version to 1.14.0.dev0 by @huggingface-hub-bot[bot] in #4172
- [Release] Move social drafts to minor-release and archive release notes to bucket by @Wauplin in #4173
- Update unit test warnings check to ignore unrelated deprecation warnings by @seanses in #4188
- [internal] Untrack useless files by @Wauplin in #4191