Skip to content

Support Zed as dev-environment IDE#3947

Merged
r4victor merged 1 commit into
masterfrom
issue_3945_zed_ide
Jun 9, 2026
Merged

Support Zed as dev-environment IDE#3947
r4victor merged 1 commit into
masterfrom
issue_3945_zed_ide

Conversation

@r4victor

@r4victor r4victor commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Closes #3945

You can run ide: zed dev environments:

type: dev-environment
ide: zed

and get a zed:// remote project:

✗ dstack apply
...
tiny-pig-2 provisioning completed (running)
pip install ipykernel...

To open in Zed, use link below:

  zed://ssh/tiny-pig-2/dstack/run

To connect via SSH, use: `ssh tiny-pig-2`

To exit, press Ctrl+C.

As Zed does not require any plugins, we don't need to pre-install the Zed server – it's installed on first connect. The implementation is just the printing of a proper URL scheme.

@r4victor r4victor changed the title Make zed:// links clickable in terminal Support Zed as dev-environment IDE Jun 9, 2026
@r4victor r4victor merged commit ceebcf6 into master Jun 9, 2026
25 checks passed
@r4victor r4victor deleted the issue_3945_zed_ide branch June 9, 2026 10:47
pull Bot pushed a commit to mr-narender/zed that referenced this pull request Jun 9, 2026
The PR makes Zed'd own `zed://` links clickable in the Zed's integrated
terminal. Previously, you had to copy and paste such links. Now you can
hover and follow the link on cmd+click:

<img width="794" height="354" alt="Screenshot 2026-06-09 at 15 25 18"
src="https://github.com/user-attachments/assets/0c9be498-ba63-4a10-8852-cf2e23fa9597"
/>

</br></br>

**Use case**

A CLI tool can output a `zed://` link, e.g. to open a remote dev
environment. If Zed's terminal makes them clickable, users can open the
remote simply by clicking on the link.

More specifically, [we're adding Zed support to
dstack](dstackai/dstack#3947). The `dstack` CLI
allows users to launch a remote dev environment with GPU. So this PR is
needed to make the UX smooth: Users run the `dstack` CLI in the local
terminal, the CLI prints the the `zed://` link, and the users can click
the link and open a new remote Zed window.

**Implementation details**

`zed://` links are routed through the OS as other links and not
internally. One downside is that dev builds may open an installed Zed
version. Made this tradeoff to keep the diff simple.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- Made `zed://` links clickable in the terminal
peterschmidt85 added a commit that referenced this pull request Jun 15, 2026
…3963)

* Add Zed to the dev environment IDE dropdown in the UI

Backend support for the `zed` IDE already exists (#3947), but the run
launch UI never offered it. Add Zed to the IDE options dropdown and the
related form/run types so it can be selected from the UI.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix "Open in IDE" link to use server-provided attached_ide_url

The run details "Open in IDE" button hand-rolled the URL as
`{ide}://vscode-remote/ssh-remote+...`, which is correct only for VS Code
forks. Zed — the first non-fork IDE, now selectable in the dropdown — needs
`zed://ssh/...`, so the button produced a broken link.

Use the per-IDE URL the server already computes and exposes via
`JobConnectionInfo.attached_ide_url` (built by `ide.get_url`), making the UI a
single source of truth instead of duplicating the URL logic. This also fixes
latent issues the hand-rolled URL had for non-primary jobs/replicas (host
should be the job name) and IPv6/port formatting.

Extend the runs API connection-info test to cover all IDEs
(vscode/cursor/windsurf/zed) with and without sshproxy.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Andrey Cheptsov <andrey.cheptsov@github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Zed as dev-environment IDE

1 participant