# Install locally in Pi

Copy this extension into Pi's user extension folder, install its runtime dependencies, and reload Pi.

```sh
DEST="$HOME/.pi/agent/extensions/pi-show-diff"

mkdir -p "$HOME/.pi/agent/extensions"
rm -rf "$DEST"
mkdir -p "$DEST"

rsync -a --delete \
  --exclude '.git' \
  --exclude 'node_modules' \
  --exclude 'issues' \
  ./ "$DEST"/

cd "$DEST"
npm install --omit=dev
```

If the old package is still installed and Pi reports a `show_review_diff` conflict, remove it:

```sh
rm -rf "$HOME/.pi/agent/extensions/pi-diff2html"
```

Then restart or reload Pi. The extension registers:

- slash command: `/show-diff [base-ref]`
- tool: `show_review_diff`
