In June 2026, free AI coding tokens are more abundant than most developers assume. A standard Google account unlocks 1,000 OAuth requests per day on Gemini CLI. Cursor Hobby ships 2,000 Tab completions plus 50 slow premium requests every month. Register on SiliconFlow in China and you receive 20 million permanent tokens. Stack Cursor Pro ($20/mo), Claude Pro ($20/mo), and Copilot Pro ($10/mo) and you are looking at well over $600 per year—this playbook shows how to cover most daily work at $0.
This article targets indie developers, students, and engineers in regions with uneven access to US-hosted services. We map free tiers for Gemini CLI, Codex CLI, Claude Code, OpenCode, OpenClaw, GitHub Copilot, and Cursor, plus domestic APIs such as SiliconFlow, Alibaba Model Studio, and Zhipu GLM. After reading you should know which tools need no credit card, what to do before Gemini CLI shuts down on June 18, 2026, how to run terminal agents without a VPN in China, and how to stretch free quotas on a Mac-based 24/7 workflow.
01 Why free AI coding is harder than the headlines suggest
Search results promise unlimited assistants. In practice, sustainable zero-cost workflows fail for reasons that have little to do with the headline quota number.
- Policy windows are short: Google will stop serving Gemini CLI for free, Google AI Pro, and Ultra individual users on June 18, 2026. Migration to Antigravity CLI is mandatory. Anyone still on OAuth free Gemini has less than two weeks to rehearse alternatives.
- Student perks tightened: Since April 20, 2026, GitHub has paused new sign-ups for Copilot Student, Pro, and Pro+ (Copilot Free remains open). Verified students keep access; new enrollees cannot rely on the student Pro shortcut.
- Network layering: Official paths for Gemini CLI, Codex CLI, and Claude Code assume stable access to US endpoints. Generous quotas mean nothing if OAuth handshakes fail on a flaky hotspot.
- Token black holes:
/initin Claude Code and Codex scans the entire repository in one shot, often burning hundreds of thousands of tokens. Many users blame the model when the real issue is command misuse.
Core thesis: free AI coding is not finding one forever-free tool—it is building a portfolio of rotating clients, regional API fallbacks, and usage discipline, then rehearsing migration before vendors change terms.
02 June 2026 snapshot: free-tier comparison for mainstream coding assistants
The table below reflects public free tiers as of June 9, 2026. Policies change—re-check vendor sites before you ship production workflows.
| Tool / platform | Free quota | Paid account required | Direct access from China |
|---|---|---|---|
| Gemini CLI (OAuth) | 1,000 req/day, 60/min | No | Proxy needed |
| Gemini API (AI Studio) | Flash 1,500/day; Pro 100/day | No | Proxy needed |
| Codex CLI | ChatGPT free account (limited-time) | No | Works with domestic API |
| OpenCode | Client free; pay per API | No | Works with domestic API |
| GitHub Copilot Free | 2,000 completions + 50 premium/mo | No | Yes |
| Cursor Hobby | 2,000 Tab + 50 slow premium/mo | No | Yes |
| SiliconFlow | 20M tokens on signup (permanent) | No | Yes |
| Alibaba Model Studio | 70M tokens (70+ models) | No | Yes |
Three lines worth prioritizing: (1) With stable international connectivity, Gemini CLI OAuth remains the most generous official CLI until June 18. (2) Engineers in China should pair SiliconFlow or Model Studio with OpenCode or Codex pointed at a domestic endpoint—terminal agents without a VPN. (3) Cursor and Copilot Free handle IDE completions; CLI agents handle multi-file orchestration—they complement rather than replace each other.
03 Gemini CLI shutdown, Codex domestic config, and OpenCode free models
Gemini CLI (use before June 18): Install, choose Google OAuth, no API key or credit card. Use /model to switch models and /stats model for daily usage. Official docs list 60 RPM / 1,000 RPD for individuals. OAuth tokens are personal-terminal only; routing them through third-party proxies violates ToS and risks account suspension.
# Node.js 18+
npm install -g @google/gemini-cli
gemini
# Choose Sign in with Google
/model
/stats model
Codex CLI (domestic API path): OpenAI terminal agent; free ChatGPT accounts can OAuth (confirm current policy on openai.com). Point ~/.codex/config.toml at SiliconFlow or another OpenAI-compatible endpoint.
openai_base_url = "https://api.siliconflow.cn/v1"
model = "deepseek-ai/DeepSeek-V3"
sandbox_mode = "workspace-write"
web_search = "disabled"
Set export OPENAI_API_KEY="sk-xxxx", then run codex doctor.
OpenCode and OpenClaw: OpenCode supports 75+ providers; bind keys via /connect or edit ~/.config/opencode/config.json. OpenClaw can reuse Gemini CLI OAuth with openclaw models auth login --provider google-gemini-cli, or paste a Claude setup-token for Anthropic routes. Both clients run on macOS and pair well with domestic endpoints when US OAuth is unavailable.
Claude Code on a budget: Official access sits inside Pro/Max subscriptions, but engineers in China often point ANTHROPIC_BASE_URL at SiliconFlow or Zhipu with GLM-5—cost per million tokens stays far below a $20 monthly sub if you avoid /init repo scans. Launch with claude --model claude-sonnet-4-6 only after you confirm the proxy model list.
Domestic API quick reference: SiliconFlow endpoint https://api.siliconflow.cn/v1 (OpenAI-compatible); Alibaba Model Studio https://dashscope.aliyuncs.com/compatible-mode/v1 after Alipay verification; Zhipu https://open.bigmodel.cn/api/paas/v4. Any of these keys work in Codex, OpenCode, or curl smoke tests before you wire a 24/7 agent.
Recommended free stack: Gemini 2.5 Flash (1,500 AI Studio calls/day), SiliconFlow DeepSeek-V3, local Ollama Qwen3 for drafts that should never hit a metered API.
Copilot and Cursor: Enable Copilot Free under GitHub Settings. Cursor Hobby offers 2,000 Tab completions monthly; students can apply for one year of Pro at cursor.com/students.
Official policy pages (re-open before production use):
https://github.com/google-gemini/gemini-cli/discussions/27274
https://developers.google.com/gemini-code-assist/resources/quotas
https://github.blog/changelog/2026-04-20-changes-to-github-copilot-plans-for-individuals/
04 Six steps from zero-cost signup to a stable terminal agent
- Inventory needs and network: Separate IDE completions from terminal agents from 24/7 automation. If US endpoints are unreliable, prioritize domestic APIs with OpenCode or Codex—do not force Gemini OAuth.
- Register a domestic free API: SiliconFlow (20M permanent tokens), Alibaba Model Studio (70M tokens), or Zhipu GLM (20M permanent). Enable an 80% usage alert in the console.
- Install a terminal agent: International path:
npm i -g @google/gemini-clior@openai/codex. Domestic path: OpenCode or OpenClaw install scripts. - Configure auth and models: Gemini uses OAuth; Codex and OpenCode use domestic
base_urlwith DeepSeek-V3, Qwen3.5, or GLM-5. Claude Code acceptsANTHROPIC_BASE_URLin~/.claude/settings.json. - Layer IDE free tiers: Run Cursor Hobby and Copilot Free in parallel—completions in the IDE, multi-file agents in the CLI.
- Enforce usage discipline: Ban
/initfull-repo scans; route simple tasks to Flash or Lite; before June 18, run one real job on Antigravity CLI or OpenCode and document rollback.
05 Citable figures, token-saving rules, and CALMVPS close
- Gemini CLI OAuth: Google documents 1,000 requests per user per day for individuals; service ends for personal OAuth on June 18, 2026.
- GitHub Copilot Free: 2,000 completions plus 50 premium requests monthly, no credit card. Student and Pro new sign-ups paused since April 20, 2026.
- Cursor Hobby: 2,000 Tab completions and 50 slow premium requests per month; usage at app.cursor.sh/account/usage.
- Domestic signup bonuses: SiliconFlow 20M permanent tokens; Alibaba 70M tokens across 70+ models; Zhipu 20M permanent tokens—enough for months of light agent work combined.
- Groq free tier (proxy required): 14,400 requests per day for fast Llama and Mixtral inference as a supplemental path.
Token discipline (selected rules): Never run /init on the whole repo; specify single files; use Flash-Lite for drafts; set 80% alerts; rotate multiple Google accounts for separate Gemini API quotas; offload formatting to local Ollama via OpenCode; scan OpenRouter free models with OpenClaw models scan.
Running free-token workflows on a MacBook that sleeps when closed breaks OAuth sessions, launchd agents, and SSH tunnels. A Linux VPS without macOS cannot run Claude Code Seatbelt sandboxes or Xcode toolchains. Laptop hotspot VPN paths fail OAuth refresh often. For 24/7 OpenClaw, Codex, or Hermes jobs, shared bare-metal environments, and elastic M4 or M4 Pro configs per project, CALMVPS bare-metal Mac rental is usually the better production choice: dedicated Apple Silicon, roughly 120-second provisioning, and flexible daily through quarterly billing so free API quotas go to inference—not network jitter. See pricing and help center.