Skip to content

mxclg/difference-finder-cli

Repository files navigation

Actions Status Node CI Maintainability Test Coverage

Difference Finder

A CLI tool that finds differences between two configuration files or data structures. This is a common task for which there are numerous online services, such as jsondiff.com. Useful for testing, debugging, or tracking changes in config files.

Stack

JavaScript Node.js Jest GitHub Actions ESLint

Utility Features

  • Support for different input formats: YAML, JSON
  • Output in plain, stylish, and JSON formats

Requirements

You need to have Node.js installed. If it's not installed, use the installation guide. To check your Node.js version, use the command node -v.

Installation and Setup

  1. Clone the repository:
git clone https://github.com/mxclg/difference-finder-cli
  1. Navigate to the project directory
cd difference-finder-cli
  1. Install dependencies:
npm install
  1. Link the package locally:
npm link

How to use

Run

gendiff [options] <filepath1> <filepath2>

Show help

gendiff -h

Example usage

gendiff --format plain file1.json file2.json

and you'll see =>

Usage: gendiff [options] <filepath1> <filepath2>
Compares two configuration files and shows a difference.
Options:
  -V, --version        output the version number
  -f, --format <type>  output format (default: "stylish")
  -h, --help           output usage information

Examples

About

CLI app that determines the difference between two data structures.

Resources

Stars

Watchers

Forks

Packages

No packages published