OpenCode remote control

Install and pair.

Connect an installable PWA to a local OpenCode session. Pairing is local, encrypted, and does not require an account.

Requirements

Hosted service

Pair a device

  1. Install the OpenCode plugin.
    opencode plugin opencode-remotty --global --force
  2. Create a device invite.
    npx --yes --package opencode-remotty@latest remotty pair

    The output contains a sensitive ten-minute token, a pairing URL, and a QR code. Do not share, paste into tickets, or publish any of it.

  3. Open the printed pairing URL, scan its QR code, or paste the token on the pairing page.
  4. Quit the running OpenCode process, then restart it so the installed plugin starts with the paired relay configuration.
    opencode --continue
  5. Verify the connection by opening the PWA and checking that the local OpenCode session appears.

Custom broker or PWA

Set both endpoints explicitly

Use the CLI's supported --broker and --app options when the broker or browser app is not hosted by remotty.

npx --yes --package opencode-remotty@latest remotty pair --broker wss://broker.example/ws --app https://app.example

Use ws:// and http:// only for loopback local development.

Commands

npx --yes --package opencode-remotty@latest remotty pair
npx --yes --package opencode-remotty@latest remotty invite
npx --yes --package opencode-remotty@latest remotty devices
npx --yes --package opencode-remotty@latest remotty revoke <device-id>
npx --yes --package opencode-remotty@latest remotty remove <device-id>
npx --yes --package opencode-remotty@latest remotty remove --revoked
npx --yes --package opencode-remotty@latest remotty status

For an upgrade, reinstall the plugin with opencode plugin opencode-remotty --global --force, quit OpenCode, then run opencode --continue.

Configuration and troubleshooting

The CLI stores relay authority keys, device records, invitation hashes, and revocation state in ~/.config/remotty/config.json, or $XDG_CONFIG_HOME/remotty/config.json when XDG_CONFIG_HOME is set. It creates the file with mode 0600.