The following commands are supported:
Apply a patch to target files.
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 details of a patch file.
patche show <patch-file>Display current configuration.
patche settingsHere are some examples of how to use patche in different scenarios:
| Usage | Introduction |
|---|---|
| MCP Server | A simple MCP server that offers patch utility for LLMs |
patche loads the configuration from a file named .patche.env in $HOME.
max_diff_lines = 3patche uses pdm as package manager. To install the dependencies in your workspace, run:
pdm install --prod
# If you want to trace patche execution
pdm install
# If you want to run tests
pdm run python3 -m unittest tests/test_parse.py
pdm run python3 -m unittest tests/test_apply.pyref: PDM Documentation