Scripts, configuraciones y documentación para ejecutar Claude Code CLI en Termux/Android. Incluye wrapper con termux-chroot para /tmp, actualizador seguro con techo de versión v2.1.112, resolver mDNS puro en Python y ProxyCommand SSH con fallback Tailscale. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| bin | ||
| config | ||
| docs | ||
| .gitignore | ||
| README.md | ||
| install.sh | ||
README.md
Claude Code for Termux
Run Claude Code CLI on Android via Termux.
Why
Claude Code v2.1.113+ switched to native binaries, breaking Termux/Android compatibility. This repo provides:
- v2.1.112 (last pure Node.js release) with auto-update protection
- termux-chroot wrapper that fixes the
/tmppermission issue - mDNS resolver for SSH without hardcoded IPs
- Safe updater that respects the version ceiling
Requirements
- Termux (F-Droid recommended)
- Android 10+ (ARM64)
- ~500MB free storage
- An Anthropic API key or Claude subscription
Quick Install
git clone <your-gitea-url>/andres/claude-code-termux.git
cd claude-code-termux
bash install.sh
Or dry-run first:
bash install.sh --dry-run
What Gets Installed
| Component | Location | Purpose |
|---|---|---|
| Claude Code v2.1.112 | npm global | The CLI itself |
clauded |
~/.local/bin/ |
Wrapper with termux-chroot for /tmp |
claude-check-env |
~/.local/bin/ |
Environment validator |
claude-update |
~/.local/bin/ |
Safe updater (ceiling-aware) |
mdns-resolve |
~/.local/bin/ |
Pure Python mDNS resolver |
ssh-mdns-proxy |
~/.local/bin/ |
SSH ProxyCommand with mDNS+Tailscale |
settings.json |
~/.claude/ |
Disables auto-updater |
Usage
# Start Claude Code (always use this, not `claude` directly)
clauded
# Check environment
claude-check-env
# Update (safe, respects version ceiling)
claude-update
SSH with Dynamic Resolution
The included ssh-mdns-proxy resolves hostnames via mDNS first, then Tailscale DNS, then cache. See config/ssh_config.example for setup.
# Set your Tailscale domain (optional, has a default)
export TAILSCALE_DOMAIN="your-tailnet.ts.net"
Version Ceiling
v2.1.112 is the last compatible version. Starting v2.1.113, Claude Code ships native binaries requiring glibc/musl linkers that don't exist on Android (Bionic libc).
claude-update enforces this automatically. See docs/TROUBLESHOOTING.md for details.
Troubleshooting
See docs/TROUBLESHOOTING.md for:
/tmppermission errors- Native binary errors
- Auto-updater issues
- SSH resolution problems
License
MIT