daff
Data diff tool for comparing tables and CSV files
TLDR
SYNOPSIS
daff [command] [options] [files]
DESCRIPTION
daff is a data diffing tool designed for comparing tabular data such as CSV files, database tables, and spreadsheets. It provides git-like diff and patch operations specifically optimized for structured data formats.
The tool can detect added, removed, and modified rows and columns, represent differences in various formats including HTML and colored terminal output, and apply patches to update data files. It's particularly useful for tracking changes in data exports, database dumps, and collaborative data editing workflows.
OPTIONS
--color
Force colored output (default: auto-detect)--no-color
Disable colored output--format FORMAT
Output format: csv, tsv, html, json, markdown--output FILE
Write output to file instead of stdout--git
Use git-style diff format--padding N
Set column padding (default: 2)--unordered
Treat rows as unordered during comparison-h, --help
Display help and exit--version
Display version and exit
COMMANDS
diff
Compare two tables and output differencespatch
Apply a patch file to a tablemerge
Perform a three-way merge of tablesrender
Display a table with formattingconvert
Convert between table formats
CAVEATS
Data types are inferred from content; explicit type declarations are not supported. Very large files may require significant memory. Comparison of unordered data requires more computational resources. Binary data and special characters may not be handled correctly in all output formats.
HISTORY
daff was originally created by Paul Fitzpatrick as a tool for data versioning and collaboration. The name comes from "data diff." It has been implemented in multiple languages including JavaScript, Python, and Java. The tool was designed to bring version control concepts to data files, making it easier to track changes in datasets over time.

