Disclaimer: This is a personal project built for the Termux community. It is not affiliated with, endorsed by, or sponsored by OpenCode or any of its maintainers.
TypeScript build pipeline for OpenCode on Termux (aarch64). Downloads the latest upstream ARM64 binary, wraps it for Android compatibility, and produces installable .deb packages.
curl -fsSL https://raw.githubusercontent.com/sang765/opencode-termux-setup/main/setup.sh | bashFor fish users:
curl -fsSL https://raw.githubusercontent.com/sang765/opencode-termux-setup/main/setup.fish | fishVerifies each dependency (glibc-repo, glibc, openssl-glibc, bun) individually via dpkg -s and installs anything missing. Recommended for first-time setup or troubleshooting.
bunx -y github:sang765/opencode-termux-setup#mainThis:
- Checks your installed OpenCode version
- Compares with the latest upstream release
- Not installed? Builds and installs automatically (no prompt)
- Outdated? Prompts with an interactive arrow-key menu
- Up to date? Prints confirmation and exits
No clone needed — bunx fetches and runs everything from GitHub.
Add this to ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish for quick access:
alias oc-termux='bunx -y github:sang765/opencode-termux-setup#main'Or via pkg bin name (works with tools that respect npm bins):
bunx -y oc-termux- Termux on aarch64
bun— only needed for local development
Missing build tools are auto-installed via apt on first run.
| Command | Mode |
|---|---|
bunx -y github:sang765/opencode-termux-setup#main |
Check & update — version check, auto-install or prompt, no launch |
bunx -y github:sang765/opencode-termux-setup#main --debug |
Verbose — full build logs with [opencode-termux] prefix |
bunx -y github:sang765/opencode-termux-setup#main --pkg deb |
Build only — create .deb without installing |
OpenCode for Termux
Installed 1.17.4
Upstream 1.17.4
You're on the latest version
When OpenCode is not installed:
OpenCode for Termux
Installed Not Installed
Upstream 1.17.8
New version 1.17.8 is available
✓ Building OpenCode
✓ Install complete
bunx -y github:sang765/opencode-termux-setup#main --debugShows verbose build logs useful for troubleshooting.
Note:
--debugafter the package name passes it to our tool.
bunx --debug ...is bunx's own debug mode — use-yinstead to skip prompts.
git clone https://github.com/sang765/opencode-termux-setup.git
cd opencode-termux-setup
bun install
bun start # interactive mode
bun start --debug # verbose build
bun start --pkg deb -i # build and install specific version
bun start -v 1.17.4 # build specific versionTo test the published version locally before release:
npm pack # creates a .tgz
bunx ./opencode-termux-setup-*.tgz| Flag | Description |
|---|---|
-v, --version <ver> |
Version to build (default: latest from npm) |
--pkg <type> |
Package type: deb, pacman, or both (default: deb) |
-i, --install |
Install the resulting .deb after building |
-k, --keep |
Keep .work/ directory for debugging |
--debug |
Show verbose build output |
-h, --help |
Show help |
- Resolves the latest
opencode-linux-arm64version from npm - Downloads the upstream binary (npm pack, falls back to GitHub release)
- Wraps it with bun-termux for Android compatibility (no proot needed)
- Stages the install prefix (launcher, runtime, statx seccomp shim)
- Builds a
.debpackage - Cleans up intermediate artifacts — only the
.debremains
packaging/dpkg/opencode_<version>_aarch64.deb
apt install ./packaging/dpkg/opencode_1.17.4_aarch64.deb
opencode --versionMIT
