CLI 目录 横向对比 FCRS-1.0 标准 关于我们 /llms.txt

Arduino CLI

$ arduino-cli 官方出品 中风险
Arduino · 代码托管与研发协同 · GPL-3.0 · macos / linux / windows · 评测日期:

arduino-cli(arduino/arduino-cli)是 Arduino 官方提供的命令行工具链,无需打开桌面 IDE 即可完成开发板识别、核心/库管理、Sketch 编译与固件烧录。几乎所有子命令均支持面向 CI 与嵌入式开发 Agent 的 --format json 结构化输出。

FCRS-1.0 综合评分
89 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install arduino-cli
CLI vs MCP 选型建议 优先选 CLI

官方在 board、compile、core 与 lib 子命令上提供成熟的 --format json 输出,可直接接入 Shell 流水线,无需 MCP 封装。

核心事实概览

命令名
$ arduino-cli
FCRS-1.0 总分
89/100 (良好 (Good))
证据置信度
中置信度 (源码/文档)
CLI vs MCP 建议
优先选 CLI
评测日期

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
✓ 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 23 / 25

跨 board/compile/core/lib 子命令统一支持 --format json、--no-color、--quiet 与完全非交互式构建流程。

  • Official --format json and --no-color across subcommands
安全与权限边界 20 / 25

本地检测与 compile 过程安全可控,仅 upload 会向已连接的物理硬件覆写固件。

  • Safe board list and compile; hardware flashing via explicit upload
安装与运行摩擦 14 / 15

官方 Go 单二进制,可通过 brew install arduino-cli、Go 及多平台发行包安装。

  • Homebrew, Go, and official binaries for macOS, Linux, and Windows
能力覆盖与边际价值 13 / 15

用轻快无头的板卡探测、编译与库管理流程替代笨重的桌面 IDE。

  • Headless embedded build and flash pipeline with JSON diagnostics
维护与来源背书 10 / 10

Arduino 官方仓库(arduino/arduino-cli,5.1k+ stars,90 天 Homebrew 安装量 6.2k+),GPL-3.0 协议。

  • Official arduino/arduino-cli repository
文档与可验证性 9 / 10

在 arduino.github.io/arduino-cli 提供完备的官方文档、JSON 输出指南与命令参考。

  • Official docs at arduino.github.io/arduino-cli/latest/

安全边界、鉴权与放权指南

鉴权方式
无需鉴权 本地配置文件
凭证存储位置

使用开源官方核心与库无需认证;板卡索引 URL 与配置保存在本地 arduino-cli.yaml 中。

潜在副作用
只读查询 本地写入 破坏性删除
费用与配额提示

GPL-3.0 开源免费官方 Arduino 工具链。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# arduino-cli Agent Rules
- Always append `--format json --no-color` for machine-readable output.
- Run `arduino-cli board list --format json` and `arduino-cli compile` before `upload`.
- Confirm the target serial port (`-p`) and `--fqbn` before flashing physical hardware.

Agent 高频安全命令配方

只读查询(安全推荐)

以 JSON 列出已连接的 Arduino 开发板
arduino-cli board list --format json

检测已连接的 USB/串口开发板、端口路径及对应的 FQBN 标识并输出 JSON。

仅编译固件而不烧录硬件
arduino-cli compile --fqbn arduino:avr:uno ./Blink --format json

验证代码编译并以 JSON 格式返回编译器诊断信息与固件体积。

受控写入与预演

将编译好的固件烧录至物理开发板
arduino-cli upload -p /dev/cu.usbmodem101 --fqbn arduino:avr:uno ./Blink --format json

通过串口/USB 将已验证的固件写入目标微控制器。

核心优势

  • + 开发板识别、库检索、编译与烧录全程提供一致的 --format json 输出。
  • + Arduino 官方维护的 Go 二进制,CI 与无头集成成熟稳定。
  • + compile 校验与 upload 烧录解耦清晰,便于安全把关。

注意事项与踩坑点

  • ! 使用 upload 时若选错串口或板卡型号会直接影响真实连接的物理硬件。
  • ! 使用第三方开发板核心仍需通过 core install 下载对应编译工具链。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI

同分类相关 CLI: 代码托管与研发协同

进入分类页 →
esbuild 89/100
$ esbuild

Go 编写的超高速 JavaScript/TypeScript 打包器与压缩器,支持 `--metafile` JSON 依赖图输出。

$ golangci-lint

高速并行 Go Linter 聚合执行器,集成数十款静态分析器(`run --output.json.path=stdout`)。

$ task

跨平台 Go 任务运行器,支持 `--list --json` 任务发现与 `--dry` 命令预演。

Jujutsu 89/100
$ jj

兼容 Git 的版本控制系统,具备工作区自动快照、操作日志 `jj undo` 与模板 `json()` 输出。

Buf 95/100
$ buf

现代 Protocol Buffers CLI,集 Lint、破坏性变更检测、格式化与代码生成于一体,支持 `--error-format=json`。

Ruff 95/100
$ ruff

极速 Rust Python 代码检查与格式化工具,支持 `--output-format=json` 与 `--diff` 预览。