# OpenCode for Termux (Android aarch64)

A build system that cross-compiles the OpenCode terminal AI coding assistant, along with the Bun runtime and WebKit's JavaScriptCore engine it depends on, to run natively on Android devices through Termux.

OpenCode compiles to a standalone binary using Bun's compile feature, but Bun has no official Android support, so this project cross-compiles Bun itself from source for Android aarch64, including the full WebKit and JavaScriptCore engine, and packages the result for Termux as pacman and deb packages plus a standalone binary zip. The pacman and deb packages install ripgrep automatically as a dependency.

Two versions install side by side without overwriting each other: a stable 1.x build on a patched Bun 1.2.13 with WebKit and JSC, and a pre-release 2.x build on the official Bun 1.4.2 Android target with OpenTUI. The repository holds only patch files and build scripts, not the full Bun or WebKit source trees; its CI workflow clones the upstream repositories and applies the patches during the build. After installing, OpenCode still needs an AI provider API key, such as Anthropic or OpenAI, configured as an environment variable to work.

Website: https://github.com/guysoft/opencode-termux
