Free AI Coding Tools
2026 Token Guide
If you are a student, indie developer, or team lead on a zero-budget sprint, you are probably juggling Gemini CLI, Codex CLI, Claude Code, OpenCode, OpenClaw, GitHub Copilot, and Cursor—each with different free ceilings, OAuth rules, and proxy requirements. This guide maps every major free tier as of June 2026, shows how to wire China-region APIs when Western endpoints are unreachable, lists ten token-saving tactics, and delivers a five-step isolated Mac trial so you can benchmark tools without polluting your daily driver.
Table of Contents
01 · What "free" actually means in June 2026
The AI coding market in mid-2026 is not short on generosity—it is short on clarity. Vendors advertise "free" while hiding credit-card gates, subscription bundling, geographic blocks, or hard cutoffs buried in OAuth changelogs. A tool can be free to install yet expensive to run if its default model routes through premium output pricing. Conversely, a paid subscription like Claude Pro can feel "free" to Claude Code users because the CLI is bundled—until you hit weekly rate limits on Opus-tier models.
This guide treats free as: no credit card required at signup, or a permanent registration grant large enough for weeks of solo development. We exclude time-limited trials that auto-convert to paid plans without explicit consent. We also flag policy cliffs—most urgently, Google’s June 18, 2026 shutdown of subscription OAuth for Gemini CLI, covered in our Gemini CLI policy analysis.
The payoff for reading carefully: a student stacking Copilot Student, Cursor Hobby, and a SiliconFlow API key can realistically run a semester project at $0 API spend. A startup evaluating three terminal agents can burn through 70 million free tokens on Alibaba Model Studio before opening a corporate card. The tables and steps below turn those numbers into a repeatable workflow—not a marketing headline.
02 · Three adoption pain points
1. Mixing free OAuth with production credentials. Gemini CLI, Codex CLI, and Claude Code all cache OAuth tokens in your home directory. Installing all three on a MacBook that also holds production AWS keys, App Store signing certificates, and a personal Google account creates a single blast radius. One misconfigured cron job can route premium-model pricing through a "free" CLI session. The fix is not abstinence—it is isolation on a disposable macOS node, the same pattern we document for Agent Skill trials on rented Macs.
2. Treating IDE free tiers as full agent replacements. Cursor Hobby and Copilot Free are excellent for tab completion and light chat—2,000 tab completions and 50 slow premium requests per month each—but they are not substitutes for terminal agents that edit ten files, run tests, and open pull requests. Teams that standardize on IDE free tiers alone hit ceiling by week two of a sprint, then blame "AI doesn't work" when the real issue is tier mismatch.
3. Ignoring geography and ToS boundaries. Gemini CLI OAuth is personal-use only; routing that token through a third-party proxy violates Google’s terms. China-based developers cannot rely on Western OAuth flows at all without unstable VPNs. The sustainable path is pairing open tools (OpenCode, OpenClaw, Codex with config overrides) with domestic OpenAI-compatible endpoints—not tunneling a Google session through a relay.
03 · Free tier snapshot table (June 2026)
Use this matrix as your weekly sanity check. Quotas change; verify on vendor consoles before production cutover.
| Tool / Platform | Free allowance | Credit card | China direct | Best free angle |
|---|---|---|---|---|
| Gemini CLI (OAuth) | ~1,000 req/day, 60 RPM | No | VPN required | No card; Gemini 2.5 Pro/Flash until June 18 cutoff |
| Gemini API (AI Studio) | 1,500 Flash/day; 100 Pro/day | No | VPN required | Permanent free tier on Google AI Studio |
| Codex CLI | ChatGPT free account (limited) | No | Proxy or domestic API | Cloud sandbox; GPT-5.x Codex route |
| Claude Code | Bundled with Pro/Max ($20+/mo) | Yes (sub) | Proxy or relay API | Best quality; use domestic relay for cost |
| OpenCode | Tool free; pay per API | No | Yes with domestic API | 97K+ stars; 75+ providers |
| OpenClaw | Tool free; multi-provider | No | Yes with domestic API | Reuses Gemini OAuth; gateway bots |
| Copilot Free | 2,000 completions + 50 premium/mo | No | Yes | Instant enable on GitHub |
| Copilot Student | 300 premium req/mo (Pro-equiv) | No | Yes | $10/mo value; .edu verification |
| Cursor Hobby | 2,000 tabs + 50 slow premium/mo | No | Yes | Full VS Code fork experience |
| SiliconFlow | 20M tokens (permanent grant) | No | Yes | DeepSeek, Qwen, GLM routes |
| Alibaba Model Studio | 70M tokens (70+ models) | No (real-name) | Yes | Widest domestic model catalog |
| Zhipu GLM | 20M tokens (permanent) | No | Yes | Stable GLM-5; Claude relay option |
| Groq | 14,400 req/day | No | VPN required | Fast Llama/Mixtral inference |
Three citeable totals anchor the table: 1,000 daily Gemini CLI OAuth requests, 70 million Alibaba registration tokens, and 20 million permanent SiliconFlow tokens—enough for months of iterative coding if you avoid whole-repo scans.
04 · Gemini CLI — the generous cliff
Gemini CLI remains the most generous official terminal agent for OAuth users: a plain Google account, no credit card, roughly 1,000 requests per day at 60 requests per minute, with access to Gemini 2.5 Pro and Flash inside a 1 million token context window. Install via npm, Homebrew, or npx:
# Install Gemini CLI (Node 18+)npm install -g @google/gemini-cligemini# Choose "Sign in with Google" at first prompt/model gemini-2.5-flash/stats model
Per-model OAuth ceilings differ: Gemini 2.5 Pro allows about 100 requests per day inside the CLI quota, while Flash-Lite tolerates up to 1,000 daily requests—use Flash for drafts, Pro for merges. Check session stats with /stats model before assuming unlimited Pro access.
Critical deadline: On June 18, 2026, Google disables subscription OAuth for free, Pro, and Ultra Google AI accounts. After that date you need a paid GEMINI_API_KEY, an enterprise license, or a migration to Antigravity (closed source, ~20 agent turns/day on free tier versus the old ~1,000). Plan B should be live before the cutoff—see our policy article for the five-step migration HowTo.
05 · Codex CLI — ChatGPT OAuth plus domestic escape hatch
OpenAI’s Codex CLI is a Rust-based terminal agent with OS-level sandboxing—roughly 83,000 GitHub stars in June 2026. Free-tier access flows through Sign in with ChatGPT on a free OpenAI account, though limits are tighter than Plus/Pro bundles and can change without notice.
# Install and launchnpm install -g @openai/codexcodex --versioncodex# One-shot non-interactive taskcodex "Fix the failing unit test in AuthService.swift"
Developers without reliable Western connectivity can point Codex at domestic OpenAI-compatible endpoints. Edit ~/.codex/config.toml:
openai_base_url = "https://api.siliconflow.cn/v1"model = "deepseek-ai/DeepSeek-V3"sandbox_mode = "workspace-write"web_search = "disabled"approval_policy = "on-request"
Export OPENAI_API_KEY with your SiliconFlow or Zhipu key, then run codex doctor to validate routing. You lose OpenAI’s cloud sandbox but gain stable latency and zero VPN dependency.
06 · Claude Code — quality tier, not zero-dollar tier
Claude Code is not genuinely free: it ships inside Claude Pro ($20/month) or Max subscriptions. That said, it remains the quality ceiling many teams escalate to after exhausting free routes—especially for multi-file refactors that show up as 606 billion weekly tokens on OpenRouter’s CLI board per our June 2026 CLI rankings article.
# Official install pathscurl -fsSL https://claude.ai/install.sh | bashclaude --versionclaude --model claude-sonnet-4-6
Cost-sensitive teams route Claude Code through domestic relays by setting ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY in ~/.claude/settings.json or shell exports. Zhipu and SiliconFlow both expose Anthropic-compatible gateways at fractions of direct Opus pricing. Never run /init on a monorepo—it ingests the entire tree in one shot and can burn hundreds of thousands of tokens before the first edit.
07 · OpenCode — open router, your API bill
OpenCode (MIT, 97,500+ GitHub stars) is free software that bills only what your chosen provider charges. It supports 75+ providers, Docker sandboxes, and headless CI—making it the default recommendation for China-based developers who want a terminal IDE without Western OAuth.
# Install OpenCodecurl -fsSL https://opencode.ai/install | bashopencode# Connect a provider inside TUI/connect/models
Recommended zero-cost stacks in June 2026: Gemini API free tier (1,500 Flash requests/day), SiliconFlow registration grant, local Ollama with Qwen3 8B on Apple Silicon, or OpenRouter’s permanently free model routes. Use Tab to switch between Plan and Build modes—Plan on cheap models, Build on capable ones.
08 · OpenClaw — gateway that recycles free OAuth
OpenClaw is an open-source agent gateway—not a pure coding CLI—that shines when you want Telegram bots, cron skills, and multi-model routing in one daemon. It can reuse Gemini CLI OAuth (while that path still works) and accept pasted Anthropic setup tokens from Claude Code.
# Install and onboardcurl -fsSL https://openclaw.ai/install.sh | bashopenclaw onboard --install-daemon# Reuse Gemini CLI OAuthopenclaw models auth login --provider google-gemini-cli --set-defaultopenclaw models scan
For persistent 7×24 gateways, pair OpenClaw with a rented Mac mini M4 rather than a laptop that sleeps—see our OpenClaw on rented Mac mini M4 guide. OpenClaw’s models scan command surfaces OpenRouter free models automatically, complementing the billing insights from weekly OpenRouter token rankings.
09 · GitHub Copilot and Cursor — IDE-native free tiers
GitHub Copilot
Copilot Free requires only a GitHub account: enable it under Settings → Copilot, install the VS Code or JetBrains extension, and you receive 2,000 completions plus 50 premium requests per month. Copilot Student (GitHub Education verification) upgrades to Pro-equivalent features—300 premium requests monthly, a $10/month value—without payment. Note: Copilot Pro new signups were temporarily paused around April 2026; confirm the live button state before promising student onboarding.
Cursor
Cursor Hobby mirrors Copilot’s generosity: 2,000 Tab completions and 50 slow premium requests monthly, full VS Code compatibility, no credit card. Students can claim one year of Cursor Pro via cursor.com/students with a .edu email or GitHub Education status. Track usage at app.cursor.sh/account/usage—heavy agent mode exhausts the 50-request pool in days if used as a full CLI replacement.
| IDE tier | Tab completions | Premium agent requests | Best for |
|---|---|---|---|
| Copilot Free | 2,000 / month | 50 / month | GitHub-centric light coding |
| Copilot Student | Unlimited completions | 300 / month | University projects |
| Cursor Hobby | 2,000 / month | 50 slow / month | VS Code power users evaluating AI |
| Cursor Student Pro | Unlimited tabs | 500 fast / month | One-year Pro trial |
10 · China-region free APIs — no VPN required
When Western OAuth is unreachable, domestic OpenAI-compatible platforms carry the stack. All figures below reflect June 2026 registration grants; promotional campaigns can temporarily increase them.
| Provider | Registration grant | Endpoint | Notable models |
|---|---|---|---|
| SiliconFlow | 20M tokens (permanent) | api.siliconflow.cn/v1 | DeepSeek-V3, Qwen3.5, GLM-5 |
| Alibaba Model Studio | 70M tokens | dashscope.aliyuncs.com/compatible-mode/v1 | Qwen3.5-Max, DeepSeek-V3 |
| Zhipu GLM | 20M tokens (permanent) | open.bigmodel.cn/api/paas/v4 | GLM-5, GLM-4.7-Flash |
| Infinigence AI | Promotional billions-tier grants | Platform-specific | GenStudio free API tier |
| NVIDIA NIM | Free after phone verify | build.nvidia.com | Llama, Nemotron, DeepSeek |
# Universal domestic wiring (OpenCode, Codex, Aider)export OPENAI_API_KEY="sk-your-siliconflow-key"export OPENAI_BASE_URL="https://api.siliconflow.cn/v1"# Claude Code relay exampleexport ANTHROPIC_BASE_URL="https://api.siliconflow.cn/v1"export ANTHROPIC_API_KEY="sk-your-key"
Set 80% usage alerts in each vendor console. A single benchmark runaway is cheaper to catch at 16 million tokens than at 20 million.
11 · Ten token-saving tactics
- Never
/initentire repositories in Claude Code or Codex—scope to single files or directories. - Default to Flash-tier models for exploration; promote to Pro/Opus only for merge-ready output.
- Enable provider alerts at 80% of free grants on SiliconFlow, Alibaba, and Zhipu consoles.
- Rotate separate Google accounts only where ToS permits (AI Studio API keys)—never proxy Gemini CLI OAuth.
- Run local Ollama (Qwen3 8B, DeepSeek Coder V2 16B) for unlimited inner loops on 16 GB+ Macs.
- Shorten system prompts in OpenClaw and OpenCode configs—every turn pays the overhead tax.
- Scan OpenRouter free models via
openclaw models scanbefore paying for premium routes. - Disable web search in Codex when using domestic endpoints with unstable outbound connectivity.
- Batch related edits into one agent session instead of ten micro-sessions that re-upload context.
- Track vendor promo calendars—Chinese cloud providers run seasonal grants that temporarily double free pools.
12 · Five-step isolated Mac trial (HowTo)
Free tiers are easiest to abuse—and easiest to misconfigure—on your daily driver. Run this protocol on a rented Mac before promoting any CLI to your team standard.
- Rent an isolated macOS node. Book Mac mini M4 or MacBook Pro M3 through MacDate; SSH per the daily Mac rental FAQ. Create a local user with no production Apple ID.
- Install two to three CLI candidates. Example stack: Gemini CLI (OAuth, pre-June 18), Codex CLI with SiliconFlow config, and OpenCode. Store keys in project-scoped
.envfiles—never global shell profiles. - Run identical benchmark tasks. Pick a 12k-token task with three tool calls (read, edit, test). Log prompt tokens, completion tokens, wall time, and rate-limit errors per CLI.
- Document free-tier ceilings. Record daily request counts from
/stats model, provider dashboards, and OpenRouter usage CSV if proxied. - Revoke and release. Delete OAuth tokens, uninstall CLIs, revoke test API keys, export
cli-benchmark-YYYYMMDD.csv, and wipe the rental per MacDate return checklist.
# Example: OpenCode + SiliconFlow on rented Maccurl -fsSL https://opencode.ai/install | bashexport OPENAI_API_KEY="sk-or-test-..."export OPENAI_BASE_URL="https://api.siliconflow.cn/v1"opencode "Add unit tests for AuthService.swift and run xcodebuild test"# Pull key usage for weekly comparisoncurl -s -H "Authorization: Bearer $OPENAI_API_KEY" \ https://api.siliconflow.cn/v1/user/info | jq '.data'
13 · Mac rental hardware tiers for free-tier trials
| Tier | Hardware | RAM | Ideal free-tier workload | Limitations |
|---|---|---|---|---|
| Light | MacBook Air M3 | 16 GB | Copilot/Cursor eval, Aider, API-only CLIs | No Docker; single agent loop |
| Medium | Mac mini M4 | 16–24 GB | Gemini CLI + OpenCode side-by-side | Ollama 8B only at 16 GB |
| Heavy | MacBook Pro M4 Pro | 32 GB+ | OpenClaw gateway + Ollama 14B fallback | Local 32B models still impractical |
| Lab | Mac Studio M4 Ultra | 64 GB+ | Parallel CLI shootouts + local Qwen3 32B | Overkill for IDE-only trials |
Pricing lives on bare-metal macOS pricing. Most free-tier evaluations finish in one to three rental days on Mac mini M4 16 GB—enough to stack Gemini OAuth, SiliconFlow, and Copilot Student without CapEx commitment.
14 · FAQ
Q: Is Gemini CLI still free after June 18, 2026? Subscription OAuth ends on that date for free, Pro, and Ultra Google AI accounts. You can keep the open-source binary with a paid GEMINI_API_KEY or migrate to Antigravity, Claude Code, or Codex. Plan the switch now—not on June 17 at midnight.
Q: Can I use Copilot Free for serious development? For autocomplete and occasional chat, yes. For multi-file agent refactors, you will exhaust 50 premium requests quickly. Pair Copilot Free with a terminal CLI on free API credits for agent work.
Q: What is the fastest zero-dollar stack for China? Register SiliconFlow and Alibaba Model Studio, install OpenCode, export domestic base URLs, and optionally add Cursor Hobby for IDE tabs—all without VPN.
You can install every tool on a personal MacBook and hope discipline prevents credential collisions—but free OAuth tokens, Gemini cached sessions, and OpenClaw LaunchAgents do not respect hope. WSL and Linux VPS handle some Node gateways, yet they break down on TestFlight signing, Keychain certificates, and Claude Code’s macOS Seatbelt sandbox. A rented Mac is a forensic clean room: if a free tier misroutes into Opus pricing during a cron loop, the blast radius ends when you release the instance. If Gemini’s June 18 cliff pushes you toward domestic APIs, you can validate Codex and OpenCode routing on native macOS paths before touching production laptops.
For Apple-platform teams, the rental loop also keeps pace with toolchain churn—Swift 6 concurrency, Xcode 26 betas, and OpenClaw gateway updates ship faster than vendor free-tier changelogs. Convert zero-budget curiosity into auditable evidence on disposable silicon; promote one winner only after CSV benchmarks, not after a README promise of "unlimited free."