← 返回
未分类 中文

Toml Validator

Validate, lint, diff, and inspect TOML configuration files. Use when asked to check TOML syntax, compare TOML configs, show TOML structure, validate pyprojec...
验证、检查、比对并检查 TOML 配置文件。用于检查 TOML 语法、比对配置、显示结构、验证 pyproject 等。
charlie-morrison charlie-morrison 来源
未分类 clawhub v1.0.1 1 版本 100000 Key: 无需
★ 0
Stars
📥 388
下载
💾 1
安装
1
版本
#latest

概述

TOML Validator & Linter

Validate TOML syntax, run lint checks, compare files, and inspect structure. Supports pyproject.toml, Cargo.toml, and any TOML config.

Validate

# Basic syntax check
python3 scripts/toml_lint.py validate config.toml

# With lint checks (empty values, mixed arrays, etc.)
python3 scripts/toml_lint.py validate --lint pyproject.toml Cargo.toml

Diff Two Files

python3 scripts/toml_lint.py diff config-prod.toml config-staging.toml

Show Contents / Extract Key

# Pretty-print entire file
python3 scripts/toml_lint.py show pyproject.toml

# Extract specific key
python3 scripts/toml_lint.py show pyproject.toml --key tool.poetry.version

Type Tree

python3 scripts/toml_lint.py types Cargo.toml

Output Formats

python3 scripts/toml_lint.py -f json validate config.toml
python3 scripts/toml_lint.py -f markdown diff a.toml b.toml

Lint Checks

CheckLevelDescription
---------------------------
Empty stringsWarningString values that are blank
Empty tablesWarningTables with no keys
Mixed-type arraysWarningArrays containing different types
Empty arraysInfoArrays with no elements
Spaced keysInfoKeys containing spaces (valid but unusual)
Long stringsInfoString values exceeding 1000 chars

Requirements

  • Python 3.11+ (has tomllib in stdlib)
  • Or: pip install tomli for Python 3.10 and below

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-05-07 06:34 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 681 📥 329,906
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 197 📥 68,033
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 78 📥 182,617