grasmash / yaml-cli
A command line tool for reading and manipulating yaml files.
Installs: 1 351 526
Dependents: 16
Suggesters: 0
Security: 0
Stars: 14
Watchers: 3
Forks: 6
Open Issues: 3
Requires
- php: >=5.6
- dflydev/dot-access-data: ^1.1.0
- symfony/console: ^4 | ^5
- symfony/filesystem: ^4 | ^5
- symfony/yaml: ^4 | ^5
Requires (Dev)
- phpunit/phpunit: ^5.5.4
- satooshi/php-coveralls: ^1.0
- squizlabs/php_codesniffer: ^2.7
This package is auto-updated.
Last update: 2020-12-31 00:22:04 UTC
README
Yet another command line tool for reading and manipulating yaml files, built on the Symfony console component.
Commands:
Command | Description |
---|---|
get:value | Get a value for a specific key in a YAML file. |
lint | Validates that a given YAML file has valid syntax. |
unset:key | Unset a specific key in a YAML file. |
update:key | Change a specific key in a YAML file. |
update:value | Update the value for a specific key in a YAML file. |
Installation
composer require grasmash/yaml-cli
Example usage:
./vendor/bin/yaml-cli get:value somefile.yml some-key
./vendor/bin/yaml-cli lint somefile.yml
./vendor/bin/yaml-cli unset:value somefile.yml some-key
./vendor/bin/yaml-cli update:key somefile.yml old-key new-key
./vendor/bin/yaml-cli update:value somefile.yml some-key some-value
Similar tools:
- Javascript - https://github.com/pandastrike/yaml-cli
- Ruby - https://github.com/rubyworks/yaml_command
- Python - https://github.com/0k/shyaml
Recognition
This project was inspired by the yaml commands in Drupal Console.