Skip to content
CAI
Software that uses CAICheck a score

dandavison/delta

71.3

Strong · 27 September 2026

23.7k

lines of production code

Rust

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Delta is a syntax-highlighting viewer for git and ripgrep output, designed to enhance terminal diff rendering with features like side-by-side views, line numbers, and hyperlink generation. It provides a modular configuration system that supports composable display modes, automatic light/dark theme detection, and shell completion for Bash, Fish, and Zsh. The tool integrates with the bat library for syntax highlighting and pager management, while offering diagnostic scripts and Docker environments to assist with troubleshooting and deployment.

How it got here

2019–2020 — Architecture modernization and feature expansion

14 changes.

This period focused on restructuring the project's core architecture, introducing a modular feature system and refactoring option resolution to support light/dark mode detection. Significant engineering efforts included replacing legacy dependencies with modern alternatives, switching the ANSI parsing engine, and establishing comprehensive test infrastructure with snapshot and integration testing. The work also expanded the tool's usability through shell completions, release automation, and Docker-based development environments.

2021 — modularization and usability enhancements

5 changes.

This period focused on restructuring the codebase by refactoring diff output handling into modular handlers to improve maintainability. It also expanded user-facing capabilities through new subcommands for configuration inspection, theme previewing, and external tool integration, alongside improved GitLab and SourceHut URL support.

Features

Add shell completion scripts for Bash, Fish, and Zsh

New completion files have been added to etc/completion for Bash, Fish, and Zsh, enabling tab-completion for delta's command-line options and arguments. These scripts provide autocompletion for flags such as --blame-format, --syntax-theme, and --paging, as well as file path completion for diff inputs, improving the interactive command-line experience for users of these shells.

etc/completion · high confidence

Added diagnostic and configuration helper scripts for delta

New shell scripts have been added to the bin directory to assist with troubleshooting and configuration management for the delta tool. The diagnostics script runs a series of commands to check versions, environment variables, and ANSI color support. The list-options script extracts and filters delta's command-line options, and the check-show-config-options script compares listed options against the current configuration.

etc/bin · high confidence

Initial project scaffolding and documentation

The repository is initialized with core project files including a Makefile for building, testing, and benchmarking, a MIT LICENSE, and comprehensive documentation (README, ARCHITECTURE, CONTRIBUTING). A themes.gitconfig file is added to provide a collection of configurable syntax-highlighting themes for the delta pager, and .gitattributes/.gitignore are configured to manage repository metadata and build artifacts.

(repo-wide) · high confidence

Introduce a modular feature system for delta configuration

Delta now uses a new modular feature system where display modes (such as side-by-side, line numbers, hyperlinks, diff-highlight, diff-so-fancy, navigate, raw, and color-only) are implemented as composable, named features. Users can enable these capabilities via command-line flags (e.g., --side-by-side, --line-numbers) or by listing them in the git config \delta.features\ key. Features can be combined, and their settings can be overridden by git config entries or command-line arguments, with later features in the list taking precedence for conflicting options. This replaces the previous flat flag-based configuration with a more flexible and extensible architecture.

src/features · high confidence

New Docker environment for building and running Delta on Ubuntu

A new Docker setup has been added to the project to facilitate investigating OS-dependent issues with Delta. This includes an Ubuntu-based Dockerfile that installs necessary build tools (curl, git, less, gcc), sets up the Rust toolchain, clones the Delta repository, and compiles it from source. A Makefile target and a convenience script are provided to easily build the 'delta-ubuntu' image and run Delta within it.

etc/docker · high confidence

New alignment module for edit distance computation

A new \src/align.rs\ module has been added to implement the Needleman-Wunsch / Wagner-Fischer algorithm for computing edit distance and alignment between token sequences. This module introduces an \Alignment\ struct and an \Operation\ enum (NoOp, Deletion, Insertion) to track the specific edit operations required to transform one sequence into another. It also includes a \run\_length\_encode\ helper to coalesce consecutive identical operations, providing the foundational logic for line-pairing and edit inference in the diff processing pipeline.

