# @automattic/vip-search-replace

> A Node package interface to a Go powered search and replace package

Latest version **2.0.2** (published 2026-10-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @automattic/vip-search-replace
pnpm add @automattic/vip-search-replace
yarn add @automattic/vip-search-replace
bun add @automattic/vip-search-replace
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2026-10-27 |
| First published | 2020-10-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 5 |
| Author | WordPress VIP |
| Maintainers | wpvip-bot |

## Links

- npm: https://www.npmjs.com/package/@automattic/vip-search-replace
- Repository: https://github.com/Automattic/vip-search-replace
- Homepage: https://github.com/Automattic/vip-search-replace#readme
- Issues: https://github.com/Automattic/vip-search-replace/issues
- npm.io page: https://npm.io/package/@automattic/vip-search-replace

## Dependencies (1)

- [debug](https://npm.io/package/debug.md) ^4.2.0

## Recent versions

- 2.0.2 (latest) — 2026-10-27
- 2.0.1 — 2026-05-08
- 2.0.0 — 2025-07-31
- 1.1.3 — 2024-01-11
- 1.1.2 — 2023-12-12
- 1.1.1 — 2023-06-01
- 1.1.0 — 2023-05-31
- 1.0.20 — 2022-03-02
- 1.0.19 — 2021-09-22
- 1.0.18 — 2021-09-22
- 1.0.17 — 2021-09-22
- 1.0.16 — 2021-02-26
- 1.0.15 — 2021-02-24
- 1.0.14 — 2021-02-24
- 1.0.13 — 2021-02-12
- … 11 more at https://npm.io/package/@automattic/vip-search-replace/versions

## README

[![nlm-github](https://img.shields.io/badge/github-Automattic%2Fvip--search--replace%2Fissues-F4D03F?logo=github&logoColor=white)](https://github.com/Automattic/vip-search-replace/issues)
![nlm-version](https://img.shields.io/badge/version-1.1.1-blue?logo=version&logoColor=white)
# VIP Search & Replace

## How to use this package?

```js
const { replace } = require( '@automattic/vip-search-replace' );
const { pipeline } = require( 'node:stream/promises' );

// Create a readable and writeable stream. Can be any stream: File, std, etc...
const readableStream = fs.createReadStream( 'path_to_sql_file.sql' );
const writeableStream = fs.createWriteStream( 'path_to_sql_file_replaced.sql', { encoding: 'utf8' } );

const result = await replace( readableStream, [ 'thisdomain.com', 'thatdomain.com' ] );

await pipeline( result, writeableStream );
```

The returned stream can fail after producing output if the child process exits
unsuccessfully. Handle errors from the stream or pipeline and discard any
incomplete output.

## Contributing

For details about contributing to this project (e.g. setting up development environment, publishing a release, etc.), please see [CONTRIBUTING.md](CONTRIBUTING.md).

---
_Source: https://npm.io/package/@automattic/vip-search-replace · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
