sincecutoff.com
← all changes

hf spaces templates can create Spaces from templates

Introduced 2026-07-09 · score 0.98

HOW TO USE IT

When creating a Space from an official Hub template, list templates with `hf spaces templates`, then create the Space with `hf repos create <repo_id> --type space --template <template>`. A template recommended as private defaults to private unless you choose a visibility.

hf spaces templates
hf repos create <repo_id> --type space --template <template>

WHY THIS HELPS

Create a new Space in the repository from an official Hub template.

REQUIREMENTS AND LIMITATIONS

  • Version: v1.23.0
  • REPO_ID (required): New repository ID; for example, `<owner>/<name>`.
  • --type space (required): Sets the repository type to Space.
  • --template TEXT (required): Official template repo ID or short name; Spaces only.
  • --private / --no-private: Choose private or non-private creation. The docs do not state these options are mutually exclusive.
  • --public: Choose public creation; ignored if the repository already exists.
  • --token TEXT: User Access Token for authentication.
  • Prerequisite: You can manage repositories you own or repositories in organizations where you have write permission.
  • Templates come from the official Hub template set.
  • Templates recommended as private, such as JupyterLab, are created privately by default unless visibility is explicitly chosen.
  • Docs conflict: Newer docs say `space_sdk` is still required for the SDK API, while the v1.23.0 release note says the SDK is inferred from the template. This concerns the SDK API; it does not establish a CLI conflict.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card