r/termux • u/FarState1045 • 5d ago
Showcase Termux native Opencode
So I compiled a bionic build of opencode as far as I've tested every function (except for fff) works.
Repo: https://github.com/Astreele/opencode-android
You can use the install script from there and simply update your opencode using your package manager (pkg update && pkg upgrade) it builds the latest releases from the opencode repo daily
3
2
u/Mammoth-Apple410 5d ago
3
u/FarState1045 5d ago
It's not issue it means you already have an opencode installed run bash <(curl -fsSL https://raw.githubusercontent.com/astreele/opencode-android/master/install.sh) --force
1
u/Gneelce 5d ago
This is great, I've been hoping for something like this for a while.
Install went fine, I can list models and add API keys. I can use the web interface as well.
But any request fails with "Unable to connect. Is the computer able to access the url?"
It seems to be an issue coming up from npm, but how could I figure out what the failing request is to troubleshoot it?
I have spent more than an hour trying to figure it out myself, but I'm out of ideas.
1
u/FarState1045 5d ago
Are you getting that issue while using the web UI or is it both cli and web UI?
1
u/GamerWael 4d ago
Happened with me as well, apparently it needs a local proxy to route requests which didn't automatically get copied over for me. Though I used another opencode termux repo and I dont see any proxy.py file in this repo but might help investigating.
1
u/FarState1045 4d ago
That's really perplexing mine doesn't require a proxy to work I've tested it in a fresh termux environment but everything seems to be fine in my end
1
u/Flaky_Ad_7038 5d ago
I played with it and rust/ratatui and my copilot subscription. It is just like a PC
1
u/ctanna5 4d ago
I thought we already had opencode in termux? Or I must be missing something?
1
u/Zealousideal-Sun4565 4d ago
opencode v2 official support, termux, like 1 months ago, and people be like, omg, how he can do it 🤡🤡 I don't want to sound envious, but I've actually been using Termux opencode for almost two months now.
1
u/FarState1045 4d ago
That's not true? Opencode v2 doesn't support termux officially and yeah true using opencode on termux isn't an achievement at all there are so many repos on it and you can simply use glib C runner/proot distro to run it I've been using it for well over a year myself
1
u/Zealousideal-Sun4565 4d ago
no you don't need any proot or repo, just use hermes and tell it , it will fix the environment so you can install opencode v2 without any proot
2
u/FarState1045 4d ago
Yeah it'll just use a wrapper or use the glib C runner I mentioned before it's still not official and installing Hermes just so you can install opencode doesn't seem the most convenient
1
u/Zealousideal-Sun4565 3d ago
ok i use your repo and it install one shot, its amazing but it opencode 1: ) ao what the command for opencode 2
1
u/FarState1045 3d ago
It's for convenience if you want to keep it as Opencode2 only then you'll have to run the install script with the script --no-link flag mentioned in the installer options in the read me
1
u/Overall-Speed8026 3d ago
1
u/FarState1045 2d ago
What's your android version & CPU architecture?
1
1
u/Overall-Speed8026 2d ago
No more help needed, i installed opencode via tvp
1
u/FarState1045 2d ago
https://github.com/oven-sh/bun/issues/30766 I think it's because of this issue in bun itself I'll see what I can do for this later
1
u/Psychological-View22 2d ago
And how to config OOM killer in Android? And how is tour Free -m?
2
u/FarState1045 2d ago
I don't know to config your OOM killer as I haven't messed with it but here's my memory usage | Memory | Total (MiB) | Used (MiB) | Free (MiB) | Available (MiB) | |---|---:|---:|---:|---:| | RAM | 7354 | 6016 | 122 | 1338 | | Swap | 8191 | 4030 | 4161 | — | Keep it mind I've 4 apps running in the background along with a termux proot desktop along with an AI agent


5
u/AbjectWonder3961 5d ago
Pi is built with termux in mind, and also open source: https://pi.dev/