src · high confidence

New release automation Makefile

A new release automation script (etc/release.Makefile) has been added to streamline the release process. It defines targets to check the environment, bump the version in Cargo.toml, create a GitHub release tag, and update version references in the documentation (manual/src/full---help-output.md and manual/src/installation.md).

etc · high confidence

New subcommands for external tools, configuration inspection, and theme preview

The \src/subcommands\ module now exposes several new capabilities: you can pipe output from external tools like \git\ (e.g., \git show\, \git diff\) or \ripgrep\ (\rg\) directly into delta for enhanced viewing; inspect your current configuration with \--show-config\ (which now includes \diff-stat-align-width\ and \right-arrow\ settings); preview available syntax themes with \--show-syntax-themes\ (supporting both light and dark modes) or list them with \--show-syntax-themes\ in machine-readable format; and generate shell completion scripts for your preferred shell. Additionally, \--show-themes\ now exits with an error if no themes are found, and \--show-colors\ provides a visual reference for all supported color groups.

src/subcommands · high confidence

Architecture

Refactor diff output handling into modular handlers

The internal logic for processing git output has been restructured from a monolithic state machine into a set of dedicated handler modules (blame, commit\_meta, diff\_header, grep, hunk, hunk\_header, merge\_conflict, etc.). This change improves code maintainability and separation of concerns without altering the external user-facing behavior of the tool.

src/handlers · high confidence

Behavioural changes

Automated Debian package generation for Linux releases

The CI pipeline now automatically builds and packages the release binary into a Debian (.deb) package for Linux targets. This change introduces a new \before\_deploy.sh\ script that handles the creation of the package structure, including the binary, documentation, and license, while explicitly requesting xz compression for the final archive. It also ensures the package correctly declares dependencies and conflicts with the musl variant to prevent installation issues.

etc/ci · high confidence

Improved help text wrapping and process detection reliability

The help output now wraps more accurately by respecting indentation, bullet points, and explicit no-wrap markers, ensuring complex command-line help displays correctly across different terminal widths. Additionally, the tool now detects its calling process (such as git or grep) in a background thread, which prevents the application from blocking while waiting for process information, and path resolution logic has been refined to correctly handle relative paths based on the caller's context.

src/utils · high confidence

Integrate bat library for syntax highlighting and pager management

The \src/utils/bat\ module introduces a new integration with the \bat\ library to handle syntax highlighting assets and terminal output. This change adds support for listing available languages with proper formatting and colorization, manages cache directories following XDG standards (particularly on macOS), and improves pager behavior by correctly parsing the \less\ version to handle Nerd Fonts and terminal compatibility. It also standardizes how the pager is launched and configured, ensuring consistent output handling across different environments.

src/utils/bat · high confidence

Refactored option resolution and introduced dedicated light/dark mode detection

The options system has been restructured into a modular architecture (get, set, theme, option\_value) to improve how configuration values are resolved and applied. A key behavioral change is the introduction of a dedicated light/dark mode concept, separate from the syntax theme; the application now detects the terminal's color scheme (using the terminal-colorsaurus library) and allows users to explicitly override it with --light or --dark flags. This detection logic is applied early, ensuring that syntax themes are correctly interpreted as light or dark based on their names or explicit settings. Additionally, the option lookup order has been standardized to prioritize git config values, then feature-specific overrides, and finally defaults, with environment variables able to override git config settings.

src/options · high confidence

Support for GitLab subgroups and SourceHut tilde-style URLs in remote repository detection

The git\_config module now correctly parses remote URLs for GitLab repositories that include subgroup paths (e.g., \proj/grp/subgrp/repo\) and SourceHut repositories using the tilde-prefix username format (e.g., \\~user/repo\). This ensures that hyperlink generation for commits works accurately for these specific hosting configurations, which were previously not fully supported by the URL parsing logic.

