From 4a1a6f9e4988a2abb92f7d61f704b49d5407dea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mu=C5=A1tar?= Date: Wed, 20 May 2026 10:57:58 +0200 Subject: [PATCH 1/3] docs(spaces-dev-mode): surface SSH command, lead with SSH over VS Code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SSH is the underlying connection mechanism — VS Code rides on top of it — but the page currently mentions VS Code first and tells readers to find the SSH instructions in the UI modal. Reframe the intro accordingly and show the actual `ssh @ssh.hf.space` command plus a snippet to fetch the subdomain via `HfApi.space_info()`, so anyone reading the docs (humans or agents) can connect without going through the UI. --- docs/hub/spaces-dev-mode.md | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/docs/hub/spaces-dev-mode.md b/docs/hub/spaces-dev-mode.md index f3da8134a5..333bdcc1de 100644 --- a/docs/hub/spaces-dev-mode.md +++ b/docs/hub/spaces-dev-mode.md @@ -14,7 +14,7 @@ Whenever your commit some changes to your Space repo, the underlying Docker imag The Dev Mode allows you to update your Space much quicker by overriding the Docker image. -The Dev Mode Docker image starts your application as a sub-process, allowing you to restart it without stopping the Space container itself. It also starts a VS Code server and a SSH server in the background for you to connect to the Space. +The Dev Mode Docker image starts your application as a sub-process, allowing you to restart it without stopping the Space container itself. It also starts an SSH server (and a VS Code server on top of it) in the background, so you can connect to the Space from any editor or terminal. The ability to connect to the running Space unlocks several use cases: @@ -39,16 +39,31 @@ The application does not restart automatically when you change the code. For you You will need to manually run `pip install` from VS Code or SSH. -### SSH connection and VS Code +### Connecting -The Dev Mode allows you to connect to your Space's docker container using SSH. +Dev Mode exposes the running Space as a standard SSH host. VS Code and any other editor connect through that same SSH endpoint. -Instructions to connect are listed in the Dev Mode controls modal. +#### SSH + +Once Dev Mode is running, connect with: + +```shell +ssh @ssh.hf.space +``` + +The subdomain is shown in the Dev Mode controls modal. You can also retrieve it programmatically: + +```python +from huggingface_hub import HfApi +print(HfApi().space_info("namespace/repo").subdomain) +``` 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. -You can also use a local install of VS Code to connect to the Space container. To do so, you will need to install the [SSH Remote](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension. +#### VS Code + +You can also use a local install of VS Code to connect to the Space container. To do so, install the [Remote - SSH](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh) extension and connect to the same `@ssh.hf.space` host. ### Persisting changes From b166796877e89b264ac4c146c944f5998c14522a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mu=C5=A1tar?= Date: Wed, 20 May 2026 11:03:24 +0200 Subject: [PATCH 2/3] docs(spaces-dev-mode): drop Beta-stage warning --- docs/hub/spaces-dev-mode.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/docs/hub/spaces-dev-mode.md b/docs/hub/spaces-dev-mode.md index 333bdcc1de..c34a9d1420 100644 --- a/docs/hub/spaces-dev-mode.md +++ b/docs/hub/spaces-dev-mode.md @@ -1,8 +1,5 @@ # Spaces Dev Mode: Seamless development in Spaces -> [!WARNING] -> This feature is still in Beta stage. - > [!WARNING] > The Spaces Dev Mode is part of PRO or Team & Enterprise plans. From 5e4daf6463491b71ece03bf5f268007c994d470d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Mu=C5=A1tar?= Date: Wed, 20 May 2026 11:57:55 +0200 Subject: [PATCH 3/3] docs(spaces-dev-mode): clarify SSH vs VS Code web servers --- docs/hub/spaces-dev-mode.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/hub/spaces-dev-mode.md b/docs/hub/spaces-dev-mode.md index c34a9d1420..b3a65bb1b8 100644 --- a/docs/hub/spaces-dev-mode.md +++ b/docs/hub/spaces-dev-mode.md @@ -11,7 +11,7 @@ Whenever your commit some changes to your Space repo, the underlying Docker imag The Dev Mode allows you to update your Space much quicker by overriding the Docker image. -The Dev Mode Docker image starts your application as a sub-process, allowing you to restart it without stopping the Space container itself. It also starts an SSH server (and a VS Code server on top of it) in the background, so you can connect to the Space from any editor or terminal. +The Dev Mode Docker image starts your application as a sub-process, allowing you to restart it without stopping the Space container itself. It also starts an SSH server (for local editors and terminals) and a VS Code server (for the in-product VS Code Web) in the background, so you can connect to the Space. The ability to connect to the running Space unlocks several use cases: