镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

About

OpenCode on Termux: native bionic builds (v2 mainline) + v1 maintenance line

Resources

Stars

311 stars

Watchers

5 watching

Forks

Repository files navigation

English | 简体中文 | 繁體中文 | 日本語 | Español

opencode-termux

OpenCode on Termux. AI-powered coding assistant, native bionic runtime, zero glibc dependencies.

opencode v2 TUI

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; current rel = 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

💬 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".

Discussions

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.

General Q&A Ideas Announcements Show and tell

License

OpenCode is open source. This packaging project follows the same license.

About

OpenCode on Termux: native bionic builds (v2 mainline) + v1 maintenance line

Resources

Stars

311 stars

Watchers

5 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages