Crates.io | json-patch-cli |
lib.rs | json-patch-cli |
version | 0.1.5 |
source | src |
created_at | 2024-10-31 23:45:27.860724 |
updated_at | 2024-11-01 05:09:15.450015 |
description | A CLI command to perform JSON RFC 6902 patching, merging and editing operations |
homepage | |
repository | https://github.com/kellpossible/json-patch-cli |
max_upload_size | |
id | 1431081 |
size | 33,275 |
A CLI command to perform JSON RFC 6902 patching, merging and editing operations.
This project provides a CLI command json-patch
which uses the brilliant work from the json-patch
crate.
cargo install --locked json-patch-cli
Usage: json-patch <COMMAND>
Commands:
diff Calculate the difference between two json files to create a JSON (RFC 6902) patch
apply Apply a JSON (RFC 6902) patch
edit Edit a JSON (RFC 6902) patch, by editing a patched version of the input using a text editor
completions Generate command line completions script
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
diff
CommandCalculate the difference between two json files to create a JSON (RFC 6902) patch
Usage: json-patch diff <FROM> <TO>
Arguments:
<FROM>
<TO>
Options:
-h, --help Print help
apply
CommandApply a JSON (RFC 6902) patch
Usage: json-patch apply --patch <PATCH> <INPUT>
Arguments:
<INPUT>
Options:
-p, --patch <PATCH>
-h, --help Print help
edit
CommandEdit or create a JSON (RFC 6902) patch, by editing a patched version of the input using a text editor
Usage: json-patch edit [OPTIONS] --patch <PATCH> <INPUT>
Arguments:
<INPUT>
Options:
-w, --watch
Enable live editing of the patch file
-p, --patch <PATCH>
Path to JSON patch file.
If the patch file does not yet exist, this command will create a new one.
-e, --editor <EDITOR>
[default: vim]
-h, --help
Print help (see a summary with '-h')