Run coding agents locally on Android through a native GUI — no terminal required.
AndCode is a native Android GUI app that brings AI coding agents to your phone. Chat with OpenCode, Claude Code, Google Antigravity, and OpenAI Codex through a touch-first interface — no terminal, no SSH, no PC required for on-device use. It wraps agent runtimes via PRoot (on-device) or connects remotely to your existing OpenCode server on PC/Mac/Linux.
Upstream releases · Fork features · Fork notes · 日本語のREADME
This repository is a fork of yuga-hashimoto/and-code. It tracks upstream main and adds a deliberate set of features on top (everything below the upstream list is documented in docs/FEATURES.md):
- Browser with DevTools — a redesigned in-app browser for the pages your agent serves, with Console, Network, Elements, Storage, Sources and Performance panels, desktop site, find in page and zoom
- Code editor — syntax colours for about 30 file types, a key bar, inline find & replace (regex, whole word), go to line, and a status bar
- Git panel — stage, commit, amend, branches, stashes, history and diffs from a full source-control screen
- Storage manager — see what uses space, clean caches and install leftovers safely, and browse folders by size
- Usage page — tokens and cost across every chat, by day, model and agent
- Changes review, Inbox and Rewind — review what an answer changed with line comments, handle approvals and finished chats in one list, and rewind a chat to any of your messages, files included
- Artifacts — preview the pages, drawings, documents and pictures the agent made, with a desktop layout and zoom
- A new look — one design language across the app, Material You colours, JetBrains Mono for code, haptics, and a Run settings sheet
- Chat quality of life — search inside messages, find in chat, pinned chats, saved prompts with arguments, a real delete and an Archive, full Markdown in answers (nested lists, task boxes, tables, footnotes), share as Markdown, paste images, and live-run notifications you can reply from
The debug build installs as AndCode LH beside an upstream install and has its own local runtime port, so the two never collide. This fork has no releases of its own yet: build it (see Building from Source), or add the build-apk label to a pull request, or run the PR APK Build workflow from the Actions tab, to get an installable APK.
Important
AndCode is an independent, local-first graphical interface that installs or launches supported third-party command-line tools on the user's own Android device. AndCode itself does not provide or resell the underlying AI services, subscriptions, model access, or account entitlements. Authentication, model access, inference, and provider communication are handled by the applicable official CLI or user-configured provider. AndCode is not affiliated with, endorsed by, sponsored by, or officially supported by OpenCode, Anthropic, Google, or OpenAI. See Legal & Third-Party Software below.
![]() Chat & changes card |
![]() Navigation drawer |
![]() Inbox |
![]() Review changes |
![]() Rewind |
![]() Artifacts |
![]() Browser: Console |
![]() Browser: Network |
![]() Code editor |
![]() Git panel |
![]() Usage |
![]() Storage manager |
![]() Model & runtime picker |
![]() Schedules |
![]() Settings |
Rendered from the app's own screens with sample data, so they match the current UI. The page inside the browser is not drawn in these renders.
Important
AndCode is an independent open-source project. It is not affiliated with OpenCode, Anthropic, Google, or OpenAI.
- About this fork
- Supported Agents
- Features
- Antigravity
- Codex
- Remote OpenCode
- Screens
- Quick Start
- Security
- On-Device Runtime Details
- Handoff (Runtime Switching Mid-Conversation)
- Connecting to OpenCode Desktop
- Building from Source
- Documentation
- Contributing
- Legal & Third-Party Software
- License
| Agent | On-Device | Remote PC | Status |
|---|---|---|---|
| OpenCode | ✓ | ✓ | Stable |
| Claude Code | ✓ | — | Beta |
| Google Antigravity | ✓ | — | Beta |
| OpenAI Codex | ✓ | — | Beta |
On-device agents run inside a Linux environment via PRoot. OpenCode, Claude Code, and Codex use Alpine Linux; Google Antigravity additionally installs a Debian Bookworm rootfs alongside Alpine, since the official agy binary links against glibc.
- Native Android GUI — Touch-first interface for coding agents; no CLI or terminal required for day-to-day use
- On-device runtime — Alpine Linux, Git, bash, curl, ripgrep, and coding agents auto-installed on your Android device via PRoot
- Repository & workspace — Open git repositories on-device, browse the file tree, and view files with syntax highlighting
- Device files — Grant all-files access and the whole phone (
/sdcard, SD cards, USB drives) becomes browsable in the folder picker and reachable by the agent, opened in place instead of copied into the app - Git support — Browse status and review diffs from the GUI; use the embedded runtime terminal for other Git operations
- Diff viewer — Review code changes inline before accepting
- Embedded terminal — An interactive shell (real PTY) inside the on-device runtime: streamed output, stdin, Ctrl+C, colours, and it opens in the workspace you came from. Dev servers started in it (Vite,
python -m http.server, …) show up as chips that open the page in the in-app browser. Full-screen programs such asvimare not supported yet - Pull request badges — Pull requests opened in a chat stay pinned above the composer with their diff size and state (draft, open, conflict, merged, closed); tap to open them on GitHub
- Tool approvals — Approve or reject dangerous tool operations
- Session management — Create, resume, rename, and delete sessions
- Scheduled tasks — Run prompts automatically on a one-time or recurring (cron) schedule, with run history
- Dynamic models — Models, providers, and agents fetched live from your connected agent instance
- Real-time streaming — SSE-based live responses, tool execution, and approval requests
- Structured timeline — Collapsible reasoning, tool calls, and command output
- Voice + Wake Word — Push-to-talk with Android speech recognition + wake word detection
- Text-to-speech — Read responses aloud
- Digital assistant — Register as Android's default assistant (home gesture / corner swipe)
- Home screen widget — Fire off a prompt straight from the launcher without opening the app first
- Secure storage — Connection credentials encrypted with Android Keystore
- Localized UI — English, Japanese, Chinese (Simplified), Russian, Spanish, French, Portuguese (Brazil), and Arabic, switchable from Settings
- Guest Browser and DevTools — Console (with a JavaScript prompt), Network (headers, payloads, waterfall, copy as cURL), Elements (tap-to-inspect, CSS rules, box model, edit attributes), Storage, Sources and Performance, docked under the page
- Code editor — Colours as you type for about 30 file types, line numbers that follow wrapped lines, auto-indent, a key bar above the keyboard, inline find & replace, go to line and text size
- Git panel — Branch with ahead/behind, fetch/pull/push, staged and unstaged changes, diffs, commit and amend, history, branches and stashes
- Storage manager — Breakdown of what AndCode uses, one-tap cleanup that never touches your projects or a running install, and a size-sorted folder browser
- Usage — Tokens and cost across every chat, with a day-by-day chart and breakdowns by model and agent
- Changes card and review — See which files an answer edited and leave line comments that go back to the agent as one message
- Inbox — Approvals, running chats and unread chats from every agent in one list, with Allow / Reject, Stop and Reply
- Rewind — Put an OpenCode chat and the files the agent changed back to how they were at any of your messages (not available for the other agents)
- Artifacts — Full-screen preview of what the agent made, and a list of the local servers it started
- Stays live — After you have been away for a few seconds, the chat reconnects as soon as you come back and catches up on anything it missed, so you no longer need to reopen the session to see a reply
- Markdown in answers — Answers render CommonMark with GitHub tables, task lists, strikethrough and footnotes: nested lists, quotes holding lists and code, aligned table columns, reference links. Your own messages show exactly as typed
- Search and organise — Search inside every chat's messages, find in a chat, pin chats, archive and really delete them
- Saved prompts —
/namecommands with$ARGUMENTSand$1,$2placeholders - Live run notification — One ongoing notification with the current step and Stop, and Reply from the shade
- Run settings sheet — Agent or permission mode, thinking level, fast mode and system prompt preset in one place
- GitHub token sign-in — Use a personal access token when the build has no OAuth client ID
Google Antigravity (agy) runs on-device inside the same PRoot environment. Unlike OpenCode and Claude Code which run in Alpine Linux, Antigravity uses a Debian Bookworm rootfs for glibc compatibility with the official CLI binary.
- OAuth sign-in — Authenticate via the browser URL + one-time code flow; credentials are stored only in the Linux rootfs (
~/.gemini), never in Android preferences - Model selection — Live model catalog fetched from the signed-in
agyinstance (Gemini, Claude, GPT-OSS variants) - Permission modes — Three-tier control: Plan, Accept Edits, and Full Access (
--dangerously-skip-permissions) - MCP servers — Read/write
~/.gemini/config/mcp_config.jsondirectly, matching the official CLI's config format - Sandbox launcher — PTY-based process with explicit terminal geometry;
AGY_CLI_DISABLE_AUTO_UPDATE=1keeps updates app-controlled
OpenAI's Codex CLI runs on-device inside the same Alpine/PRoot sandbox as OpenCode and Claude Code, talking to the app over its app-server JSON-RPC protocol.
- Sign-in — ChatGPT account (browser flow) or an OpenAI API key, through the same sign-in dialog as other providers
- MCP servers — Managed with the official
codex mcpsubcommand, so the app never edits~/.codex/config.tomlby hand - Image generation — Images from the built-in
image_gentool are shown inline in the chat - Setup — Installable from the setup guide or Settings → Agents → Codex; no separate rootfs, since Codex's musl-linked binary runs directly in the shared Alpine environment
See docs/CODEX.md for implementation details.
In addition to on-device agents, AndCode can connect to OpenCode running on your PC/Mac/Linux as an additional feature:
- Remote connection — Connect over LAN or Tailscale
- Runtime switching — Seamlessly switch between local and remote execution, even mid-conversation (handoff)
- Discovery — Find PCs via QR code or mDNS (zero-config LAN discovery)
| Screen | Description |
|---|---|
| Chat | Home screen and conversation view — recent sessions, collapsible reasoning/tools, voice input, model switching, approvals, handoff |
| Workspaces | Local runtime setup, PC connections, working folders, file browser, code viewer, embedded terminal |
| Inbox | What is waiting on you across every agent: approvals, running chats and chats that finished unread |
| Schedules | Create, edit, enable/disable, and review the run history of one-time or recurring (cron) prompts |
| Usage | Tokens and cost across every chat, by day, model and agent (Drawer → Usage) |
| Git | Source control for a workspace: changes, commits, history, branches and stashes (from the file explorer's top bar) |
| Browser | The pages your agent serves, with DevTools (Settings → Guest Browser, or a local server under Artifacts) |
| Settings | Agents & providers, GitHub, MCP servers, model visibility, voice/TTS, digital assistant, language, and Storage |
- Install the APK: this fork's build from the PR APK Build workflow (Actions tab) or from source, or upstream's from its releases
- Open the app → tap Workspaces → This Android device → Set up on this device
- Wait for the runtime to download and install (~2 min on a good connection)
- Select your coding agent and start chatting
- Start OpenCode on your PC:
OPENCODE_SERVER_PASSWORD='your-strong-password' \
opencode serve --hostname 0.0.0.0 --port 4096 --mdns- Install the APK on your Android device
- Open the app → Workspaces → Add connection
- Enter your PC's IP (or use LAN search / QR code for auto-discovery)
Name: Mac mini
URL: http://192.168.1.10:4096
Username: opencode
Password: your-strong-password
Tailscale works too:
http://100.x.y.z:4096orhttp://your-mac.tailnet-name.ts.net:4096
Generate a QR code on your PC:
npx qrcode "opencode://connect?name=Mac%20mini&url=http%3A%2F%2F192.168.1.10%3A4096&username=opencode&password=your-password&insecure=true"Then scan it from Workspaces → Add via QR in the app.
- Never expose port 4096 directly to the internet
- Use LAN or Tailscale for connectivity
- Use an HTTPS reverse proxy on public networks
- The app never auto-approves dangerous operations
- Plaintext HTTP on LAN requires explicit per-connection opt-in
- PRoot is a compatibility runtime, not a full security sandbox. Full-access / bypass-permissions modes let the official CLI run commands and edit files without asking; the app warns before you turn one on, but you should still back up important files and only point an agent at repositories, prompts, and MCP servers you trust
- QR codes generated for the
opencode://connectflow can embed a plaintext connection password — only scan codes from a source you trust, and treat a printed/displayed QR code the same as sharing that password
The setup process (triggered from Workspaces):
- Verifies the native PRoot runner bundled in the APK
- Downloads Alpine Linux minirootfs from the official CDN
- Downloads the agent binary from GitHub Releases
- Validates SHA-256 checksums for both
- Extracts to a private app directory
- Installs Git, bash, curl, ripgrep, and CA certificates inside Alpine
- Starts the agent server on
127.0.0.1:4097 - Switches the app to the local runtime
Pinned versions (updatable via app releases without agent changes; see local-runtime-manifest.json):
- Alpine Linux 3.24.1
- OpenCode 1.18.5
- Google Antigravity CLI 1.1.7 (Debian Bookworm rootfs)
- Architectures: arm64-v8a, x86_64
From the chat header menu → Continue on another runtime — the app generates a conversation summary prompt and sends it to the selected runtime, letting you pick up where you left off (e.g., start on-device while commuting, continue on your PC at home).
Add server config to ~/.config/opencode/opencode.json:
{
"server": {
"port": 4096,
"hostname": "0.0.0.0",
"mdns": true
}
}Restart the desktop app, then discover it from the Android app via LAN search.
Requirements: JDK 17, Android SDK, Python 3, network access (first build only)
./gradlew detekt spotlessCheck :app:lintGithubDebug :app:testGithubDebugUnitTest :app:assembleGithubDebug :app:assembleGithubReleaseOutput APKs:
app/build/outputs/apk/github/debug/app-github-debug.apk
app/build/outputs/apk/github/release/app-github-release-unsigned.apk
Install to device:
adb install -r app/build/outputs/apk/github/debug/app-github-debug.apk- On-Device Runtime Design
- Antigravity Local Runtime
- Antigravity Agent Parity Design
- Codex Local Runtime
- CI Guide
- Release Guide
- Translation Guide
- Device Validation Matrix
- Fork Notes (debug build, upstream sync)
- Fork Features (what this fork adds, and where to find it)
- Token Efficiency
- Agentic Coding Landscape (25 tools surveyed)
Contributions are welcome — code, bug reports, and translations! Please see CONTRIBUTING.md for setup and workflow, and docs/TRANSLATION.md if you'd like to help translate the app.
- Official CLIs run on-device. OpenCode, Claude Code, Google Antigravity, and OpenAI Codex are the official, unmodified binaries from their respective projects, downloaded from their official distribution channels and executed inside the PRoot Linux environment on your device (or, for OpenCode, on your own PC/Mac/Linux machine). AndCode does not fork, patch, or re-implement their agent logic.
- You bring your own account or API access. AndCode does not sell, resell, or otherwise provide Claude, Antigravity, Codex, OpenCode-model, or GitHub access. You authenticate with your own account or provider configuration, subject to that provider's current terms of service.
- AndCode does not relay prompts or tokens through its own servers. There is no AndCode backend that prompts, files, or OAuth tokens pass through. Requests go directly from the on-device CLI (or your PC's OpenCode server) to the provider you configured. See docs/AUTHENTICATION_AND_DATA_FLOW.md.
- OAuth tokens are not reused across tools. Claude Code, Antigravity, and Codex each keep their own OAuth credentials inside the Linux/Debian rootfs the way their official CLI normally would; AndCode never copies them into Android app settings, another agent's credential store, or an external service.
- See also: PRIVACY.md, TERMS.md, THIRD_PARTY_SERVICES.md, TRADEMARKS.md, and THIRD_PARTY_NOTICES.md (OSS licenses for bundled runtime components and dependencies). All of these are also reachable offline from Settings → Legal & Privacy in the app.
Runtime generation reuses generic Termux package resolution/extraction logic redesigned for coding agents, inspired by the MIT-licensed Hermes Agent Android implementation. See THIRD_PARTY_NOTICES.md for the full list of bundled third-party components and their licenses.
The AndCode source code in this repository is MIT licensed. That license covers AndCode's own Kotlin/Android code only — it does not extend to the third-party CLIs, runtimes, or packages AndCode installs or launches (Claude Code, Google Antigravity, OpenAI Codex, OpenCode, PRoot, Alpine/Debian packages, and others), each of which is distributed under its own upstream license. See THIRD_PARTY_NOTICES.md and TRADEMARKS.md.














