2 releases
Uses new Rust 2024
new 0.1.1 | Apr 29, 2025 |
---|---|
0.1.0 | Apr 27, 2025 |
#1950 in Command line utilities
46 downloads per month
16KB
82 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 json-compare-cli
cargo build --release
Installing
To install the binary system-wide (requires sudo):
sudo make install
You can also install it from crates.io:
cargo install json-compare-cli
Uninstalling
To remove the installed binary:
make uninstall
Or, if installed via Cargo:
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 Cargo, 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–15MB
~201K SLoC