---
slug: "pi-edit-replace-all"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/davidbrai/pi-edit-replace-all@main/README.md"
repo: "https://github.com/davidbrai/pi-edit-replace-all"
source_file: "README.md"
branch: "main"
---
# pi-edit-replace-all

A small [pi](https://github.com/badlogic/pi-mono) package that overrides the built-in `edit` tool and adds:

- `replaceAll: true` to replace all exact occurrences of `oldText` in a file
- default behavior unchanged when `replaceAll` is omitted/false (delegates to built-in `edit`)

## Install

### npm

```bash
pi install npm:pi-edit-replace-all
```

### git

```bash
pi install git:github.com/davidbrai/pi-edit-replace-all
```
