Hope2333/opencode-termux
حول
OpenCode on Termux: native bionic builds (v2 mainline) + v1 maintenance line
أدوات التطويرالنمو المقاس للنجوم
- خلال 24 ساعة
- +٢
- خلال 7 أيام
- +١٢
- خلال 15 يومًا
- +٢٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلEnglish | 简体中文 | 繁體中文 | 日本語 | Español
opencode-termux
OpenCode on Termux. AI-powered coding assistant, native bionic runtime, zero glibc dependencies.

Quick install
curl -fsSL https://hope2333.github.io/repo/install.sh | sh -s -- --install opencode
This installs the opencode command. After installation, upgrade via package manager:
# Termux (default)
pkg upgrade opencode
# pacman (if initialized)
pacman -Syu opencode
What is this
OpenCode 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.
Install via pacman (optional)
Termux uses apt by default. If you prefer pacman:
curl -fsSL https://hope2333.github.io/repo/install.sh | sh -s -- --install opencode
Then install:
pacman -S opencode
Upgrade
# apt (default)
pkg upgrade opencode
# pacman
pacman -Syu opencode
Termux notes
The 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):
{
"$schema": "https://opencode.ai/v2/cli.json",
"keybinds": {
"agent.cycle": "tab",
"agent.cycle.reverse": "shift+tab"
}
}
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.
Requirements
- Android API >= 28 (Android 9.0+)
- Termux (F-Droid or GitHub release)
- ~200 MB free storage
Packages
Stable releases
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 batches
Each batch ships the native / wrapper / compressed families for its version range, and SHA256SUMS.txt in the batch covers every asset.
Package formats
- 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)
Building from source
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.0
See docs/make-maintainer.md for full build reference.
v1 and v2 (two generations)
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 mainline
Within 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).
Technical documentation
- 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
💬 Community & Discussions
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.
License
OpenCode is open source. This packaging project follows the same license.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…