4 releases
Uses new Rust 2024
0.1.3 | May 4, 2025 |
---|---|
0.1.2 | May 3, 2025 |
0.1.1 | Apr 29, 2025 |
0.1.0 | Apr 27, 2025 |
#1227 in Command line utilities
439 downloads per month
86KB
65 lines
JSON Compare CLI
Table of Contents
About
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.
Getting Started
Follow these instructions to build and use the project on your local machine.
Prerequisites
- Rust (version 1.82.0 or later)
- Cargo (comes with Rust)
Building
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
Installing
To install the binary system-wide (optionally requires sudo):
just install
# or from crates.io:
cargo install json-compare-cli
Uninstalling
To remove the installed binary:
make uninstall
# or from crates.io:
cargo uninstall json-compare-cli
Usage
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.
License
This project is licensed under the GNU General Public License version 2. See the LICENSE file for details.
Dependencies
~2–10MB
~84K SLoC