@mjfuertesf/pi-show-diff
v0.1.5
Published
Open a local CodeMirror diff preview of branch changes against main from Pi
Maintainers
Readme
pi-show-diff
Pi extension for local development: open a visual Diff2Html view of what your current branch would contribute to main.
It is not a sharing service. It does not upload diffs. It writes a temporary local HTML file and opens it in your browser.
Repository: https://gitlab.com/mjfuertesf/pi-show-diff
Screenshots
Line-by-line:

Side-by-side:

Install
pi install git:gitlab.com/mjfuertesf/pi-show-diff
pi install npm:@mjfuertesf/pi-show-diffUsage
/show-diffWithout arguments, diffs against the remote tracking branch: origin/main, then origin/master. Falls back to the local branch only if no remote ref is found.
Pass an explicit ref to use it literally:
/show-diff develop # local branch "develop"
/show-diff origin/develop # remote tracking branch
/show-diff abc123 # specific commitWhat it does
- Runs a PR-style diff:
git diff <base>...HEAD - Renders it with Diff2Html
- Opens a local browser preview
- Warns if the working tree is dirty
- Includes committed branch changes only
Pi tool
Also registers:
show_review_diff({ base?: string })Useful when a Pi skill or agent should open the same local review preview.
Development
npm test
npm pack --dry-runCredits
Built with CodeMirror 6 by Marijn Haverbeke and contributors.
License
MIT
