返回顶部
j

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, path queries, and multi-document YAML.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
128
下载量
0
收藏
概述
安装方式
版本历史

jrv-yaml-toolkit

# 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 ```bash # 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 | Command | Description | |---------|-------------| | `validate <file>` | Check YAML syntax, report errors with line numbers | | `format <file>` | Pretty-print YAML with consistent indentation | | `to-json <file>` | Convert YAML to JSON | | `from-json <file>` | Convert JSON to YAML | | `get <file> <path>` | Get value at dot-path (e.g. `server.host`) | | `set <file> <path> <val>` | Set value at dot-path, output updated YAML | | `merge <file1> <file2> ...` | Deep-merge YAML files (right overrides left) | | `lint <file> --schema <s>` | Validate keys against a schema YAML | | `keys <file>` | List all keys as flattened dot-paths | | `minify <file>` | Output compact single-line YAML | ## Options | Flag | Description | |------|-------------| | `--output <file>` | Write output to file instead of stdout | | `--indent N` | Indentation spaces (default: 2) | | `--allow-unicode` | Allow 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

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 jrv-yaml-toolkit-1776192063 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 jrv-yaml-toolkit-1776192063 技能

通过命令行安装

skillhub install jrv-yaml-toolkit-1776192063

下载 Zip 包

⬇ 下载 jrv-yaml-toolkit v1.0.0

文件大小: 5.03 KB | 发布时间: 2026-4-17 15:08

v1.0.0 最新 2026-4-17 15:08
Initial release of jrv-yaml-toolkit.

- Supports validating YAML syntax with error reporting.
- Formats and prettifies YAML files.
- Converts between YAML and JSON formats.
- Queries and sets values using dot-path expressions.
- Deep-merges multiple YAML files with override support.
- Validates YAML against a schema file.
- Lists all YAML keys in flattened form.
- Outputs minified, single-line YAML.
- Provides command-line options for output file, indentation, and Unicode handling.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部