Skip to content

Commit

Permalink
write readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
semihbkgr committed Jan 7, 2024
1 parent 3447c86 commit 7c05cfa
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
# yamldiff

yamldiff is a utility tool that applies a structural comparison on yaml files, making it easier to identify and understand the differences between them.

It basically compares the structural differences between two yaml files.

![example](images/example.png)

## Installation

```bash
$ go install github.com/semihbkgr/yamldiff@latest
```

Run with `help` flag to display a list of available options

``` bash
$ yamldiff --help

yamldiff is a tool for comparing the structural differences between two yaml files

Usage:
yamldiff <file-left> <file-right> [flags]

Flags:
-c, --comment display comments in the output
-e, --exit returns non-zero exit status if there is a difference between yaml files
-h, --help help for yamldiff
-i, --ignore ignore indexes in array
-m, --metadata include metadata in the output (not work with silent flag)
-p, --plain uncolored output
-s, --silent print output in silent ignoring values
-v, --version version for yamldiff

```
## Example
```bash
$ yamldiff --metadata examples/pod-v1.yaml examples/pod-v2.yaml
```
![example-metadata](images/example-metadata.png)
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
)

var rootCmd = &cobra.Command{
Use: "yamldiff",
Short: "yaml diff",
Use: "yamldiff <file-left> <file-right>",
Short: "structural comparison of yaml files",
Args: cobra.ExactArgs(2),
SilenceUsage: false,
RunE: run,
Expand Down

0 comments on commit 7c05cfa

Please sign in to comment.