CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

Taplo

$ taplo 社区开源 低风险
tamasfe · 代码托管与研发协同 · MIT · macos / linux / windows

面向 TOML 文件(Cargo.toml、pyproject.toml、taplo.toml)的高速 Rust 工具集,提供格式化、语法检查与 JSON Schema 校验。支持 taplo fmt --check --diff 无损预检与 --colors never 纯净日志输出。

FCRS-1.0 综合评分
84 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install taplo
CLI vs MCP 选型建议 仅 CLI 可用

毫秒级在本地完成 TOML 格式化与 Schema 校验,无需 MCP。

Agent 友好度体检单

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

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

FCRS-1.0 六维评分拆解

Agent 友好度 20 / 25

支持 fmt --check --diff、check、--colors never 与规范退出码,但缺少 JSON 诊断输出。

  • --check --diff previews changes cleanly; --colors never strips ANSI codes
安全与权限边界 23 / 25

check、lint 与 fmt --check 严格只读;仅在不带 --check 运行 taplo fmt 时写入文件。

  • Non-destructive check, lint, and fmt --check modes
安装与运行摩擦 15 / 15

静态 Rust 单二进制,可通过 Homebrew、Cargo、npm 封装包与 GitHub Releases 安装。

  • Fast cross-platform standalone binary
能力覆盖与边际价值 12 / 15

Rust(Cargo.toml)与 Python(pyproject.toml)生态中最实用的 TOML 格式化与 Schema 校验工具。

  • Combines TOML formatting and SchemaStore validation
维护与来源背书 7 / 10

社区项目(tamasfe/taplo),采用 MIT 协议,近年发版节奏有所放缓。

  • Maintained at tamasfe/taplo, though release cadence is moderate
文档与可验证性 7 / 10

taplo.tamasfe.dev 文档与 --help 说明清晰。

  • Official docs at taplo.tamasfe.dev

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

鉴权方式
无需鉴权
凭证存储位置

离线本地 TOML 格式化与校验器,不存储也不需要任何凭证。

潜在副作用
只读查询 本地写入
费用与配额提示

MIT 开源 Rust 二进制工具,完全免费。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Taplo (taplo) Agent Rules
- Run `taplo fmt --check --diff --colors never` before `taplo fmt`.
- Use `taplo check --no-schema` in air-gapped sandboxes so Taplo does not try fetching remote SchemaStore schemas.

Agent 高频安全命令配方

只读查询(安全推荐)

检查 TOML 格式而不修改文件
taplo fmt --check --diff --colors never

展示格式化 diff,并在存在未格式化文件时返回非零退出码。

校验 TOML 语法与 Schema
taplo check --colors never pyproject.toml

校验 TOML 语法及匹配的 JSON Schema,不改动磁盘文件。

受控写入与预演

原地格式化 TOML 文件
taplo fmt Cargo.toml

按 .taplo.toml(若存在)确定性地格式化目标 TOML 文件。

核心优势

  • + Rust 单二进制兼顾 TOML 格式化(fmt --check --diff)与 SchemaStore 校验。
  • + 显式提供 --colors never 标志,保持标准输出干净。

注意事项与踩坑点

  • ! check 与 lint 均不支持 --json 输出。
  • ! 无网络沙箱中运行 taplo check 可能尝试联网拉取远程 Schema,需传 --no-schema。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI