81 lines
3.7 KiB
Markdown
81 lines
3.7 KiB
Markdown
---
|
||
title: CLI Is All You Need
|
||
slug: cli-is-all-you-need
|
||
status: inbox
|
||
source_urls:
|
||
- https://x.com/mfranz_on/status/2021364017147818434
|
||
author: Marco Franzon (@mfranz_on)
|
||
created_at: 2026-03-02T00:00:00+08:00
|
||
updated_at: 2026-03-02T00:00:00+08:00
|
||
tags:
|
||
- cli
|
||
- mcp
|
||
- agentic-coding
|
||
- developer-tools
|
||
---
|
||
|
||
# CLI Is All You Need
|
||
|
||
> 来源:Marco Franzon (@mfranz_on) · 2026-02-10 · 211K views · 1235 bookmarks
|
||
> https://x.com/mfranz_on/status/2021364017147818434
|
||
|
||
## 核心论点
|
||
|
||
MCP(Model Context Protocol)对 80–90% 的日常开发工作流来说是过度工程。2026 年交付最快的开发者回到了起点——终端。给 Agent 直接 shell 访问权限,让它们用几十年来已经存在的工具:git、rg、grep、npm、docker、curl、jq、tail。
|
||
|
||
> "Stop building integrations. Build CLIs."
|
||
> "Bash is the ultimate MCP."
|
||
> "Agents were trained on Unix pipes—they're ridiculously good at it."
|
||
> "CLI is all you need. Everything else is ceremony."
|
||
|
||
## MCP 失去光环的四个原因
|
||
|
||
1. **Token overhead**:冗长的 tool catalog 和 schema 消耗宝贵的 context window
|
||
2. **Reinventing the wheel**:自定义 MCP server 往往在重复官方 CLI 已经做得更好的事
|
||
3. **Poor composability**:失去了 Unix 管道、链式调用和 one-off hack 的天然组合能力
|
||
4. **Model alignment**:前沿模型(Claude、GPT、Gemini)在 shell 用法上有大量训练数据,对 flags、pipes、errors、man-page 风格文档理解极好
|
||
|
||
## CLI-Native 编码 Agent 排名
|
||
|
||
| Agent | 亮点 |
|
||
|---|---|
|
||
| **Claude Code (Anthropic)** | 深度推理领先者,适合大型/复杂代码库、架构讨论、谨慎重构、多文件变更。原生终端工作流 + git 集成 |
|
||
| **Codex CLI (OpenAI)** | 轻量快速,适合生成、测试、快速迭代。开源可本地运行 |
|
||
| **Gemini CLI (Google)** | 免费层 + 强多模态,擅长快速原型、UI 任务、大项目。ReAct 风格循环,开源隐私友好 |
|
||
| **OpenCode** | 75+ provider 灵活切换,LSP 集成,隐私优先。社区称其为当前最高效终端 Agent |
|
||
|
||
## 四个实战场景
|
||
|
||
### 1. Monorepo 级重构
|
||
Agent 起手 `rg "oldDeprecatedFunction" .`,规划跨文件编辑,应用变更,`git diff` 审查,跑测试,提交。无需 GitHub MCP,只要 rg + git + test runner。
|
||
|
||
### 2. 全栈线上 Bug 调试
|
||
指令:"Reproduce the auth failure in staging."
|
||
Agent 执行 `git pull → npm install → npm run dev → tail -f logs → curl -v api/auth/check → docker-compose up → npm test`,迭代编辑文件、重跑测试、探测端点。无需 Docker MCP 或 Logging MCP。
|
||
|
||
### 3. 新微服务脚手架
|
||
指令:"Build a Rust API for user profiles with Postgres using Axum + sqlx."
|
||
Agent 执行 `cargo new → cargo add → cargo watch → curl health`,边开发边提交。无需 Rust MCP 或 Database MCP。
|
||
|
||
### 4. CI/CD Flake 修复
|
||
Agent clone 仓库,用 `act` 本地跑 workflow,定位失败,编辑 `.github/workflows/ci.yml` 或 Dockerfile,`docker build` 验证,推分支,`gh` 开 PR。全部标准 CLI 工具。
|
||
|
||
## 团队反馈趋势
|
||
|
||
采用 CLI-native agent 的团队一致报告:
|
||
- 更高的交付速度
|
||
- 更少的 token 意外开销
|
||
- 更透明的 Agent 行为
|
||
- 更容易调试 Agent 在做什么
|
||
|
||
## MCP 仍有价值的场景
|
||
|
||
高度结构化的企业集成——类型安全的 SaaS API、受监管环境。但这只覆盖 10–20% 的场景。
|
||
|
||
## 相关阅读
|
||
|
||
- [[glue-coding]] - 胶水编程方法论:复用成熟模块,AI 负责连接
|
||
|
||
## 结论
|
||
|
||
终端一直是通用开发环境。2026 年,它也是 AI 编码 Agent 最强大的接口。除非你深陷私有企业工具链,否则跳过沉重的 MCP 栈:cd 进项目、启动 CLI agent、给 shell 权限、描述任务、看它工作。 |