https://github.com/quantrpeter/peter-diff
https://github.com/quantrpeter/peter-diff
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/quantrpeter/peter-diff
- Owner: quantrpeter
- Created: 2026-05-22T10:28:50.000Z (about 1 month ago)
- Default Branch: main
- Last Pushed: 2026-05-23T01:27:01.000Z (30 days ago)
- Last Synced: 2026-06-14T14:04:16.255Z (7 days ago)
- Language: Python
- Size: 2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# peter-diff
A Python CLI tool for side-by-side diffing of files and folders.

## Installation
```bash
pip install -e .
```
OR
```sh
pip install peter-diff
```
## Usage
### Compare two files
```sh
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
```sh
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:
```ini
[pypi]
username = __token__
password = pypi-YOUR-TOKEN-HERE
```
> **Note:** Bump the `version` in `pyproject.toml` before each upload — PyPI rejects duplicate version numbers.
## Requirements
- Python >= 3.9
- No external dependencies
## License
MIT