json-patch-cli 0.1.1

A CLI command to perform JSON RFC 6902 patching, merging and editing operations
json-patch-cli-0.1.1 is not a library.

json-patch-cli badge

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.

Installation

cargo install --locked json-patch-cli

Usage

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 Command

Calculate 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 Command

Apply a JSON (RFC 6902) patch

Usage: json-patch apply --patch <PATCH> <INPUT>

Arguments:
  <INPUT>

Options:
  -p, --patch <PATCH>
  -h, --help           Print help

edit Command

Edit 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>
  -e, --editor <EDITOR>  [default: vim]
  -h, --help             Print help