Skip to main content

size‑cmp

A lightweight tool to compare the size of two directories or files.


📦 Installation

# Clone the repository
git clone https://github.com/youruser/size-cmp.git
cd size-cmp

# Install dependencies (ruff, typer, flask, etc.)
python -m pip install -r requirements.txt

Note: The repository already contains a deps/ directory with bundled binaries (dust, file, size). The installer automatically adds this directory to PATH at runtime, so no extra system‑wide installation is required.


🚀 Quick start (Web UI)

# Run the web server (default host 0.0.0.0, port 5002)
size-cmp web /path/to/dirA /path/to/dirB

Open your browser and navigate to http://localhost:5002. The UI displays a tree view of the two directories, colour‑coded differences, and on‑demand file‑detail comparison.

Options

Option Description
--host Bind address (default: 0.0.0.0)
--port Port number (default: 5002)
--debug Enable Flask debug mode

💻 CLI usage (top command)

The tool provides a top sub‑command that lists the biggest differences between two directories.

# Show the top 10 biggest differences
size-cmp top /path/to/dirA /path/to/dirB -n 10

# Output as JSON (useful for scripts)
size-cmp top /path/to/dirA /path/to/dirB -n 10 --json

Options

Option Description
-n, --top Number of entries to display (default: 10)
--json Print a machine‑readable JSON object instead of a table
--host / --port Same as the web command – only needed when you also want to start the web UI from the same invocation

🛠️ Advanced configuration

  • Binary dependencies – The deps/ folder contains the required binaries (dust, file, size). They are automatically added to PATH when app.py starts, so the tool works on any Linux host without installing these utilities globally.
  • Git metadata – The repository’s Git author/committer information has been normalised to skyfire <skyfireitdiy@hotmail.com>.

📚 License

MIT License – see the LICENSE file for details.


🌐 Internationalization

  • English README: This file (README.md).
  • 中文 README: See the companion file README.zh.md for Chinese documentation.

📚 License

MIT License – see the LICENSE file for details.

Metadata

Release files for size-cmp 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for size-cmp 0.1.2
File Size Uploaded
size_cmp-0.1.2.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for size-cmp 0.1.2
File Interpreter ABI Platform
size_cmp-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 15.2 kB

Release files / size_cmp-0.1.2.tar.gz

Download URL size_cmp-0.1.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8516a36113210a649e3d44545b46d130b83f5c717ea68d3eff6cc4b785813866
BLAKE2b-256 checksum
How to use checksums
490281af6ead16df6004de80854967dbfa9f50682c1281b4e289d5388e8df2a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / size_cmp-0.1.2-py3-none-any.whl

Download URL size_cmp-0.1.2-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88ba6bfb35851a3796bb127bf36dc8a3ad7d443d69f4758a228801fa984a746d
BLAKE2b-256 checksum
How to use checksums
c7dc6e85f6cae9b15630e899dbf2fd3d54dd03948e56dac8cc1fb2d631896857
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page