Setup
Note the Space’s fullnamespace/space-name from its URL on
huggingface.co/spaces. A public Space needs
no token. For a private one, create a token at
Access Tokens with New token:
a Read token, or a Fine-grained one with read access to that Space’s
repository.
Connect
- YAML
- Python
- TypeScript
workspace.yaml
Layout
- The tree mirrors the repository at
revision,mainwhen unset. - Add
token: ${HF_TOKEN}to the YAML config for a private Space. - In TypeScript the class ships in
@struktoai/mirage-node, not@struktoai/mirage-browser.
Sample runs
echo >, rm, cp and
mv are refused. Download, edit and upload as one commit with the
hf CLI.
SDK guides
Python
Every config field, the VFS.md and write support.
TypeScript
Every config field, the VFS.md and write support.