2026 年 5 个免费 AI 编程 CLI 工具推荐
哪些 AI 编程 CLI 工具完全免费?
| 工具 | 价格 | 模型 | 国内直连 | 最适合 |
|---|---|---|---|---|
| Antigravity CLI | 免费 | Gemini 3.5 Flash | ❌ 需翻墙 | 零配置日常开发 |
| OpenCode | 免费(BYOK) | 75+ 任选 | ✅ 配中转可用 | 灵活切换模型 |
| 通义灵码 CLI | 免费(含 API) | Qwen 3 Coder | ✅ 直连 | 国内用户首选 |
| Aider | 免费 | 本地模型 | ✅ 离线可用 | Git 原生、隐私优先 |
| Gemini CLI | 免费(6/18 停) | Gemini 2.5 Pro | ❌ 需翻墙 | 当前最强免费模型 |
国内用户首选:通义灵码 CLI
pip install qwen-code
阿里出品。工具免费,API 也免费。不需要 Key,不需要翻墙,不需要信用卡。
Qwen 3 Coder 模型能力已经追上来了,日常写代码够用。Apache 2.0 开源。
国内用户没理由不装这个。
我在没有代理的环境下测试,通义灵码 CLI 响应速度稳定在 1-2 秒,代码质量对标 GPT-4 水平的 80%。
完全离线方案:Aider + Ollama
pip install aider-chat
ollama pull deepseek-coder-v3
aider --model ollama/deepseek-coder-v3
数据不出机器。Git 原生——每次 AI 改动自动 commit,随时 revert。
适合:公司代码不能外传、网络不稳定、想省到极致。
零配置方案:Antigravity CLI
curl -fsSL https://antigravity.google/cli/install.sh | bash
agy
有 Google 账号就能用。但需要翻墙。
模型是 Gemini 3.5 Flash,轻量快速。适合海外服务器上用或有稳定代理的人。
灵活方案:OpenCode
go install github.com/opencode-ai/opencode@latest
140K+ Stars。支持 75+ 提供商。配合国内中转服务,可以用 Claude、GPT 等模型。
工具免费,只付 API 费用。
临时最强:Gemini CLI(6/18 停服)
npm install -g @google/gemini-cli
gemini
每天 1000 次免费请求,模型是 Gemini 2.5 Pro——目前免费能用到的最强模型。
但 Google 已宣布 6 月 18 日停服,之后迁移到 Antigravity CLI。
怎么选?
- 国内、不想折腾 → 通义灵码 CLI
- 要隐私、要离线 → Aider + Ollama
- 有翻墙、要免费 → Antigravity CLI
- 要灵活、多模型 → OpenCode
- 要最强模型(临时) → Gemini CLI