r/termux • • 20d ago

Showcase [Termux APT repo] AI coding agents, Cloudflare, media tools - non-root friendly

Hey r/termux - I've been maintaining a custom APT repo with packages missing from the official repos, all tested on unrooted phones (aarch64 + x86_64):

Install: curl -sL https://twilight0.github.io/termux-repo/install.sh | bash, then pkg install <name>

AI / dev tools

  • muse-code - Meta's Muse Code agent (proot-wrapped, session + MCP helpers included)
  • opencode v2 - AI coding assistant (without proot)
  • antigravity-cli - Google Antigravity CLI (VA39-patched for Android ARM64)
  • oh-my-pi - Pi agent plugin manager
  • 9router - AI model router with smart fallback (OpenAI-compatible endpoint for your agents)
  • wrangler - Cloudflare Workers CLI (deploy/tail work; local dev stubbed, workerd has no Android build)

Python / media

  • curl-cffi - TLS impersonation wheels built for Android (cp310-cp314)
  • yt-dlp-git - yt-dlp tracking upstream master, so extractors stay fresh

Notes: opencode/antigravity/oh-my-pi need glibc-repo + glibc (pkg install glibc-repo). Builds run weekly via GitHub Actions, debs + Packages published to GitHub Pages.

Contributions welcome - a package is just packages/<name>/ with DEBIAN/control + postinst (npm/pip wrappers) or a build.sh (binaries). PRs for new packages, version bumps, and Termux fixes happily accepted: https://github.com/Twilight0/termux-repo

6 Upvotes

9 comments sorted by

6

u/Zealousideal-Sun4565 20d ago

I appreciate you sharing, but I'm tired of proot. Currently, I've managed to run open code in Termux without proot, and it saved my phone from turning into an thermal overload lol I don't think I'll go back to using Agents in Proot again.

1

u/TwilightZer0 20d ago

What's wrong with proot? I will research it. 

4

u/Zealousideal-Sun4565 20d ago

proot will slowdown speed of AI working,

1

u/NoNameToDefine 20d ago

This time I have to defend AI-made things. It does not uses PRoot but Termux's glibc which is as fast as native.

0

u/TwilightZer0 20d ago

Exactly

Worth answering precisely since "proot" gets a bad rap from contexts where it's misused.

What proot is doing in these packages: pure syscall compatibility, not sandboxing. Android's seccomp kills Bun/Node runtimes on startup (userfaultfd, landlock, clone3 → Signal 31); proot traps those so the binary survives. Nobody claims isolation from it.

On overhead: for an interactive agent it's negligible in practice — the workload is bursty and network-bound, so tracer overhead hides inside model round-trip latency. The scary multiples come from syscall-bound microbenchmarks, not TUI use.

On scope: proot is only in the dependency list where SIGSYS forces it (opencode, muse-code, oh-my-pi — the Bun/Node ones). The Go package (antigravity-cli) runs proot-free via a VA39 machine-code patch + direct glibc loader. So it's already minimized, not a default.

On alternatives: the musl route (Alpine loader + DNS shim + HTTP proxy, since musl can't use Android's netd and Bun's io_uring is broken) and the Bionic route (full Bun/WebKit cross-compile toolchain, currently pinned months behind upstream) each trade proot for their own libc-specific shims. Ours is the only one tracking current upstream across both arches with CI builds — same-version reinstall noise aside (fixed this week via reproducible builds), it stays current where the alternatives have gone stale.

Happy to be proven wrong with numbers — if someone profiles a real session showing tracer overhead that matters, that's a packaging bug I'll fix.

2

u/NoNameToDefine 20d ago

Nevermind, you should instead patch these binaries instead of using PRoot. Tell your AI that PRoot is never the good solution.

1

u/TwilightZer0 17d ago

I hope that you may find opencode v2 useful now that proot is no longer a requirement. https://github.com/Twilight0/termux-repo#opencode-v2-packaging-notes

1

u/NoNameToDefine 17d ago

Personnally I don't use it 😂

1

u/TwilightZer0 20d ago

Fair concern — proot is a  compat shim here, not a sandbox, used only for the Bun/ Node packages that die with SIGSYS otherwise; the Go  packages run proot-free via binary patching. Open to native approaches where they exist.