YMal — The command line utility for modifiying YAML files
npm i ymal -g
Usage: ymal [options] [command]
Commands:
help Display help
Options:
-C, --classes-to-remove List of classes to remove
-f, --file YAML file path
-h, --help Output usage information
-P, --pattern-to-remove-classes Remove classes by pattern o_O!
-s, --set-value Set property value form: `property=value`
-v, --version Output the version number
Sample file
name: Martin D'vloper
job: Developer
skill: Elite
employed: true
classes:
foods:
- Apple
'languages::list':
java: Elite
python: Elite
js: Elite
education: |
4 GCSEs
BSc in the Internet of Things
tst_asd: |
4 GCSEs
3 A-Levels
BSc in the Internet of Things
Sample commands
# Removes classes starts with `tst_` and
# sets `classes.languages::list.python` property value to `Silver`
# Short form
ymal -f sample.yaml -s 'classes.languages::list.python=Silver' -P '^tst_'
# Long form
ymal --file=sample.yaml --set-value='classes.languages::list.python=Silver' \
--pattern-to-remove-classes='^tst_'
Fork this repository to your own GitHub account and then clone it to your local device
- Licensed under MIT.