Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/hub/spaces-dev-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,21 @@ from huggingface_hub import HfApi
print(HfApi().space_info("namespace/repo").subdomain)
```

The Hugging Face CLI can resolve the subdomain and open the session for you:

```shell
# SSH into the Space's Dev Mode container
hf spaces ssh username/my-space

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah nice, TIL!


# Print the SSH command instead of running it
hf spaces ssh username/my-space --dry-run

# Use a specific identity file
hf spaces ssh username/my-space -i ~/.ssh/id_ed25519
```

Pass `--auto` to enable Dev Mode without prompting if it isn't already running. See the [`hf spaces ssh` CLI reference](https://huggingface.co/docs/huggingface_hub/package_reference/cli#hf-spaces-ssh) for the full list of options.

You will need to add your machine's SSH public key to [your user account](https://huggingface.co/settings/keys) to be able to connect to the Space using SSH.
Check out the [Git over SSH](./security-git-ssh#add-a-ssh-key-to-your-account) documentation for more detailed instructions.

Expand Down
Loading