← 返回
未分类 中文

Jrv Yaml Toolkit

Full-featured YAML toolkit for validating, formatting, converting, merging, and querying YAML files. Supports YAML-to-JSON, JSON-to-YAML, schema validation,...
全功能YAML工具集,支持验证、格式化、转换、合并和查询YAML文件,支持YAML与JSON互转、模式验证等功能。
johnnywang2001
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 419
下载
💾 0
安装
1
版本
#latest

概述

jrv-yaml-toolkit

Everything you need to work with YAML files: validate syntax, format/prettify, convert to/from JSON, query with dot-path expressions, merge multiple files, and check against a schema.

Quick Start

# Validate YAML syntax
python3 scripts/yaml_toolkit.py validate config.yaml

# Format/prettify YAML
python3 scripts/yaml_toolkit.py format messy.yaml

# Convert YAML to JSON
python3 scripts/yaml_toolkit.py to-json config.yaml

# Convert JSON to YAML
python3 scripts/yaml_toolkit.py from-json data.json

# Query a value by dot-path
python3 scripts/yaml_toolkit.py get config.yaml "server.host"

# Set a value
python3 scripts/yaml_toolkit.py set config.yaml "server.port" 8080

# Merge multiple YAML files (later files override earlier)
python3 scripts/yaml_toolkit.py merge base.yaml override.yaml

# Lint against a simple schema file
python3 scripts/yaml_toolkit.py lint config.yaml --schema schema.yaml

# List all keys (flattened dot-path)
python3 scripts/yaml_toolkit.py keys config.yaml

# Minify YAML (single-line flow style)
python3 scripts/yaml_toolkit.py minify config.yaml

Commands

CommandDescription
----------------------
validate Check YAML syntax, report errors with line numbers
format Pretty-print YAML with consistent indentation
to-json Convert YAML to JSON
from-json Convert JSON to YAML
get Get value at dot-path (e.g. server.host)
set Set value at dot-path, output updated YAML
merge ...Deep-merge YAML files (right overrides left)
lint --schema Validate keys against a schema YAML
keys List all keys as flattened dot-paths
minify Output compact single-line YAML

Options

FlagDescription
-------------------
--output Write output to file instead of stdout
--indent NIndentation spaces (default: 2)
--allow-unicodeAllow unicode in output (default: true)

Use Cases

  • DevOps: Validate Kubernetes and Docker Compose configs before applying
  • CI/CD: Merge environment-specific YAML overrides
  • Config management: Query and patch config values programmatically
  • Data pipelines: Convert between JSON and YAML for different tools
  • Documentation: List all config keys for auto-generated docs

Exit Codes

  • 0 — Success
  • 1 — Validation error or key not found
  • 2 — File not found or parse error

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-30 22:20 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Port Scanner

johnnywang2001
快速TCP端口扫描器,用于网络侦察与安全审计,可扫描主机开放端口、检测常见服务并识别潜在攻击面。
★ 0 📥 653
developer-tools

Sitemap Generator

johnnywang2001
通过爬取网站生成 XML 网站地图。适用于创建 sitemap.xml(SEO),审计站点结构,发现域名下所有页面等场景。
★ 0 📥 626
security-compliance

Subdomain Enum

johnnywang2001
通过DNS暴力破解和证书透明度日志(crt.sh)枚举任意域的子域名。适用于用户需要发现子域名、执行侦察等场景。
★ 0 📥 637