THE FIELD GUIDES
AI on Android (Termux)
Copy-paste steps for running AI on your phone. Tap COPY, paste into Termux. These go with the AI-on-Android videos on YouTube. More tools (Copilot, Grok, Kimi, Qwen, Mistral and more) are on the CLI AI tools page.
The quickest way: no setup at all
STEP 1
Open the offline chat
Go to chathonu.com/local, pick the model marked BEST PICK, tap DOWNLOAD, then USE. It runs in your browser on the phone itself and keeps working in airplane mode.
Ollama on your phone with Termux
STEP 1
Install Termux from F-Droid
Use the F-Droid version. The Play Store build is out of date.
STEP 2
Install and start Ollama
pkg install ollamaollama serveSTEP 3
Connect it to ChathoNU
On the same phone, open chathonu.com/local, choose MY OLLAMA, and connect to:Pick any model you have installed. Nothing you type leaves the device.
http://localhost:11434Terminal AI agents in proot-distro
STEP 1
Install proot-distro
pkg install proot-distroSTEP 2
Install the Linux that matches your tool
Pick the distro for your tool. Claude Code works on Ubuntu and on Fedora, both the official sign-in version and the Ollama version.
For Claude Code (or use Fedora):
proot-distro install ubuntuFor Codex, Gemini CLI and OpenCode (Claude Code works here too):
proot-distro install fedoraFor Hermes:
proot-distro install debianSTEP 3
Install Ollama inside the distro, with ChathoNU allowed
curl -fsSL https://ollama.com/install.sh | shOLLAMA_ORIGINS=https://chathonu.com ollama serveSTEP 4
Start a coding tool on Ollama
Leave The tool has to be installed first (next section). Gemini CLI has no Ollama mode; use its Google sign-in.
ollama serve running, open a second Termux session (swipe in from the left, New session), log in to the same distro, and start the tool through Ollama. It asks which model to use:Claude Code:
ollama launch claudeCodex:
ollama launch codexOpenCode:
ollama launch opencodeClaude Code, Codex, Gemini CLI and OpenCode with the official sign-in (no Ollama)
The normal way: each tool signs in to its own account (a Claude, ChatGPT or Google account) instead of using Ollama. Do the proot-distro install above first. When a tool shows a sign-in link, open it in your phone's browser, approve, and come back to Termux.
STEP 1
Claude Code (Ubuntu or Fedora)
Open Ubuntu (or Fedora: Install it with npm (needs Node, see the Gemini step for how to get it):Launch it and sign in with your Claude account:No Node? Anthropic's installer works too:If
proot-distro login fedora, the same steps work there):proot-distro login ubuntunpm install -g @anthropic-ai/claude-codeclaudecurl -fsSL https://claude.ai/install.sh | bashclaude isn't found after that, run this once, then try again:echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrcSTEP 2
Codex (Fedora)
Open Fedora and install Node, then Codex:Launch it and choose "Sign in with ChatGPT":
proot-distro login fedoradnf install -y nodejs npmnpm install -g @openai/codexcodexSTEP 3
Gemini CLI
Gemini CLI needs Node 20 or newer. On Fedora:On Ubuntu, the built-in Node is too old, so get a current one first:Then install Gemini CLI:Launch it and choose "Login with Google":
dnf install -y nodejs npmapt update && apt install -y curlcurl -fsSL https://deb.nodesource.com/setup_22.x | bash -apt install -y nodejsnpm install -g @google/gemini-cligeminiSTEP 4
OpenCode
In Fedora or Ubuntu, install it with OpenCode's installer:Or with npm (needs Node, see the Gemini step):Launch it, then type
curl -fsSL https://opencode.ai/install | bashnpm install -g opencode-ai/connect to sign in to a provider:opencodeSTEP 5
Next time: launch in two commands
Every time after the first, just open the distro and start the tool:For Codex, Gemini CLI or OpenCode, log in to
proot-distro login ubuntuclaudefedora instead and run codex, gemini or opencode. Claude Code also runs from Fedora. Run them inside your project folder so they can see your files.Let Claude Code see your phone files
STEP 1
Give Termux access to your storage
In Termux itself (not inside Ubuntu), run this and tap Allow when Android asks:
termux-setup-storageSTEP 2
Open Ubuntu with your phone storage linked in
This logs in to Ubuntu and makes your phone's files show up in a folder called phone:Want Claude Code to see only one folder? Link just that one, for example your Downloads:
proot-distro login ubuntu --bind /storage/emulated/0:/root/phoneproot-distro login ubuntu --bind /storage/emulated/0/Download:/root/downloadsSTEP 3
Go to the folder and start Claude Code
cd /root/phone/DownloadclaudeSTEP 4
Stay safe
Claude Code can change or delete files in any folder you link. It asks before making changes, so read each request before you approve it, and link only the folders it needs.
Connect Claude Code to GitHub and Vercel
Run these inside Ubuntu (proot-distro login ubuntu). After this, Claude Code can commit, push and deploy for you.
STEP 1
Install git, the GitHub CLI and the Vercel CLI
apt update && apt install -y git ghnpm install -g vercelapt install -y nodejs npmSTEP 2
Sign in to GitHub
gh auth logingh auth setup-gitgit config --global user.name "Your Name"git config --global user.email "you@example.com"STEP 3
Sign in to Vercel
vercel loginvercel linkSTEP 4
Start Claude Code in your project
claudeStuck on a step? Send a message and say which one.