Run GPT & Gemini Coding Agents on Android
++ Prefer OpenAI's GPT models or Google's Gemini models for coding? Neither OpenAI nor Google + publishes an official Android app for agentic coding. OpenCode Mobile fills that gap: it + connects to an opencode server configured with + your own OpenAI or Google AI API key and gives you a full native Android interface to + whichever model you choose. +
+Free and open-source. Bring your own OpenAI or Google API key.
+ Download for Android +How GPT and Gemini coding agents work on Android
++ OpenCode Mobile itself never talks to OpenAI or Google directly — it's a thin client for the + opencode server, and opencode is what actually calls your chosen model provider. In plain terms: +
+-
+
- You run opencode (the open-source AI coding agent) on a machine you control — laptop, desktop, or VPS. +
- You configure opencode to use OpenAI (with your OpenAI API key) or Google Gemini (with your Google AI API key) as the model provider. +
- OpenCode Mobile on your Android phone connects to that server over the network. +
- You chat with the agent from your phone — responses stream in real time, file changes render as inline diffs, and shell/tool calls wait for your tap-to-approve before they run. +
Choosing between OpenAI and Gemini
++ Both are fully supported by opencode; you pick the provider and model in the server config, + and the app streams whatever it produces. Broad strokes for coding work: +
+| Provider | +Typical strengths | +What you need | +
|---|---|---|
| OpenAI GPT | +Broad general coding ability, strong tool-use, reasoning-tier models for harder refactors | +An API key from platform.openai.com | +
| Google Gemini | +Very large context windows, competitive pricing, tight integration if you're already on Google Cloud | +An API key from Google AI Studio or Vertex AI | +
+ Exact model names and capabilities change frequently — check your provider's current model + list when configuring opencode. You are not locked in: opencode also supports Anthropic Claude + and local models via Ollama, and you can switch providers on the server at any time without + touching the app. +
+What you get on Android
++ Whichever provider you choose, OpenCode Mobile gives you the same full agent experience — + not a chat window where you paste code and copy suggestions back: +
+-
+
- + Reads your entire codebase + The model gets full file-tree access via the opencode server. Ask it to trace a bug across many files — no pasting required. + +
- + Writes and applies changes + Proposed diffs render in the app's inline viewer; approve or reject per file. Changes apply to the real filesystem on your server. + +
- + Runs shell commands + Tests, builds, log checks — the agent can execute shell commands on your machine via opencode's tool-call system, gated by your approval. + +
- + Streams token by token + Responses stream live to your phone instead of a long wait followed by a wall of text. + +
- + Works across sessions + Sessions persist on the server — pick up a long conversation later, even after closing the app or switching networks. + +
- + Protects your API key + Your OpenAI or Google key lives on the server, not the phone. The app stores only your server URL and access password, in the Android Keystore. + +
Setting up GPT or Gemini on Android: step by step
+ +Step 1 — Install opencode on your machine
+-
+
- Install Node.js 20+ if you don't already have it. +
- Install opencode globally:
+
+npm install -g opencode-ai
+
Step 2 — Configure your provider
+-
+
- Get an API key — platform.openai.com for OpenAI, or Google AI Studio for Gemini. +
- Set it as an environment variable before starting the server, e.g. for OpenAI:
+
+ or for Gemini: +export OPENAI_API_KEY=sk-your-key-here
+export GEMINI_API_KEY=your-key-here
+ - Or add the key to
~/.config/opencode/config.jsonunder the matching provider — see the opencode docs for the exact config shape for your version.
+
Step 3 — Start the opencode server
+-
+
- Start the server, binding to all interfaces so your phone can reach it:
+
+OPENCODE_SERVER_PASSWORD=yourpassword opencode serve --hostname 0.0.0.0 --port 4096
+ - From your phone's browser, verify:
http://<machine-ip>:4096/global/healthshould return{"healthy":true}.
+
Step 4 — Make the server reachable from anywhere
+-
+
- Install Tailscale on both your machine and your Android phone (free tier works). +
- Note your machine's Tailscale IP (e.g.
100.x.x.x) from the Tailscale app.
+ - Your server URL becomes:
http://100.x.x.x:4096
+
Alternatives: same LAN Wi-Fi, Cloudflare Tunnel, ngrok. See the full guide for details on each.
+Step 5 — Install OpenCode Mobile and connect
+-
+
- On your phone, install OpenCode Mobile via F-Droid or direct APK. +
- Tap Add Connection. +
- Enter your server URL (
http://100.x.x.x:4096) and the password you set.
+ - Tap Connect. You're now running GPT or Gemini as your coding agent, from Android. +
+ Total setup time: about 15 minutes. Not ready to configure a server yet? Tap + Try a Demo in the app first to see the interface with + zero setup. +
+Privacy: where your code goes
++ When you use GPT or Gemini via OpenCode Mobile: +
+-
+
- Your prompts and code go from your phone → to your opencode server → to OpenAI's or Google's API. OpenCode Mobile itself never sees or stores your code. +
- The path from phone to server is over your private network (LAN or Tailscale) — not through any third-party relay. +
- The path from server to the model provider follows that provider's own terms — see OpenAI's privacy policy or Google's privacy policy. +
- If data privacy is critical, you can configure opencode to use a local model (e.g. Ollama) so no code ever leaves your network. +
+ Your provider API key lives in the opencode server config on your machine — not in the app, + not in any cloud service. The app stores only your server URL and access password, encrypted + in the Android Keystore. +
+Frequently asked questions
+Can I run a GPT or Gemini coding agent on Android?
+Yes. OpenCode Mobile is a native Android app that connects to an opencode server configured to use OpenAI's GPT models or Google's Gemini models. You get streaming responses, file diffs, and tool call approval from your Android phone — neither OpenAI nor Google publishes an official mobile coding-agent app, so this is the practical route.
+Do I need my own OpenAI or Gemini API key?
+Yes. You configure your OpenAI or Google AI API key on the opencode server, not in the app. OpenCode Mobile never sees or stores provider API keys — they live on the machine running opencode serve.
+Can I switch between GPT, Gemini, and Claude without reinstalling the app?
+Yes. The model is chosen in the opencode server configuration, not in the mobile app. Change the provider or model on the server and the app simply streams whatever it produces — no app update or reinstall needed.
+Is this an official Google or OpenAI app?
+No. OpenCode Mobile is an independent, open-source (MIT licensed) project built by VIBE TECHNOLOGIES, LLC. It is not affiliated with OpenAI, Google, or Anthropic. It connects to the open-source opencode agent (github.com/sst/opencode), which supports GPT, Gemini, Claude, and other models as configurable backends.
+How much does it cost?
+OpenCode Mobile itself is free. Model usage is billed by your chosen provider (OpenAI or Google) based on tokens — the same pricing as using their API directly. Check each provider's pricing page for current rates.
+Get started on Android today
+
+ OpenCode Mobile is free, open-source, and available now on Android via F-Droid or direct APK.
+ You need a machine running opencode serve and an OpenAI or Google AI API key —
+ both of which you can set up in under 15 minutes by following the
+ complete setup guide.
+
GPT or Gemini as your AI coding agent — from your Android phone.
+ ++ Also see: Claude on Android · + try the no-setup demo · + OpenCode Mobile vs ChatGPT & Copilot · + full feature list +
+