opencode for Termux — a native Android AI coding agent

Run the open-source opencode terminal coding agent natively on your Android phone: a self-hosted alternative to cloud coding agents, rebuilt for Bionic aarch64 — no proot, no chroot, no root, no glibc.

stable version 2.4.3 v1 version 1.19.6-v1.f4e363c8 dev version 2.4.3-dev.88b03b91 bun-termux version 1.4.5-patched

1One command to install

Pick a channel, paste the command inside Termux. Afterwards pkg upgrade opencode keeps you current on that channel.

curl -fsSL https://raw.githubusercontent.com/bd-loser/opencode-bionic/main/repo-setup.sh | bash
curl -fsSL https://raw.githubusercontent.com/bd-loser/opencode-bionic/main/repo-setup.sh | OPENCODE_CHANNEL=v1 bash
curl -fsSL https://raw.githubusercontent.com/bd-loser/opencode-bionic/main/repo-setup.sh | OPENCODE_CHANNEL=dev bash

stable tracks whatever upstream tags newest (2.x now, recommended) · v1 keeps the 1.x line · dev is the 2.x rolling edge · signed repository, one package: opencode.

2What's inside

Native, not emulated

Bionic aarch64 build — links Android's own libc directly. No proot, no chroot, no VM, no root.

Real terminal UI

The TUI runs on opentui, rebuilt for Android as the @androidtui packages — rendered on-device, 16 KiB page aligned.

Terminal sessions that work

Interactive PTYs via a Bionic-rebuilt bun-pty and a static-Bionic persistent pty service — real shell sessions, real tmux-style workflows.

Signed apt repository

Three channels (stable / v1 / dev) in a GPG-signed repo. One build per upstream version, auto-synced from upstream about hourly.

Powered by patched Bun

bun-termux is Bun rebuilt for Bionic: SELinux-safe JIT, syscall traps, shebang remapping — the engine the agent runs on.

MIT, free, private

Same MIT license as upstream opencode. Nothing collected, nothing phoned home, everything open.

3Screenshots

Terminal running the opencode TUI welcome screen on an Android phone in Termux
The opencode TUI welcome screen, right after install.
opencode model picker in Termux showing free and paid model options
The model picker — free models included, start coding without paying.

Model-agnostic: Anthropic, OpenAI, OpenRouter, Ollama — any OpenAI-compatible endpoint, configured exactly like upstream (opencode.ai/docs).

4bun-termux: Bionic-patched Bun

The same signed pipeline also ships bun-termux — the Bun runtime rebuilt to link Android's Bionic libc, so any Bun tooling runs in Termux without glibc tricks.

curl -fsSL https://raw.githubusercontent.com/bd-loser/bun-termux/main/scripts/install.sh | bash

Current: v1.4.5-patched · MIT · repository

5How it works & FAQ

  • A patched Bun (bun-termux) links Bionic instead of glibc.
  • opentui is rebuilt for android-arm64 and published as the @androidtui packages.
  • An hourly watcher mirrors upstream opencode; each upstream version produces one signed .deb per channel.
What device do I need?

Any aarch64 Android phone on Android 10 or newer — essentially all devices from the last seven years. Only Termux is required; no root.

How do updates arrive?

pkg upgrade opencode on your chosen channel. Stable tracks whatever upstream tags newest; v1 keeps the 1.x line; dev tracks upstream's rolling branch — one release per upstream version, typically within the hour.

Is anything collected?

No. No analytics, no cookies, no third-party runtime requests on this site, and no telemetry in the packages. Sync state is anonymous.

What is bun-termux for?

It's the patched Bun runtime the agent itself runs on — and a general Bun for Termux if you want to build your own tools. Install with the command above.