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.2.tar.gz (3.8 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.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rcdiff-1.0.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for rcdiff-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4bd1052dfb23bbf6b9873d5adb9683fd764081f6044ccab510966d89710af4a4
MD5 9a999afcbb69461afc877513137e7b8c
BLAKE2b-256 0512fc709ed5dcdeb9ccf98ead9a4d343b62ed56e9a7836fdaf1e97c22db2632

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rcdiff-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for rcdiff-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f87e5222579082b4f6a62e303cd87bb9931e9a7cc5fdb0d94b563f1350dd15b
MD5 53ac30719cbba9cf7d5e19b67e64b699
BLAKE2b-256 d74caed0a33256cd6b5a742eb4cc58819535fe36854f302c06426ab8f3370685

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