_src/git\config · high confidence

Switch ANSI parsing engine from vte to anstyle-parse

The internal ANSI escape sequence parser in the \src/ansi\ module has been replaced with \anstyle-parse\. This change updates the underlying implementation used by functions like \truncate\_str\, \measure\_text\_width\, and \strip\_ansi\_codes\, ensuring that text width calculations and truncation logic correctly handle ANSI styling codes. The switch also introduces support for CSI sequences beyond standard SGR (Select Graphic Rendition) commands, allowing the tool to process a broader range of terminal escape sequences without breaking text layout.

src/ansi · high confidence

Test coverage

Added shell-based integration tests for deprecated options, navigate/less history, and raw output; Expanded test fixtures for complex diff scenarios; New test infrastructure and snapshot testing support.

Dependencies

Update dependencies and lockfile for git-delta 0.19.2

This release updates the project's dependency tree and generates a fresh Cargo.lock file. Key library upgrades include clap to v4.3.14, bat to v0.26.0, git2 to v0.20.0, syntect to v5.0.0, and sysinfo to v0.29.0. The project also migrates from the deprecated \error-chain\ crate to \anyhow\ and replaces the unmaintained \dirs\ crate with \dirs-next\ (pinned at v6.0.0). Additionally, the \atty\ crate is replaced by the standard library's \IsTerminal\ trait, and \structopt\ is fully replaced by \clap\'s derive features.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 49 → 71 (+22.3)
  • Rubric changed (rubric-2026.08.15 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 87 (-13.2)
  • Architecture 99 (new)
  • Maturity 72 → 65 (-7.6)
  • Readiness 34 → 73 (+38.3)
  • Security 47 → 71 (+23.3)
  • Event Sourcing 100 (new)

Resolved (39)

  • Decision is a one-line rule with no context (why 24-bit color matters) and consequences/trade-offs are absent (manual/src/tips-and-tricks/24-bit-color-truecolor.md)
  • Dimension evaluation failed
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 19 more

New (159)

  • ClassTooLong: Opt (src/cli.rs)
  • Config::from (cognitive 21) (src/config.rs)
  • Config::from (cyclomatic 19) (src/config.rs)
  • Dependency hygiene PARTLY measured — Cargo dependencies read, dependency currency not (crates.io unreachable)
  • Documentation: no project overview (README.md)
  • Duplicated block (20 lines × 2) (src/parse_styles.rs)
  • Duplicated block (37 lines × 2) (src/handlers/grep.rs)
  • Duplicated block (7 lines × 2) (src/parse_style.rs)
  • Duplicated block (7–8 lines × 2) (src/subcommands/show_syntax_themes.rs)
  • FileTooLong: src/cli.rs (src/cli.rs)
  • FileTooLong: src/paint.rs (src/paint.rs)
  • FixmeComment (src/handlers/diff_header.rs)
  • FixmeComment (src/handlers/hunk.rs)
  • FixmeComment (src/paint.rs)
  • FixmeComment (src/paint.rs)
  • FunctionTooLong: git_delta::options::set::set_options (src/options/set.rs)
  • FunctionTooLong: git_delta::run_app (src/main.rs)
  • FunctionTooLong: git_delta::subcommands::show_config::show_config (src/subcommands/show_config.rs)
  • FunctionTooLong: git_delta::wrapping::wrap_minusplus_block (src/wrapping.rs)
  • HackComment (src/features/side_by_side.rs)
  • …and 139 more

Changes since last survey

  • 2 commits — 2 feature/other, 0 fixes

By area

  • (root) — 1 commit
  • manual/src — 1 commit

Notable commits

  • change: Take the terminal width from $COLUMNS when it is set (#2240)
  • change: docs: add link to a live browser demo (#2229)

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

dandavison/delta was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 27 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 5ddd7fa66ee900b6783e80089174d2170e46f06f — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-7c1cb6328e11.