https://github.com/cablehead/record-diff.nu
Nushell module to diff records
https://github.com/cablehead/record-diff.nu
data-structures diff module nushell
Last synced: 2 months ago
JSON representation
Nushell module to diff records
- Host: GitHub
- URL: https://github.com/cablehead/record-diff.nu
- Owner: cablehead
- License: mit
- Created: 2025-04-12T19:26:47.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-04-13T00:12:21.000Z (6 months ago)
- Last Synced: 2025-08-09T02:50:05.598Z (2 months ago)
- Topics: data-structures, diff, module, nushell
- Language: Nushell
- Homepage:
- Size: 14.6 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# record-diff.nu
A Nushell module for comparing two records and identifying nested differences
with detailed change information. Makes differences in records human
comprehensible.## Installation
```nushell
do {
# Select one of your module paths to install the module
$NU_LIB_DIRS | default [] | append $env.NU_LIB_DIRS? | uniq | input list "Clone to" | cd $in
git clone https://github.com/cablehead/record-diff.nu ./record-diff
"ready:\nuse record-diff"
}
```## Update
```nushell
do {
# Locate the current install
$NU_LIB_DIRS | default [] | append $env.NU_LIB_DIRS? | each { path join "record-diff" } | where { path exists } | first | cd $in
# And update
git pull
}
```## Usage
```nushell
use record-diff$ record-diff {user: {name: "Bob"}} {user: {name: "Bob" email: "bob@example.com"}}
─#─┬────key─────┬─action─┬─value_before─┬───value_after───
0 │ user.email │ added │ │ bob@example.com
───┴────────────┴────────┴──────────────┴─────────────────
```## Testing
```
./test.nu
```