Introduction
Vibe Coding — I’m confident readers are familiar with the concept. The simple approach to Vibe Coding requires you to sit continuously at your computer, interacting with TUI or GUI interfaces. At its core, the interaction is quite simple: all human-agent interaction can be reduced to text, with perhaps an optional image added. Neither of these requires you to interact via a computer; the computer essentially just provides an environment for programs to run. In other words, technically speaking, we can completely bypass the computer in the interaction loop and use a more convenient device — the phone — instead. This idea was introduced in an earlier post (quite a while ago, perhaps last year).
Recently, I switched my Coding Agent to OpenCode. Below, I’ll share the OpenCode workflow I currently use, which I’ve found to be quite smooth.
Main Approach
There’s one method that’s the simplest: use remote control software to control your computer from your phone. However, this approach actually contradicts our original intent — it doesn’t leverage the phone’s convenience and ease of use, instead resorting to a computer-like interaction method. This is only recommended for emergencies or situations where frequent operation isn’t required.
OpenCode isn’t limited to TUI interaction like Claude Code. It also allows users to start a server via opencode web, and the official package includes a lightweight frontend (apparently the same one used by the desktop app) to interact with the backend. What’s even more surprising is that, based on my experience, custom plugins (like OMO, oh-my-opencode) work well through this interaction method.
So the simplest approach is: run a server on your computer bound to a remotely accessible IP, then access it remotely. If you’re at home, controlling it from your phone is very easy — the WLAN directly networks your phone and computer together. As long as your computer stays on and the server is running, you can open your phone’s browser and access it. The official basic frontend may look minimal, but in practice, about 95% of commonly used features can be handled from your phone. The only inconvenience arises when you need to verify results as a user on the computer itself — in those cases, it’s still recommended to use the computer.
For situations where you and your computer aren’t on the same WLAN, you can use software like Tailscale for remote networking. Simply install Tailscale on both your computer and mobile device, add them to the same network, and you’ll have remote access from your phone. Going further, if you also need to develop with OpenCode on remote hosts, you can network those machines with Tailscale as well. I’ll just offer this idea here — the specific configuration details shouldn’t be a problem for readers, and I hope this approach sparks some inspiration.
For Windows, you can reference a .bat script I wrote that starts the server with a single command, making it accessible remotely. For security reasons, I recommend setting an access password. Once set, when you open the corresponding address in your browser and enter the password, the default username is opencode.
1 | @echo off |
Running the script starts the server in the background, and your phone can connect immediately.
Going one step further, I recently discovered a third-party open-source OpenCode WebUI that offers a much nicer and more polished experience overall, though it’s still in early development. This WebUI doesn’t require separate deployment — just fill in the backend address from the previous step and you’re good to go. Note that for some backend instances, you may need to add --cors "https://lehhair.github.io" to the command to resolve CORS cross-origin issues. Interested readers can try it out for themselves.
The above is mainly about sharing approaches and experiences — for specific technical details and security considerations, please refer to the documentation and do your own research.
Afterword (Random Musings)
It’s been a while since I last connected with readers. Over the past few months, I’ve had many observations and thoughts I couldn’t share. This article is written entirely by hand — in an era where AIGC is everywhere, I still want to genuinely contribute something more valuable and thoughtful to the internet. This isn’t to say that AI-assisted articles lack readability. I’ve been questioning the necessity of writing articles by hand, since it seems more convenient to have an Agent generate an article based on your outline — which is why I hadn’t planned to write blog posts for several months. But I eventually realized that writing isn’t just for readers; it’s also for myself, to think through things more deeply and thoroughly. The process of writing clarifies my thinking. And at the very least, it’s a form of entertainment and experience. Perhaps what was once called “work” will, in the future, largely become “entertainment” or “art.” Allow me this time to write a bit more for myself.