A simple CLI tool to diff two text files.
Project description
peter-diff
A Python CLI tool for side-by-side diffing of files and folders.
Installation
pip install -e .
OR
pip install peter-diff
Usage
Compare two files
peter-diff file1.txt file2.txt
Displays a side-by-side diff with line numbers. Changed characters within a line are highlighted. Identical files print same.
Compare two folders
peter-diff dir1/ dir2/
Displays a side-by-side tree view of both directories:
Status indicators:
| Symbol | Meaning |
|---|---|
| (none) | identical |
diff |
file differs |
← |
only in left folder |
→ |
only in right folder |
bin |
binary / unreadable, skipped |
Flags
| Flag | Description |
|---|---|
-o |
Only show differences — hide identical files/lines |
Publishing to PyPI
pip install build twine
python -m build
twine upload dist/*
When prompted, use __token__ as the username and your PyPI API token as the password.
To skip the prompt, create a ~/.pypirc file:
[pypi]
username = __token__
password = pypi-YOUR-TOKEN-HERE
Note: Bump the
versioninpyproject.tomlbefore each upload — PyPI rejects duplicate version numbers.
Requirements
- Python >= 3.9
- No external dependencies
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file peter_diff-0.1.3.tar.gz.
File metadata
- Download URL: peter_diff-0.1.3.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14546741c0db072a8bc69555d757ea8c373d37873d06b0aaeb0f202e94dbfa21
|
|
| MD5 |
d4929a9777a55cd205fb6d75e56c11d5
|
|
| BLAKE2b-256 |
d56e463865fb5c999c3be9b40343be941bc94ba902683afe93ef34958e29c8e5
|
File details
Details for the file peter_diff-0.1.3-py3-none-any.whl.
File metadata
- Download URL: peter_diff-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a97c9267c97e1e17a941a2c7eaea62b0c40ea4480d04d75a725d8347ac51b0f9
|
|
| MD5 |
d7b77e33cf22264230b9df7f9f30cfea
|
|
| BLAKE2b-256 |
d7964653468da0484f115fb814ff8affd2ba750d3c62bebe19f228a5f5f7f27d
|