A lightweight setup to turn your Android device into an AI-powered coding environment using Termux, Ollama, and Claude Code.
Everything you need to run AI coding on Android.
Full AI coding environment inside Termux — no root, no PC required.
Ollama acts as the local LLM server. Claude Code talks to it on port 11434.
Uses the powerful Kimi K2.5 cloud model — smart, fast, and free to pull.
Anthropic's official coding CLI, installed via npm and pointed at Ollama.
Copy-paste commands. Up and running in under 10 minutes.
No Anthropic API key needed. Ollama handles authentication locally.
Copy, paste, done. Get running in minutes on your Android phone.
Update Termux packages and install required dependencies.
$pkg update && pkg upgrade -y
$pkg install git nodejs-lts python -y
$pkg install ollama
Launch the Ollama LLM server on port 11434.
$ollama serve
Pull the Kimi K2.5 cloud model. Requires strong internet connection.
$ollama pull kimi-k2.5:cloud
Install the Anthropic CLI globally via npm.
$npm install -g @anthropic-ai/claude-code
Set environment variables to connect Claude Code to Ollama.
$echo -e '\n# Claude Code with Ollama Config\nexport ANTHROPIC_BASE_URL="http://localhost:11434"\nexport ANTHROPIC_AUTH_TOKEN="ollama"' >> ~/.bashrc && source ~/.bashrc
You're ready. Launch Claude Code with the Kimi model.
$claude --model kimi-k2.5:cloud
How the pieces connect on your phone.
$ollama serve
$claude --model kimi-k2.5:cloud
:cloud models require internet (not fully offline)Common issues and quick fixes.
ollama serve is runningollama pull kimi-k2.5:cloudnpm i -g @anthropic-ai/claude-codeTurn your Android into an AI-powered coding machine.