OpenCode on iPhone, iPad & Android
Run the open-source OpenCode agent on your own machine and use it from your phone with HQSSH: install, sign in, keep sessions alive and add a one-tap launch button.
Updated
OpenCode is an open-source coding agent for the terminal that works with many model providers. Like every terminal agent, it runs on a computer, not on your phone. HQSSH connects your iPhone, iPad or Android phone to that computer over SSH and keeps OpenCode running between visits.
Install and sign in on the machine
On the Mac, Linux server or VPS that will do the work:
curl -fsSL https://opencode.ai/install | bash
opencode auth login
opencode auth login asks which provider to use and stores the credentials on the server. Your phone never holds them.
Keep sessions alive with the daemon
Install the HQSSH daemon on the same machine (Linux or macOS):
$ curl -fsSL https://hqssh.com/install | shSessions started through the daemon keep running when the phone locks or the connection drops. Reattach from your phone, your iPad or the hqssh attach desktop command and you're back where you left off.
Add a LAUNCH OPENCODE button
The app ships a one-tap Opencode snippet that works in any terminal. For a launch button on every project, add OpenCode to the daemon's tool list. The tools list replaces the defaults, so keep the agents you already use:
# ~/.hqssh/daemon.yaml
tools:
- { name: claude, command: claude, detect: "which claude" }
- { name: codex, command: codex, detect: "which codex" }
- { name: aider, command: aider, detect: "which aider" }
- { name: opencode, command: opencode, detect: "which opencode" }
Restart the daemon with hqssh service restart. Projects now show a launch button for OpenCode, and OpenCode sessions you started in another terminal appear in the project's session list, where you can end them.
Alerts
HQSSH notifies you when a session ends, and turns a terminal bell or OSC 9 notification from any program into a phone alert. If you configure OpenCode to signal through the terminal, those alerts reach your phone, and the daemon can forward them to an ntfy topic when the app is closed.
Why use SSH for OpenCode
- Your code stays on your machine. HQSSH is plain SSH from the phone to the server, with no relay in between.
- The full terminal. Switch between OpenCode,
git diffand your test runner in the same app. - One app for every agent. Claude Code, Codex, Aider and OpenCode all work the same way.