Files
openclaude/ANDROID_INSTALL.md
T
GravireiandGravirei afa71563b6 chore(rebrand): update Gitlawb references to Twigpine (#2246) (#2248)
* chore(rebrand): update Gitlawb references to Twigpine (#2246)

The GitHub org has been renamed to Twigpine, so point repo URLs, badges,
CI repo-identity guards, and user-facing sponsor/partner labels at the new
name.

Scope is deliberately limited to references that are safe to change today:

- GitHub URLs (github.com, api.github.com, raw.githubusercontent.com),
  including the skills registry and release-please release notes
- The release-please release trigger, which gates on the repo slug and
  would otherwise stop publishing
- User-visible display strings: gateway label/name, AI/ML API partner
  name, sponsored-tip sponsor, and docs/site prose

Left on the old name because the rename has not landed for them:
- `@gitlawb/openclaude` npm scope (the package does not exist on npm)
- opengateway/ads/docs subdomains, which resolve only under gitlawb.com
- The `gitlawb-opengateway` preset id, tip ids, and gateway file names,
  which are persisted in user config and sent on the wire

* fix(aimlapi): stop matching topup intent on partnerName (#2246)

partnerName is display metadata that travels alongside the partner id, not
part of the intent identity. It is now excluded from INTENT_KEYS, so
matchesIntent no longer requires it to be unchanged.

Without this, renaming the partner on the Gitlawb -> Twigpine rebrand would
have stranded any in-flight topup: a receipt persisted under the old name
fails the strict equality check, so loadAimlapiTopupState returns null and
the user restarts checkout. partnerId remains the identity field, so
receipts are still scoped to the correct partner.

* fix(web): use current Twigpine artwork for the partner card (#2246)

The partner asset was a byte-identical rename, so the roster row rendered
the former GitLawb key/branch symbol under the Twigpine name while the
README pointed at the official tree mark. Vendors the current artwork from
twigpine.com/logo.png, resized to the roster's 256x256 convention, keeping
the self-hosting contract in web/src/data/partners.ts.

---------

Co-authored-by: Gravirei <gravirei@users.noreply.github.com>
2026-10-12 09:15:34 +08:00

3.9 KiB
Raw Permalink Blame History

OpenClaude on Android (Termux)

A complete guide to running OpenClaude on Android using Termux + proot Ubuntu.


Prerequisites

  • Android phone with ~700MB free storage
  • Termux installed from F-Droid (not Play Store)
  • An OpenRouter API key (free, no credit card required)

Why This Setup?

OpenClaude requires Bun to build, and Bun does not support Android natively. The workaround is running a real Ubuntu environment inside Termux via proot-distro, where Bun's Linux binary works correctly.


Installation

Step 1 — Update Termux

pkg update && pkg upgrade

Press N or Enter for any config file conflict prompts.

Step 2 — Install dependencies

pkg install nodejs-lts git proot-distro

Verify Node.js:

node --version  # should be v20+

Step 3 — Clone OpenClaude

git clone https://github.com/Twigpine/openclaude.git
cd openclaude
npm install
npm link

Step 4 — Install Ubuntu via proot

proot-distro install ubuntu

This downloads ~200–400MB. Wait for it to complete.

Step 5 — Install Bun inside Ubuntu

proot-distro login ubuntu
curl -fsSL https://bun.sh/install | bash
source ~/.bashrc
bun --version  # should show 1.3.13+

Step 6 — Build OpenClaude

cd /data/data/com.termux/files/home/openclaude
bun run build

You should see:

✓ Built openclaude v0.1.6 → dist/cli.mjs

Step 7 — Save env vars permanently

Still inside Ubuntu, add your OpenRouter config to .bashrc:

echo 'export CLAUDE_CODE_USE_OPENAI=1' >> ~/.bashrc
echo 'export OPENAI_API_KEY=your_openrouter_key_here' >> ~/.bashrc
echo 'export OPENAI_BASE_URL=https://openrouter.ai/api/v1' >> ~/.bashrc
echo 'export OPENAI_MODEL=qwen/qwen3.6-plus-preview:free' >> ~/.bashrc
source ~/.bashrc

Replace your_openrouter_key_here with your actual key from openrouter.ai/keys.

Step 8 — Run OpenClaude

node dist/cli.mjs

Select 3 (3rd-party platform) at the login screen. Your env vars will be detected automatically.


Restarting After Closing Termux

Every time you reopen Termux after killing it, run:

proot-distro login ubuntu
cd /data/data/com.termux/files/home/openclaude
node dist/cli.mjs

qwen/qwen3.6-plus-preview:free — Best free model on OpenRouter as of April 2026.

  • 1M token context window
  • Beats Claude 4.5 Opus on Terminal-Bench 2.0 agentic coding (61.6 vs 59.3)
  • Built-in chain-of-thought reasoning
  • Native tool use and function calling
  • $0/M tokens (preview period)

⚠️ Free status may change when the preview period ends. Check openrouter.ai for current pricing.


Alternative Free Models (OpenRouter)

Model ID Context Notes
qwen/qwen3-coder:free 262K Best for pure coding tasks
openai/gpt-oss-120b:free 131K OpenAI open model, strong tool calling
nvidia/nemotron-3-super-120b-a12b:free 262K Hybrid MoE, good general use
meta-llama/llama-3.3-70b-instruct:free 66K Reliable, widely tested

Switch models anytime:

export OPENAI_MODEL=qwen/qwen3-coder:free
node dist/cli.mjs

Why Not Groq or Cerebras?

Both were tested and fail due to OpenClaude's large system prompt (~50K tokens):

  • Groq free tier: TPM limits too low (6K–12K tokens/min)
  • Cerebras free tier: TPM limits exceeded, even on llama3.1-8b

OpenRouter free models have no TPM restrictions — only 20 req/min and 200 req/day.


Tips

  • Don't swipe Termux away from recent apps mid-session — use the home button to minimize instead.
  • The Ubuntu environment persists between Termux sessions; your build and config are saved.
  • Run bun run build again only if you pull updates to the OpenClaude repo.