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 ollama
ollama serve
Ollama is now listening on port 11434 on the phone.
STEP 3
Connect it to ChathoNU
On the same phone, open chathonu.com/local, choose MY OLLAMA, and connect to:
http://localhost:11434
Pick any model you have installed. Nothing you type leaves the device.

Terminal AI agents in proot-distro

STEP 1
Install proot-distro
pkg install proot-distro
STEP 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 ubuntu
For Codex, Gemini CLI and OpenCode (Claude Code works here too):
proot-distro install fedora
For Hermes:
proot-distro install debian
STEP 3
Install Ollama inside the distro, with ChathoNU allowed
curl -fsSL https://ollama.com/install.sh | sh
OLLAMA_ORIGINS=https://chathonu.com ollama serve
Now the same Ollama works from the terminal tool and from chathonu.com/local in the browser.
STEP 4
Start a coding tool on Ollama
Leave 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 claude
Codex:
ollama launch codex
OpenCode:
ollama launch opencode
The tool has to be installed first (next section). Gemini CLI has no Ollama mode; use its Google sign-in.

Claude 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: proot-distro login fedora, the same steps work there):
proot-distro login ubuntu
Install it with npm (needs Node, see the Gemini step for how to get it):
npm install -g @anthropic-ai/claude-code
Launch it and sign in with your Claude account:
claude
No Node? Anthropic's installer works too:
curl -fsSL https://claude.ai/install.sh | bash
If claude isn't found after that, run this once, then try again:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrc
STEP 2
Codex (Fedora)
Open Fedora and install Node, then Codex:
proot-distro login fedora
dnf install -y nodejs npm
npm install -g @openai/codex
Launch it and choose "Sign in with ChatGPT":
codex
STEP 3
Gemini CLI
Gemini CLI needs Node 20 or newer. On Fedora:
dnf install -y nodejs npm
On Ubuntu, the built-in Node is too old, so get a current one first:
apt update && apt install -y curl
curl -fsSL https://deb.nodesource.com/setup_22.x | bash -
apt install -y nodejs
Then install Gemini CLI:
npm install -g @google/gemini-cli
Launch it and choose "Login with Google":
gemini
STEP 4
OpenCode
In Fedora or Ubuntu, install it with OpenCode's installer:
curl -fsSL https://opencode.ai/install | bash
Or with npm (needs Node, see the Gemini step):
npm install -g opencode-ai
Launch it, then type /connect to sign in to a provider:
opencode
STEP 5
Next time: launch in two commands
Every time after the first, just open the distro and start the tool:
proot-distro login ubuntu
claude
For Codex, Gemini CLI or OpenCode, log in to fedora 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-storage
STEP 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:
proot-distro login ubuntu --bind /storage/emulated/0:/root/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/Download:/root/downloads
STEP 3
Go to the folder and start Claude Code
cd /root/phone/Download
claude
Claude Code can now read the files in that folder. Your phone's photos are in DCIM, documents in Documents, and downloads in Download.
STEP 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 gh
npm install -g vercel
If npm isn't found, install Node first:
apt install -y nodejs npm
STEP 2
Sign in to GitHub
gh auth login
Pick GitHub.com, then HTTPS, then "Login with a web browser". It shows a code: copy it, open the link in your phone's browser, and paste the code there. Then let git use that login:
gh auth setup-git
Tell git who you are (use your own name and email):
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
STEP 3
Sign in to Vercel
vercel login
Open the link it shows in your phone's browser and approve. Then, inside your project folder, connect it to your Vercel project:
vercel link
STEP 4
Start Claude Code in your project
claude
Now just ask, for example "commit and push my changes". If your Vercel project is connected to the GitHub repo, every push to main deploys the site by itself.

Stuck on a step? Send a message and say which one.