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 toPATHat 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 toPATHwhenapp.pystarts, 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.mdfor 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)
| File | Size | Uploaded | |
|---|---|---|---|
| size_cmp-0.1.2.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|