https://github.com/bugthesystem/ymal
Little command line utility for modifiying YAML files
https://github.com/bugthesystem/ymal
Last synced: about 1 year ago
JSON representation
Little command line utility for modifiying YAML files
- Host: GitHub
- URL: https://github.com/bugthesystem/ymal
- Owner: bugthesystem
- License: mit
- Created: 2016-08-08T20:43:21.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-25T15:04:07.000Z (almost 10 years ago)
- Last Synced: 2025-06-03T20:47:10.846Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
YMal
============================
_**YMal —** The command line utility for modifiying **YAML** files_
[](https://travis-ci.org/ziyasal/ymal)
[](https://coveralls.io/github/ziyasal/ymal?branch=master)
[](https://badge.fury.io/js/ymal)
## Install
```sh
npm i ymal -g
```
## Usage
```
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
**Sample file**
```yaml
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**
```sh
# 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_'
```
## Contribute
[Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
## Credits
- Licensed under MIT.