Metadata-Version: 2.1
Name: Patche
Version: 0.0.2b1
Summary: Modern Patch in Python
Author-Email: jingfelix <jingfelix@outlook.com>
License: MIT
Requires-Python: >=3.10
Requires-Dist: typer[all]>=0.9.0
Requires-Dist: pydantic>=2.5.3
Requires-Dist: pydantic-settings>=2.2.1
Requires-Dist: whatthepatch-pydantic==1.0.6a3
Description-Content-Type: text/markdown

# Patche

Modern patch, written in Python.

## Usage

The following commands are supported:

### apply

Apply a patch to target files.

```shell
patche apply <patch-file>
```

Options:
- `-R, --reverse`: Assume patches were created with old and new files swapped
- `-F, --fuzz LINES`: Set the fuzz factor to LINES for inexact matching

### show

Show details of a patch file.

```shell
patche show <patch-file>
```

### settings

Display current configuration.

```shell
patche settings
```

## Config

`patche` loads the configuration from a file named `.patche.env` in `$HOME`.

```shell
max_diff_lines = 3
```

## Development

`patche` uses `pdm` as package manager. To install the dependencies in your workspace, run:

```bash
pdm install --prod

# If you want to trace patche execution
pdm install
```

ref: [PDM Documentation](https://pdm-project.org/en/latest/usage/dependency/)
