# @vscode/ripgrep

> A module for using ripgrep in a Node project

Latest version **1.18.0** (published 2026-05-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vscode/ripgrep
pnpm add @vscode/ripgrep
yarn add @vscode/ripgrep
bun add @vscode/ripgrep
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.18.0 |
| Published | 2026-05-07 |
| First published | 2022-01-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 12 |
| Unpacked size | 4.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 203 |
| Author | Rob Lourens |
| Maintainers | kaimaetzel, lszomoru, alexandrudima, sbatten, joaomoreno.ms, microsoft1es, rebornix, vscode-bot |

## Links

- npm: https://www.npmjs.com/package/@vscode/ripgrep
- Repository: https://github.com/microsoft/vscode-ripgrep
- Homepage: https://github.com/microsoft/vscode-ripgrep#readme
- Issues: https://github.com/microsoft/vscode-ripgrep/issues
- npm.io page: https://npm.io/package/@vscode/ripgrep

## Dependencies (12)

- [@vscode/ripgrep-linux-arm](https://npm.io/package/@vscode/ripgrep-linux-arm.md) 1.18.0
- [@vscode/ripgrep-linux-x64](https://npm.io/package/@vscode/ripgrep-linux-x64.md) 1.18.0
- [@vscode/ripgrep-win32-x64](https://npm.io/package/@vscode/ripgrep-win32-x64.md) 1.18.0
- [@vscode/ripgrep-darwin-x64](https://npm.io/package/@vscode/ripgrep-darwin-x64.md) 1.18.0
- [@vscode/ripgrep-linux-ia32](https://npm.io/package/@vscode/ripgrep-linux-ia32.md) 1.18.0
- [@vscode/ripgrep-win32-ia32](https://npm.io/package/@vscode/ripgrep-win32-ia32.md) 1.18.0
- [@vscode/ripgrep-linux-arm64](https://npm.io/package/@vscode/ripgrep-linux-arm64.md) 1.18.0
- [@vscode/ripgrep-linux-ppc64](https://npm.io/package/@vscode/ripgrep-linux-ppc64.md) 1.18.0
- [@vscode/ripgrep-linux-s390x](https://npm.io/package/@vscode/ripgrep-linux-s390x.md) 1.18.0
- [@vscode/ripgrep-win32-arm64](https://npm.io/package/@vscode/ripgrep-win32-arm64.md) 1.18.0
- [@vscode/ripgrep-darwin-arm64](https://npm.io/package/@vscode/ripgrep-darwin-arm64.md) 1.18.0
- [@vscode/ripgrep-linux-riscv64](https://npm.io/package/@vscode/ripgrep-linux-riscv64.md) 1.18.0

## Recent versions

- 1.18.0 (latest) — 2026-05-07
- 1.17.1 — 2026-03-11
- 1.17.0 — 2025-10-21
- 1.15.14 — 2025-06-27
- 1.15.13 — 2025-06-10
- 1.15.11 — 2025-03-08
- 1.15.10 — 2025-01-10
- 1.15.9 — 2023-11-21
- 1.15.8 — 2023-11-20
- 1.15.7 — 2023-11-16
- 1.15.6 — 2023-10-11
- 1.15.5 — 2023-06-26
- 1.15.4 — 2023-06-08
- 1.15.3 — 2023-05-16
- 1.15.2 — 2023-04-06
- … 4 more at https://npm.io/package/@vscode/ripgrep/versions

## README

# vscode-ripgrep

This is an npm module for using [ripgrep](https://github.com/BurntSushi/ripgrep) in a Node project. It's used by VS Code.

## How it works

- Ripgrep is built in [microsoft/ripgrep-prebuilt](https://github.com/microsoft/ripgrep-prebuilt) and published as release assets for each tag.
- At publish time, the binaries for every supported platform are downloaded by `build/prepare-binaries.js`, verified against `binaries.lock.json` (SHA256), and placed under `bin/<target>/rg[.exe]`. They ship inside the npm tarball.
- At runtime, `lib/index.js` resolves `rgPath` from `process.platform`/`process.arch` to the correct `bin/<target>/<binary>`.
- There is no `postinstall` step and no runtime network access.

### Usage example

```js
const { rgPath } = require('@vscode/ripgrep');

// child_process.spawn(rgPath, ...)
```

### Updating ripgrep

1. Edit the `VERSION` (or `MULTI_ARCH_VERSION`) constant in `lib/platforms.js`.
2. Run `npm run update-lock`. This re-downloads every platform's archive and rewrites `binaries.lock.json` with the fresh SHA256 hashes.
3. Commit the updated `lib/platforms.js` and `binaries.lock.json`.

### Building locally

- `npm run prepare-binaries` — downloads any missing binaries and verifies them against `binaries.lock.json`. Fails on hash mismatch.
- `npm run prepare-binaries -- --force` — forces a clean re-download (still verifies).
- `npm run update-lock` — refreshes `binaries.lock.json` after a version bump.

Set `GITHUB_TOKEN` to avoid GitHub's anonymous API rate limit during downloads.

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