| Crates.io | json-compare-cli |
| lib.rs | json-compare-cli |
| version | 0.1.3 |
| created_at | 2025-04-27 14:06:09.770912+00 |
| updated_at | 2025-05-04 03:25:00.245695+00 |
| description | A command-line tool to compare JSON files and print the differences in a human-readable format. |
| homepage | https://github.com/anhkhoakz/some-rust-scripts/tree/main/json-compare-cli |
| repository | https://github.com/anhkhoakz/some-rust-scripts/tree/main/json-compare-cli |
| max_upload_size | |
| id | 1651144 |
| size | 313,078 |
JSON Compare CLI is a simple CLI tool written in Rust for comparing JSON files and printing the differences in a human-readable format. It supports multiple input formats and is designed for fast, efficient use in the terminal.
Follow these instructions to build and use the project on your local machine.
Clone the repository and build the project:
git clone https://github.com/anhkhoakz/some-rust-scripts/
cd some-rust-scripts
cd json-compare-cli
cargo build --release
To install the binary system-wide (optionally requires sudo):
just install
# or from crates.io:
cargo install json-compare-cli
To remove the installed binary:
make uninstall
# or from crates.io:
cargo uninstall json-compare-cli
You can run the tool with:
cargo run --release -- file1.json file2.json
Or, if installed system-wide or via crates.io, you can run it directly:
json-compare-cli file1.json file2.json
If you provide invalid input, the tool will print an error and usage instructions.
This project is licensed under the GNU General Public License version 2. See the LICENSE file for details.