Raised: $0
0% of monthly goal Help us cross the finish line!
Goal: $12,000
Raised: $0 Goal: $12,000
0% of monthly goal Help us cross the finish line!
Sponsor DDEV

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.

tests

DDEV Zed

Zed editor integration for DDEV projects: tasks for everyday ddev commands, a ready-to-use Xdebug listener, and a ddev zed command to open the project.

Install

ddev add-on get jfeid/ddev-zed

To also connect Zed’s Agent Panel to DDEV, opt in to the MCP server (see DDEV MCP server):

DDEV_ZED_MCP=true ddev add-on get jfeid/ddev-zed

Requirements

What it installs

File Purpose
.zed/tasks.json start, stop, restart, describe, launch, mailpit, ssh, logs, xdebug toggle/diagnose, composer install, snapshot
.zed/debug.json “DDEV: Listen for Xdebug” on port 9003, /var/www/html mapped to $ZED_WORKTREE_ROOT
.ddev/commands/host/zed ddev zed opens the project in Zed; extra arguments are passed through, e.g. ddev zed -n for a new window
.zed/settings.json optional: registers the ddev-mcp context server for the Agent Panel (opt in with DDEV_ZED_MCP=true; stays on for later installs until you delete the file)

Canonical copies live in .ddev/zed/.

DDEV MCP server (optional)

Setting DDEV_ZED_MCP=true during install writes .zed/settings.json with a context_servers entry that runs ddev-mcp (source) via npx -y ddev-mcp. Nothing is installed at that moment: npx downloads the package the first time Zed starts the server, so Node.js 20+ with npm must be available on your PATH.

On Windows the installer writes a different entry, depending on where it runs:

On Linux and macOS the plain entry needs nothing extra: Zed starts the server in the project folder through sh -c, and the shell sets PWD itself.

ddev-mcp is a Model Context Protocol server that exposes DDEV as tools. Once Zed loads it, the Agent Panel can:

so you can ask the agent things like “restart ddev and run the migrations” instead of switching to a terminal. The server runs commands in the project the Agent Panel is open in.

This works with Zed’s built-in agent and with external agents such as Claude Code running inside Zed. Zed forwards its configured context servers to external agents, so a Claude Code thread started from the Agent Panel sees the same ddev_* tools. Exception: for projects opened through WSL, Zed doesn’t forward the server to Claude Agent threads; the built-in agent sees it. The FAQ has a one-file workaround for Claude Agent. The built-in agent needs a model first: Zed’s free plan doesn’t include one, so add an API key under Configure Providers, use a local Ollama model, or use an external agent with its own account.

Tool calls are subject to the Agent Panel’s normal confirmation flow. ddev-mcp also blocks commands it classifies as dangerous (for example destructive Platform.sh or database operations) unless ALLOW_DANGEROUS_COMMANDS=true is set in the server’s env block in .zed/settings.json.

MCP stays on once enabled: later ddev add-on get or ddev add-on update runs refresh the generated .zed/settings.json even without DDEV_ZED_MCP=true, so fixes to the entry reach you. To turn it off, delete .zed/settings.json or remove the add-on. If you never opt in, the file isn’t created and the Agent Panel is unaffected.

If .zed/settings.json already exists and has no #ddev-generated marker, the add-on leaves it alone and checks your ddev-mcp entry. When the entry is missing, or uses a different command than your platform needs, the installer prints the right one; paste its "ddev-mcp" block into your context_servers. Don’t copy it from .ddev/zed/settings.json: that template is the Linux and macOS form, which doesn’t start on Windows or under WSL.

Ownership

Files containing #ddev-generated belong to the add-on and are updated on reinstall. Delete that line to take ownership; the add-on will then skip the file on install and keep it on removal. When it skips a file, it prints the entries your file is missing, ready to paste (see the FAQ).

Debugging

  1. Start “DDEV: Listen for Xdebug” from the debug panel.
  2. Run the ddev: xdebug toggle task.
  3. Load the page.

The listener binds to 0.0.0.0:9003 so the web container can reach it, and maps /var/www/html to $ZED_WORKTREE_ROOT, the task variable Zed resolves to the project root. If breakpoints don’t trigger, see the FAQ: the usual causes are a host firewall blocking port 9003 or, rarely, the variable not resolving.

Keybindings

Zed’s keymap.json is global, so the add-on doesn’t touch it. Example:

[
  {
    "context": "Workspace",
    "bindings": {
      "ctrl-alt-d s": ["task::Spawn", { "task_name": "ddev: start" }],
      "ctrl-alt-d x": ["task::Spawn", { "task_name": "ddev: xdebug toggle" }],
      "ctrl-alt-d h": ["task::Spawn", { "task_name": "ddev: ssh" }]
    }
  }
]

Windows

DDEV’s Windows installer offers three modes. The add-on was tested on Windows 11 with Zed 1.21 and DDEV v1.25.4 (September 2026) in two of them:

DDEV mode Tested
Docker CE inside WSL2 (DDEV’s recommendation) yes
Docker Desktop / Rancher Desktop with WSL2 no; expected to behave like the mode above, since ddev and the project live in the WSL distro either way
Traditional Windows (Docker Desktop, PowerShell or Git Bash) yes, with Docker Desktop’s Hyper-V backend

WSL2 modes. Install and run DDEV inside WSL. Open the project from Zed for Windows with “Open Remote” and pick your WSL distro, or run ddev zed from the WSL shell: Zed’s installer puts a WSL-aware zed wrapper on the Windows PATH, which WSL interop exposes. Zed asks you to trust the project on first open. What works:

Traditional Windows. The project lives on a Windows drive and Zed opens it as a normal local folder. DDEV runs the add-on’s install script and ddev zed through Git Bash, so Git for Windows is required, even if you type commands in PowerShell. What works, including from a project path with non-ASCII characters:

FAQ

See FAQ.md for firewall setup, path mapping fallbacks, and merging into user-owned files.

Remove

ddev add-on remove zed

Contributed and maintained by @jfeid

If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.