json-compare-cli

Crates.iojson-compare-cli
lib.rsjson-compare-cli
version0.1.3
created_at2025-04-27 14:06:09.770912+00
updated_at2025-05-04 03:25:00.245695+00
descriptionA command-line tool to compare JSON files and print the differences in a human-readable format.
homepagehttps://github.com/anhkhoakz/some-rust-scripts/tree/main/json-compare-cli
repositoryhttps://github.com/anhkhoakz/some-rust-scripts/tree/main/json-compare-cli
max_upload_size
id1651144
size313,078
Nguyễn Huỳnh Anh Khoa (anhkhoakz)

documentation

README

JSON Compare CLI

Table of Contents

Crates.io Version Crates.io Total Downloads Crates.io Size Crates.io License

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.

Commit count: 69

cargo fmt