Gathering detailed insights and metrics for @nullcc/diff2html-cli
Gathering detailed insights and metrics for @nullcc/diff2html-cli
Gathering detailed insights and metrics for @nullcc/diff2html-cli
Gathering detailed insights and metrics for @nullcc/diff2html-cli
Pretty diff to html javascript cli (diff2html-cli)
npm install @nullcc/diff2html-cli
Typescript
Module System
Min. Node Version
Node Version
NPM Version
Add file viewed checkbox option to cli
Updated on Jun 03, 2022
Fix title cli option
Updated on Jun 03, 2022
Add missing diff2html configurations to cli
Updated on Jan 18, 2022
Bump dependencies
Updated on Jul 24, 2020
Fix ignore option
Updated on May 09, 2020
Bump diff2html library dependency
Updated on Feb 05, 2020
TypeScript (91.54%)
JavaScript (5.81%)
HTML (2.47%)
Shell (0.18%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
565 Stars
362 Commits
53 Forks
8 Watchers
8 Branches
11 Contributors
Updated on Jul 09, 2025
Latest Version
5.9.1
Package Id
@nullcc/diff2html-cli@5.9.1
Unpacked Size
2.33 MB
Size
399.29 kB
File Count
328
NPM Version
8.3.0
Node Version
16.13.1
Published on
Mar 28, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
20
Diff to Html generates pretty HTML diffs from unified and git diff output in your terminal
Unified diff and Git diff input
line-by-line
and side-by-side
diff
new and old line numbers
inserted and removed lines
GitHub like style
Code syntax highlight
Line similarity matching
Go to Diff2HTML
Manually download and import rtfpessoa/diff2html/dist/diff2html.min.js
into your page
npm install -g diff2html-cli
Usage: diff2html [options] -- [diff args]
flag | alias | description | choices | default |
---|---|---|---|---|
-s | --style | Output style | line , side | line |
--sc | --synchronisedScroll | Synchronised horizontal scroll | true , false | true |
--su | --summary | Show files summary | closed , open , hidden | closed |
--lm | --matching | Diff line matching type | lines , words , none | none |
--lmt | --matchWordsThreshold | Diff line matching word threshold | 0.25 | |
--lmm | --matchingMaxComparisons | Diff line matching maximum line comparisons of a block of changes | 2500 | |
--hwt | --htmlWrapperTemplate | Path to custom template to be rendered when using the html output format | [string] | |
-f | --format | Output format | html , json | html |
-i | --input | Diff input source | file , command , stdin | command |
-o | --output | Output destination | preview , stdout | preview |
-u | --diffy | Upload to diffy.org | browser , pbcopy , print | |
-F | --file | Send output to file (overrides output option) | [string] | |
--ig | --ignore | Ignore particular files from the diff | [string] | |
-v | --version | Show version number | ||
-h | --help | Show help |
Examples:
diff2html -s line -f html -d word -i command -o preview -- -M HEAD~1
diff2html -i file -- my-file-diff.diff
diff -u file1.txt file2.txt | diff2html -i stdin
diff2html -f json -o stdout -- -M HEAD~1
diff2html -F my-pretty-diff.html -- -M HEAD~1
diff2html -F my-pretty-diff.html --hwt my-custom-template.html -- -M HEAD~1
<!--diff2html-css-->
- writes default CSS to page<!--diff2html-js-ui-->
- writes default JavaScript UI scripts to page//diff2html-fileListCloseable
- writes code to support selected list interaction, must be within a <script>
block//diff2html-synchronisedScroll
- writes code to support selected scroll interaction, must be within a <script>
block<!--diff2html-diff-->
- writes diff content to pagediff2html --ig package-lock.json --ig yarn.lock
package-lock.json
and yarn.lock
from the generated diffNOTE: notice the --
in the examples
This is a developer friendly project, all the contributions are welcome.
To contribute just send a pull request with your changes following the guidelines described in CONTRIBUTING.md
.
I will try to review them as soon as possible.
Make some changes and then node src/main.js
😉
Copyright 2014-2019 Rodrigo Fernandes. Released under the terms of the MIT license.
This project is inspired in pretty-diff by Scott González.
cat xxx.diff | diff2html -c coverage.json -i stdin -F diff_coverage.html
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
7 existing vulnerabilities detected
Details
Reason
Found 1/9 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More