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.3

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.3
File Size Uploaded
size_cmp-0.1.3.tar.gz 7.5 kB Details

Built distribution (wheel)

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

Total release size: 15.3 kB

Release files / size_cmp-0.1.3.tar.gz

Download URL size_cmp-0.1.3.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
15c9d00431147f58e79c0c078f47d68593246bddb6cbe1f739ab45e216199c75
BLAKE2b-256 checksum
How to use checksums
c235f1408ae09399b80864acd767c2e0ccb120da137c469abf619f9a965c3d14
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.3-py3-none-any.whl

Download URL size_cmp-0.1.3-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e4dc3c778607c5f5f9266c7e0e922055e6062887bb07178abca872049497fae
BLAKE2b-256 checksum
How to use checksums
011779db770cbf7fdee86768274968b6b1179165a003b13442421738bcb66def
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

This release

0.1.3 This release

2 release files

0.1.2

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