fast-yaml-cli-0.3.1 is not a library.
Visit the last successful build:
fast-yaml-cli-0.5.1
fy
Fast YAML command-line processor with validation and linting. Built on fast-yaml for high-performance YAML 1.2.2 processing.
Installation
From crates.io
[!TIP] Use
cargo binstall fast-yaml-clifor faster installation without compilation.
From source
Verify installation
Usage
Parse and validate
# Parse from file
# Parse from stdin
|
# Show parse statistics
Format YAML
# Format to stdout
# Custom indentation (2-8 spaces)
# Format in-place
Convert formats
# YAML to JSON
# JSON to YAML
# Compact JSON (no pretty-print)
Lint YAML
# Lint with default rules
# Custom rules
# JSON output for IDE integration
Commands
| Command | Description |
|---|---|
parse |
Parse and validate YAML syntax |
format |
Format YAML with consistent style |
convert |
Convert between YAML and JSON |
lint |
Lint YAML with diagnostics |
Options
| Option | Short | Description | Default |
|---|---|---|---|
--in-place |
-i |
Edit file in-place | - |
--output |
-o |
Write to file | stdout |
--format |
-f |
Output format (yaml/json/compact) | yaml |
--no-color |
- | Disable colored output | - |
--quiet |
-q |
Suppress non-error output | - |
--verbose |
-v |
Enable verbose output | - |
Features
| Feature | Default | Description |
|---|---|---|
colors |
Yes | Colored terminal output |
linter |
Yes | YAML linting capabilities |
all |
- | All features enabled |
Build with minimal features:
[!NOTE] The
linterfeature adds thelintcommand. Without it, onlyparse,format, andconvertare available.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Parse error |
| 2 | Lint errors found |
| 3 | I/O error |
| 4 | Invalid arguments |
Examples
Pipeline usage
# Validate all YAML files
# Format and convert in one pipeline
| |
# Check YAML before committing
|
CI/CD integration
# GitHub Actions
- name: Validate YAML
run: |
cargo install fast-yaml-cli
find . -name "*.yaml" -exec fy lint {} \;
Performance
Built on fast-yaml-core for optimal performance:
- Startup time: ~5ms
- Binary size: ~1MB (stripped)
- Full YAML 1.2.2 compliance
License
Licensed under MIT or Apache-2.0 at your option.