https://github.com/lmammino/yaml-prune
A simple command line script that allows to prune parts of a yaml file
https://github.com/lmammino/yaml-prune
command-line command-line-tool nodejs yaml yaml-editor yml
Last synced: about 2 months ago
JSON representation
A simple command line script that allows to prune parts of a yaml file
- Host: GitHub
- URL: https://github.com/lmammino/yaml-prune
- Owner: lmammino
- License: mit
- Created: 2017-10-04T15:50:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-01T17:55:24.000Z (over 8 years ago)
- Last Synced: 2025-10-10T13:09:16.132Z (9 months ago)
- Topics: command-line, command-line-tool, nodejs, yaml, yaml-editor, yml
- Language: JavaScript
- Size: 37.1 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# yaml-prune
[](http://badge.fury.io/js/yaml-prune)
[](https://circleci.com/gh/lmammino/yaml-prune)
[](https://standardjs.com)
A simple command line script that allows to prune parts of a yaml file
The command basically takes a YAML string from the standard input, a `path` option (as supported by [object-path](http://npm.im/object-path)), removes the yaml branch identified by the path and prints in the standard output the resulting yaml content.
## Install
Globally:
```bash
npm install --global yaml-prune
```
Or as a dev dependency (e.g. you need it as part of your build process)
```bash
npm install --save-dev yaml-prune
```
## Usage
Using "pipes":
```bash
cat some.yml | yaml-prune
```
Using input redirection:
```bash
yaml-prune some.yml < file.yml
```
If you want to save the output to a file just use output redirection:
```bash
yaml-prune some.yml < file.yml > strippedFile.yml
```
## Contributing
Everyone is very welcome to contribute to this project.
You can contribute just by submitting bugs or suggesting improvements by
[opening an issue on GitHub](https://github.com/lmammino/yaml-prune/issues).
## License
Licensed under [MIT License](LICENSE). © Luciano Mammino.