English | 简体中文 | 繁體中文 | 日本語 | Español
OpenCode on Termux. AI-powered coding assistant, native bionic runtime, zero glibc dependencies.
curl -fsSL https://hope2333.github.io/repo/install.sh | sh -s -- --install opencodeThis installs the opencode command. After installation, upgrade via package manager:
# Termux (default)
pkg upgrade opencode
# pacman (if initialized)
pacman -Syu opencodeOpenCode is an AI-powered terminal coding assistant. This project packages it for Termux on Android, providing native bionic binaries with zero glibc dependencies.
Five package families across two generations, installable side by side (v1 and v2 coexist):
| Package | Gen | Runtime | Size | TUI | Notes |
|---|---|---|---|---|---|
opencode |
v2 | Native bionic | ~66 MB | Full | Mainline, recommended |
opencode-wrapper |
v2 | Bun-termux-loader | ~50 MB | Full | v2 wrapper appendix |
opencode1 |
v1 | Native bionic | ~40 MB | Full | v1 mainline |
opencode1-wrapper |
v1 | Glibc runtime payload | ~40 MB | Full | v1 wrapper appendix |
opencode1-compressed |
v1 | Native bionic (UPX) | ~56 MB | Full | UPX outsourced (.pkg.tar.gz) |
Within one generation pick exactly ONE of native / wrapper / compressed; v1 (opencode1*) and v2 (opencode*) coexist.
Mainline = native bionic (opencode). Zero glibc, Android API >= 28, full TUI via bionic libopentui.so.
Termux uses apt by default. If you prefer pacman:
curl -fsSL https://hope2333.github.io/repo/install.sh | sh -s -- --install opencodeThen install:
pacman -S opencode# apt (default)
pkg upgrade opencode
# pacman
pacman -Syu opencodeThe Termux soft keyboard cannot send shift+tab, which makes the default agent.cycle keybind (shift+tab, used to switch between build/plan agents) unreachable. Override it in ~/.config/opencode/cli.json (note: in v2, keybinds live in cli.json, not opencode.json):
tab is unbound in the v2 defaults, so it does not conflict. Zero-config alternative: press <leader>a (default leader is ctrl+x) to pick an agent from the list.
- Android API >= 28 (Android 9.0+)
- Termux (F-Droid or GitHub release)
- ~200 MB free storage
Packages are published on GitHub Releases under rolling batch tags (PushYYMMDD). The latest batch is whatever the releases page lists first — this file intentionally does not hard-code it:
gh release list -R Hope2333/opencode-termux -L 3 # newest batchesEach batch ships the native / wrapper / compressed families for its version range, and SHA256SUMS.txt in the batch covers every asset.
- deb:
opencode_<ver>_aarch64.deb(Termux apt) - pacman:
opencode-<ver>-<rel>-aarch64.pkg.tar.xz(Termux pacman; currentrel= 3) - v1 compressed:
opencode1-compressed-<ver>-<rel>-aarch64.pkg.tar.gz(note.gz)
Requires make, python3, clang, and upx (optional).
# Build native bionic binary
make build-native VER=2.0.0
# Build compressed (UPX) variant
make build-native-upx VER=2.0.0
# Build deb package
make deb-native VER=2.0.0
# Build pacman package
make pacman-native VER=2.0.0See docs/make-maintainer.md for full build reference.
v2 (opencode*, 2.0.x → 2.1.x) is the mainline; v1 (opencode1*, 1.18.x → 1.19.x) is maintained and coexists with v2 — install both side by side:
pacman -S opencode # v2 mainline
pacman -S opencode1 # v1 mainlineWithin one generation, native / wrapper / compressed are mutually exclusive (pick one). The old opencode-glibc name is retired — it was renamed opencode1-wrapper (v1) / replaced by opencode-wrapper (v2).
- docs/transplant.md -- Runtime transplant pipeline
- docs/comparison-runtime-lines.md -- Runtime line comparison
- docs/dual-track-install.md -- Dual-track install guide
- docs/make-maintainer.md -- Makefile reference
Issues stay open until the problem is gone. If an issue was marked closed but you still hit the problem, please reopen it (or comment on it) — that is welcome, not noise. A closed issue here means "we believe it's fixed", not "stop talking".
English — Chat, Q&A and ideas. RC3 refreshed the whole two-generation family: 13 v2 versions (native & wrapper) + v1 three families (1.18.30–32), all PKGREL=3, 70 assets digest-verified.
OpenCode is open source. This packaging project follows the same license.

{ "$schema": "https://opencode.ai/v2/cli.json", "keybinds": { "agent.cycle": "tab", "agent.cycle.reverse": "shift+tab" } }