Codex: Run an AI Coding Agent on Your Android Phone

July 10, 2026 · 8 min read

CodingAITermux
Some links below are affiliate links. I may earn a commission at no extra cost to you.

What Is Codex?

Codex is OpenAI's open-source AI coding agent. It runs in your terminal, understands your codebase, and can write, edit, and debug code autonomously. Think of it as an AI pair programmer that lives in your terminal.

Why Codex + 9Router?

Codex works with any OpenAI-compatible API. By pointing it at 9Router (http://localhost:20128/v1), you get access to 18+ providers without paying for OpenAI API credits. Use free models like Groq's Llama 3.3 70B or Cloudflare's Qwen for coding tasks.

Installation

Requirements: Node.js 18+ and 9Router installed.

npm install -g @openai/codex

Configure it to use 9Router:

export OPENAI_API_KEY="sk-d25ec2e336a68df0-r5e3uw-03b936b4"
export OPENAI_BASE_URL="http://localhost:20128/v1"
codex --model groq/llama-3.3-70b-versatile

Daily Usage

Navigate to any project and run Codex:

cd my-project
codex "add error handling to the API routes"

Codex will read your files, understand the context, and make changes. It handles:

Best Models for Coding

ProviderModelQualityCost
GroqLlama 3.3 70B★★★★Free
Cloudflare AIQwen 2.5 Coder 32B★★★★★Free (10k/day)
GeminiGemini 2.5 Pro★★★★★Free tier
OpenRouterVarious★★★-★★★★★Free options

Tips

This article contains affiliate links. I may earn a commission at no extra cost to you.