Complete guide to integrating Z.AI GLM models with OpenCode CLI
opencode auth login
and select Zhipu AI.
opencode
to launch OpenCode.
/models
command to select a model like GLM-4.5.
opencode.ai/s/<share-id>
/share
command:
opencode
- the extension installs automaticallyCmd+Esc
(Mac) or Ctrl+Esc
(Windows/Linux) to open OpenCode in a split terminal view, or focus an existing terminal session if one is already running.Cmd+Shift+Esc
(Mac) or Ctrl+Shift+Esc
(Windows/Linux) to start a new OpenCode terminal session, even if one is already open. You can also click the OpenCode button in the UI.Cmd+Option+K
(Mac) or Alt+Ctrl+K
(Linux/Windows) to insert file references. For example, @File#L37-42
./opencode
or /oc
in your comment, and OpenCode will execute tasks within your GitHub Actions runner.