DEV Community

Cover image for Install Opencode in Termux
Agus Sudarmanto
Agus Sudarmanto

Posted on

Install Opencode in Termux

## Using custom opencode

pkg update && pkg upgrade -y
pkg install curl tar python git -y

# Fetch and run the specific Termux environment installer
curl -fsSL https://hope2333.github.io/repo/install.sh | sh -s -- --install opencode

opencode --version
Enter fullscreen mode Exit fullscreen mode

curl -fsSL https://opencode.ai/v2/install | bash

## Using pacman

pacman-key --init
pacman-key --populate
pacman -Syu --overwrite "*"

pacman -Sy opencode

opencode
Enter fullscreen mode Exit fullscreen mode

## Using glibc

pkg update
pkg install glibc-repo -y
pkg install glibc-runner -y
grun /data/data/com.termux/files/home/.opencode/bin/opencode
Enter fullscreen mode Exit fullscreen mode
termux-mcp serve http
Enter fullscreen mode Exit fullscreen mode

## Using DEAD1nsane

pkg update && pkg upgrade -y
pkg install termux-api -y
termux-battery-status
pkg install curl tar python git
curl -sL https://gist.githubusercontent.com/DEAD1nsane/9b37cba090602f473200fad8b1002e6c/raw/all-in-one.sh | sh
opencode --version
opencode run "say hi"
Enter fullscreen mode Exit fullscreen mode

Top comments (0)