Fork of zai-org/ZCode, based on v3.15.1.
- Sign in with ChatGPT — use your ChatGPT Plus/Pro subscription in ZCode: OpenAI models (GPT-6.1-Sol and friends) show up in the model picker, no API key required. Tokens are stored in the local encrypted credential store and refreshed automatically.
- Coding-plan requests work from open-source builds — model traffic goes directly to
api.z.ai/open.bigmodel.cnusing the short-lived project access token. Official binaries route these calls through a gateway that requires a client signature not included in the open-source edition, so every GLM request from a self-built app failed with401 Unauthorized. - Subagent retry fix — client signing lifecycle errors (e.g. "request signer has been disposed") are retried instead of killing the subagent.
Get the installer from Releases, then on Debian/Ubuntu:
sudo apt install ./ZCode-Preview-3.15.1-linux-amd64.debAn AppImage is also available (chmod +x it, then run).
The package installs ZCode Preview, a separate app that lives alongside your regular ZCode installation: different app id (dev.zcode.app.preview), own profile (~/.config/ZCode Preview). Your normal ZCode is untouched, and both share the same ~/.zcode login credentials.
There is no extra button in the desktop UI. Authenticate once with the bundled CLI — it writes the OpenAI tokens to the shared credential store, and the desktop app picks them up immediately (even while running):
node "/opt/ZCode Preview/resources/glm/zcode.cjs" login chatgptA browser window opens for OpenAI consent; after it completes, the OpenAI models appear in the model picker inside ZCode Preview. To disconnect: node "/opt/ZCode Preview/resources/glm/zcode.cjs" logout chatgpt.
pnpm install
cd packages/desktop
ZCODE_ENV=production ZCODE_PREVIEW_IDENTITY=1 ZCODE_SKIP_REMOTE_ASSETS=1 pnpm build
ZCODE_ENV=production ZCODE_PREVIEW_IDENTITY=1 ZCODE_TARGET_OS=linux ZCODE_TARGET_ARCH=x64 ZCODE_SKIP_REMOTE_ASSETS=1 \
pnpm exec electron-builder --config electron-builder.config.js --linux AppImage deb --x64Installers land in packages/desktop/dist/.