Skip to main content

A small tool to generate and display diffs between 2 directory.

Project description

Recursive Diff

A command-line utility to compare two directories recursively and identify differences in files.

Features

  • Compare directory structures recursively
  • Display files that exist in one directory but not the other
  • Show number of differing lines for files present in both directories
  • Filter hidden files (configurable)
  • Ignore files by extension/postfix

Installation

From PyPI

pip install rcdiff

Build with uv

If you have uv installed:

# Clone the repository
git clone <repository-url>
cd refactor-tool

# Build and install
uv pip install -e .

# Or build the distribution
uv build

Usage

rcdiff <dir1> <dir2> [options]

Arguments

  • dir1 — First directory to compare
  • dir2 — Second directory to compare

Options

  • --exclude_hidden_files — Exclude hidden files (default behavior)
  • --include_hidden_files — Include hidden files in comparison
  • --ignore_postfixes POSTFIX [POSTFIX ...] — File extensions to ignore (default: .pyc)

Examples

# Basic comparison
rcdiff ./old_code ./new_code

# Include hidden files
rcdiff ./old_code ./new_code --include_hidden_files

# Ignore multiple file types
rcdiff ./old_code ./new_code --ignore_postfixes .pyc .log .tmp

Output

Displays a formatted table with:

  • file — Relative file path
  • in [dir1] — Whether file exists in first directory (y/empty)
  • in [dir2] — Whether file exists in second directory (y/empty)
  • diff lines — Number of differing lines (only shown if differences exist)

Example Output

┏━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━┓
┃ file         ┃ in old  ┃ in new  ┃ diff lines ┃
┡━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━┩
│ main.py      │ y       │ y       │ 5          │
│ config.json  │ y       │         │            │
│ test.py      │         │ y       │            │
└──────────────┴─────────┴─────────┴────────────┘

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rcdiff-1.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rcdiff-1.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file rcdiff-1.0.1.tar.gz.

File metadata

  • Download URL: rcdiff-1.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for rcdiff-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5372a67b438ad078ca69260f6657dc238260fcbdaacc73ed01770a768d408de0
MD5 bd97efb3d3a525420b99921f4a315c2f
BLAKE2b-256 0cb1b15a3a2b5797a35f387a850af2a1ef01da1f9d89485be92f589c501804ba

See more details on using hashes here.

File details

Details for the file rcdiff-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: rcdiff-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for rcdiff-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f003942c82178220968ebbfdeab110672870b74944afd4b59451154fd65f1434
MD5 cda1a5917c339ea754a25568ea928f3a
BLAKE2b-256 959072cd25715f6316fc776a4024290e697167f02c64f8e44454958c359ce1bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page