# samg/diffy

Easy Diffing in Ruby

Repository: https://github.com/samg/diffy
Canonical: https://ross.abutalabs.com/products/samg-diffy
Homepage: http://rubygems.org/gems/diffy
Language: Ruby
License: MIT
License Family: permissive
Last push: 2025-06-09T15:24:52+00:00

## Health v2 (maintenance only)
Score: 44/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 25, release rhythm 35, longevity 100
- inputs: {"age_days": 5909, "days_push": 450, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1307, forks 104 (observed 2026-08-28T04:04:18.983402+00:00)

## What it is
A Ruby gem that provides a convenient interface for generating diffs between two strings or files. It wraps the battle-tested Unix diff tool and outputs plain text, ANSI-colored, or HTML-formatted diffs.

## Use cases
- generate diffs between two strings in ruby
- show file differences with html highlighting
- colorized diff output for terminal
- compare two files in a ruby app
- render inline character-level changes in html
- diff text in tests or code review tools

## When to choose
- you need diffs in a Ruby application without implementing LCS yourself
- you want HTML or ANSI-colored diff output out of the box
- you trust Unix diff semantics and want a thin wrapper

## When to avoid
- you need a pure-Ruby diff with no external diff binary dependency
- you're on Windows without a diff executable available
- you need word-level or semantic diffs beyond line and inline character highlighting

## Facets
- artifact type: library
- maturity: stable
- function: parser, developer-tools
- domain: developer-tools, text-editors, files
- platform: ruby, cross-platform, cli
- tags: diff, unix-diff, html-diff, ansi-color, ruby-gem

## Member repositories
- samg/diffy (main) score 44

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:18.983402+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:50:17.006145+00:00, confidence not recorded.
  - readme: https://github.com/samg/diffy (fetched 2026-08-28T04:04:18.983402+00:00, sha 4523a25e5d50)
  - homepage: http://rubygems.org/gems/diffy (fetched 2026-08-29T12:08:38.836758+00:00, sha 102c1185b21e)
  - site_page: https://guides.rubygems.org/command-reference (fetched 2026-08-29T12:08:38.845615+00:00, sha ef62154d6253)
  - site_page: https://rubygems.org/pages/about (fetched 2026-08-29T12:08:38.849544+00:00, sha e4248571fa5d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
