Cloud plugin reference
Install, options, environment variables, and the /cloud and /cloud-return commands of @gitterm/opencode-cloud.
This is the reference for @gitterm/opencode-cloud, the OpenCode plugin that adds the /cloud and /cloud-return commands: every option, environment variable, and command. Use it to look up a field. For step-by-step use, see Move a session and Bring a session back.
Version 0.2.0 or later, with OpenCode 2.2.6 or later. It also needs a Gitterm server that includes cloud return (managed Gitterm does); against an older self-hosted server, /cloud fails until the server is updated.
Formerly part of @gitterm/opencode-plugin. The sandbox_* tools are now a separate plugin; see Sandbox plugin reference.
Install
opencode plugin add @gitterm/opencode-cloudThis installs the plugin and adds it to your global OpenCode config. You can instead list it under plugins in a project's opencode.json, or in ~/.config/opencode/opencode.json for all projects:
{
"$schema": "https://opencode.ai/config.json",
"plugins": ["@gitterm/opencode-cloud"]
}Every option is optional. To pass options, replace the string with an object. Keep your other settings and plugin entries.
{
"plugins": [
{
"package": "@gitterm/opencode-cloud",
"options": {
"provider": { "type": "e2b" },
"connections": ["github"],
},
},
],
}Restart OpenCode if /cloud does not appear. /cloud-return appears only while a session of the checkout is in the cloud. When you load the plugin from a local path, point package at the package directory, not a file.
Sign in
Both commands need a Gitterm login.
npm install -g @gitterm/cli
gitterm loginThe plugin uses the CLI's saved login. For a self-hosted deployment, run gitterm login --server <url>, where <url> is your Gitterm API URL. You can instead set GITTERM_API_TOKEN (and GITTERM_SERVER_URL) before starting OpenCode.
Options
serverUrl and token resolve in this order: the option, then GITTERM_SERVER_URL / GITTERM_API_TOKEN, then the saved CLI login. The server defaults to https://api.gitterm.dev.
Environment variables
Set variables before OpenCode starts.
Commands
In the OpenCode terminal
While a session is in the cloud, the plugin's terminal part shows a Cloud block in the session's sidebar and a status line above the prompt: working, needs your input, idle, paused, or deleted. It notifies you when the cloud agent finishes or needs your input. Sending a message in that session locally asks first. Status checks are marked as passive, so they don't keep the workspace from pausing when it is idle.
The desktop app gets the check before sending and both commands, but not the sidebar, status line or notifications.