Skip to content

docs: fix Zed config schema and add cross-platform ZCODE_BIN paths#7

Merged
william0wang merged 1 commit into
mainfrom
docs/fix-zed-config-cross-platform
Jul 5, 2026
Merged

docs: fix Zed config schema and add cross-platform ZCODE_BIN paths#7
william0wang merged 1 commit into
mainfrom
docs/fix-zed-config-cross-platform

Conversation

@william0wang

Copy link
Copy Markdown
Owner

Summary

Two documentation issues:

1. Wrong Zed config schema

The README examples used the obsolete `acp.agents` shape:
```jsonc
{ "acp": { "agents": [{ "name": "zcode", "command": {...} }] } }
```
The correct current Zed schema is `agent_servers.` with `type`/`command`/`args`/`env`:
```jsonc
{ "agent_servers": { "ZCode": { "type": "custom", "command": "node", "args": [...], "env": {...} } } }
```

2. No cross-platform `ZCODE_BIN` guidance

ZCode's CLI is bundled inside the desktop app and not added to `PATH`. The README only mentioned `ZCODE_BIN` in the env-var table without telling users what path to set — and the path differs per platform.

Adds a per-platform table:

Platform Path
macOS `/Applications/ZCode.app/Contents/Resources/glm/zcode.cjs`
Windows `%LOCALAPPDATA%\Programs\ZCode\resources\glm\zcode.cjs`
Linux `/resources/glm/zcode.cjs`

Plus a `find`/`Get-ChildItem` fallback for non-default install locations.

Files

  • `README.md` / `README.zh-CN.md` — `Configure Zed` section: new schema + `ZCODE_BIN` per-platform table + locate-it fallback
  • `docs/DEVELOPMENT.md` — Method 2 (Connect via Zed): updated to the new schema, with a pointer to the README for full platform paths

Note on platform paths

  • macOS path is confirmed (verified on @william0wang's machine).
  • Windows path follows the standard Electron/Squirrel install convention (`%LOCALAPPDATA%\Programs\`); marked clearly so a Windows user can correct it if their install differs.
  • Linux is intentionally generic (``) since ZCode on Linux is still beta and the install location varies (AppImage/deb/tar). The `find` fallback covers this.

If anyone has confirmed the exact Windows/Linux path on their install, please comment and I'll tighten the table.

Verification

  • `pnpm build` + `pnpm test` — 94/94 passing (docs-only change, no code touched)
  • `prettier` applied to the 3 changed markdown files

The Zed config example used the obsolete 'acp.agents' schema; the correct
current shape is 'agent_servers.<Name>' with type/command/args/env. Also
adds a per-platform ZCODE_BIN path table (macOS/Windows/Linux) plus a
find-it-yourself fallback, since the CLI is bundled inside the desktop
app and not on PATH by default. Mirrors the change in DEVELOPMENT.md.
@william0wang william0wang merged commit 79d35a8 into main Jul 5, 2026
1 check passed
@william0wang william0wang deleted the docs/fix-zed-config-cross-platform branch July 5, 2026 13:39

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation (including the English and Chinese READMEs and development docs) to reflect the new custom agent server configuration format (agent_servers) for Zed, replacing the legacy acp configuration. It also documents platform-specific paths for ZCODE_BIN and provides commands to locate the binary. The review feedback correctly identifies that the Windows configuration path should use %LOCALAPPDATA% instead of %APPDATA%, and suggests optimizing the PowerShell search command to target specific subdirectories to avoid performance issues.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread README.md
Comment on lines +38 to +39
Add the server to Zed as a custom agent server. In `~/.config/zed/settings.json`
(`%APPDATA%\Zed\settings.json` on Windows):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

On Windows, Zed stores its global configuration in %LOCALAPPDATA%\Zed\settings.json rather than %APPDATA%\Zed\settings.json (which points to the Roaming directory). Let's update this path to ensure Windows users can find their settings file correctly.

Suggested change
Add the server to Zed as a custom agent server. In `~/.config/zed/settings.json`
(`%APPDATA%\Zed\settings.json` on Windows):
Add the server to Zed as a custom agent server. In `~/.config/zed/settings.json`
(`%LOCALAPPDATA%\Zed\settings.json` on Windows):

Comment thread README.md
> # macOS / Linux
> find / -name zcode.cjs -path '*resources/glm*' 2>/dev/null
> # Windows (PowerShell)
> Get-ChildItem -Path $env:LOCALAPPDATA,$env:APPDATA,'C:\Program Files' -Recurse -Filter zcode.cjs -ErrorAction SilentlyContinue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Running Get-ChildItem -Recurse on the entire $env:LOCALAPPDATA and C:\Program Files directories can be extremely slow, potentially taking several minutes and causing high CPU/disk usage. Since ZCode is typically installed in a ZCode subdirectory within these locations, we can restrict the search path to those specific folders to make the command run almost instantly.

Suggested change
> Get-ChildItem -Path $env:LOCALAPPDATA,$env:APPDATA,'C:\Program Files' -Recurse -Filter zcode.cjs -ErrorAction SilentlyContinue
Get-ChildItem -Path "$env:LOCALAPPDATA\Programs\ZCode", "$env:ProgramFiles\ZCode", "${env:ProgramFiles(x86)}\ZCode" -Recurse -Filter zcode.cjs -ErrorAction SilentlyContinue

Comment thread README.zh-CN.md
Comment on lines +37 to +38
将本服务端作为自定义 agent server 添加到 Zed。在 `~/.config/zed/settings.json`
(Windows 上为 `%APPDATA%\Zed\settings.json`)中:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

On Windows, Zed stores its global configuration in %LOCALAPPDATA%\Zed\settings.json rather than %APPDATA%\Zed\settings.json (which points to the Roaming directory). Let's update this path to ensure Windows users can find their settings file correctly.

Suggested change
将本服务端作为自定义 agent server 添加到 Zed。在 `~/.config/zed/settings.json`
(Windows 上为 `%APPDATA%\Zed\settings.json`)中:
将本服务端作为自定义 agent server 添加到 Zed。在 `~/.config/zed/settings.json`
(Windows 上为 `%LOCALAPPDATA%\Zed\settings.json`)中:

Comment thread README.zh-CN.md
> # macOS / Linux
> find / -name zcode.cjs -path '*resources/glm*' 2>/dev/null
> # Windows (PowerShell)
> Get-ChildItem -Path $env:LOCALAPPDATA,$env:APPDATA,'C:\Program Files' -Recurse -Filter zcode.cjs -ErrorAction SilentlyContinue

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Running Get-ChildItem -Recurse on the entire $env:LOCALAPPDATA and C:\Program Files directories can be extremely slow, potentially taking several minutes and causing high CPU/disk usage. Since ZCode is typically installed in a ZCode subdirectory within these locations, we can restrict the search path to those specific folders to make the command run almost instantly.

Suggested change
> Get-ChildItem -Path $env:LOCALAPPDATA,$env:APPDATA,'C:\Program Files' -Recurse -Filter zcode.cjs -ErrorAction SilentlyContinue
Get-ChildItem -Path "$env:LOCALAPPDATA\Programs\ZCode", "$env:ProgramFiles\ZCode", "${env:ProgramFiles(x86)}\ZCode" -Recurse -Filter zcode.cjs -ErrorAction SilentlyContinue

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.

1 participant