vscode-ripgrep

Ships prebuilt ripgrep binaries for every platform as npm optionalDependencies, with zero postinstall step.

Library
npm
v1.18.0
202stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
47/100Fair
Development Activity12
Maintenance20
Community76
Maturity60
Momentum20

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
66/100Good
Architecture78
Code Quality55
Innovation62
Learning Curve70

@vscode/ripgrep is the npm wrapper Visual Studio Code itself uses to bundle the ripgrep search binary into Node projects. Instead of compiling ripgrep from source or shelling out to a system install, the package resolves a per-platform binary package (@vscode/ripgrep-<os>-<cpu>) installed transitively via optionalDependencies, and exposes its path as rgPath at runtime.

Because every binary ships as a signed, prebuilt npm package rather than being downloaded on install, there is no postinstall script and no runtime network access — the tarball for the current platform is simply present after npm install. A companion @vscode/ripgrep-universal package bundles every platform’s binary into one install for cross-platform repackaging use cases.

What You Get

  • A pure-JS rgPath export that resolves to the correct native ripgrep binary for the current OS/CPU at runtime, with no build step required
  • Per-platform binary packages (@vscode/ripgrep-<os>-<cpu>) installed transitively via optionalDependencies, so consumers only download the binary they actually need
  • A @vscode/ripgrep-universal package that bundles every supported platform’s binary in one install, plus a binPathFor({ os, arch }) helper for cross-compiling or repackaging tools
  • Binaries verified against SHA256 hashes recorded in binaries.lock.json at build time, sourced from the microsoft/ripgrep-prebuilt release assets
  • Coverage across 12 platform/arch targets including Windows, macOS (x64/arm64), and Linux (x64, arm64, arm, ppc64, riscv64, s390x, ia32)

Common Use Cases

  • Powering fast in-editor text search, as VS Code itself does, without asking the user to install ripgrep separately
  • Adding native, high-performance file-content search to a CLI tool or desktop app built on Node/Electron
  • Bundling a single cross-platform artifact (via @vscode/ripgrep-universal) when packaging a tool for distribution across all supported OSes from one build host
  • Replacing a shelled-out call to a system grep/rg binary with a guaranteed-present, version-pinned dependency

Under The Hood

Architecture The repository is an npm workspaces monorepo rooted at a private vscode-ripgrep-monorepo package, with packages/ripgrep as the published entry point and one packages/ripgrep-<os>-<cpu> directory per supported platform target plus packages/ripgrep-universal. packages/ripgrep/lib/index.js does the only real work at runtime: it builds a platform package name (@vscode/ripgrep-${process.platform}-${arch}) and uses require.resolve (via createRequire in an ESM module) to locate that platform package’s bin/rg binary, throwing a clear error if the optional dependency wasn’t installed for the current platform. build/platforms.js is the single source of truth for the platform/target/version matrix, consumed by both build/prepare-binaries.js (downloads and SHA256-verifies each platform’s ripgrep archive from microsoft/ripgrep-prebuilt into packages/ripgrep-<os>-<cpu>/bin/) and build/sync-packages.js (materializes each platform package’s package.json, README, and LICENSE, and keeps the wrapper’s optionalDependencies versions in sync with the root version). Nothing in this data flow touches the network at install time — verification and download both happen at publish time, driven by an Azure Pipelines template (build/pipeline.yml) that runs one job per platform package.

Tech Stack Plain Node.js with no runtime dependencies at all — the wrapper package’s only dependency is itself an optionalDependencies map pinning exact versions of the twelve platform packages. Build tooling is a handful of small CommonJS scripts (build/prepare-binaries.js, build/sync-packages.js) using only Node built-ins (fs, path, https, crypto, child_process) — no bundler, no transpiler. The published wrapper and universal packages are authored as native ESM ("type": "module") with a hand-written .d.ts for types, while the build scripts themselves stay CommonJS. CI/publishing runs on Azure Pipelines via a shared microsoft/vscode-engineering template, not GitHub Actions.

Code Quality No automated test suite exists in the repository — correctness for each release instead rests on the SHA256 verification step in prepare-binaries.js, which fails the build outright on a hash mismatch against binaries.lock.json, and on JSDoc @ts-check annotations across the build scripts that give some static-typing safety without a full TypeScript build. Error handling in the runtime path is minimal but explicit: lib/index.js wraps its require.resolve call in a try/catch and throws a descriptive error naming the missing platform package rather than failing silently. Naming is consistent throughout (platformPkg, binaryName, packageNameFor), and the monorepo’s package boundaries are enforced structurally rather than by convention.

What Makes It Unique Rather than downloading or compiling a native binary on npm install — the common pattern for wrapping a Rust/Go CLI tool in npm, and one that depends on network access and a working toolchain at install time — this package pushes that cost entirely to publish time and lets npm’s own optionalDependencies platform-resolution mechanism do the selection work. That trade produces installs that are fully offline-capable and deterministic, at the cost of publishing thirteen separate npm packages (one wrapper, eleven per-platform binaries, one universal bundle) per ripgrep version bump — a trade this specific project can absorb because VS Code’s own release cadence already needs that level of automation.

Used by 9 apps in this directory

JavaScript
95%
MIT

AnythingLLM

Developer Tools · Automation · AI Assistants

65,696

The all-in-one AI platform for private document chat, no-code agents, and local LLMs with zero setup friction.

View details
90
Repo Health
78
Technical
64
Dependency
Built with
JavaScript95%
Updated 3 days ago
TypeScript
98%
MIT

Cate

AI Code Assistants

2,122

A desktop IDE built on an infinite canvas — spread code editors, terminals, browsers, docs, and AI agents across freeform space instead of stacking windows and tabs, with layouts restored automatically.

View details
79
Repo Health
71
Technical
72
Dependency
Built with
TypeScript98%
Updated yesterday
TypeScript
84%
Apache 2.0

Continue

Developer Tools · AI Development · AI Code Assistants

35,808

Open-source coding agent for VS Code, JetBrains, and CLI with support for 30+ LLM providers.

View details
81
Repo Health
88
Technical
62
Dependency
Built with
TypeScript84%
Updated yesterday
TypeScript
96%
Other

Dyad

AI Development · Productivity · AI Code Assistants

21,390

Build AI-powered apps locally with your own keys, your own models, and zero cloud lock-in.

View details
88
Repo Health
83
Technical
69
Dependency
Built with
TypeScript96%
Updated yesterday
TypeScript
95%
MIT

melty

Developer Tools · AI Code Assistants · Code Editors

5,443

The AI code editor where every chat message is a git commit you can revert, branch, or squash

View details
35
Repo Health
75
Technical
67
Dependency
Built with
TypeScript95%
Updated 1 years ago
TypeScript
92%
Other

n8n

Automation · No Code Platforms

203,555

Code when you need it, UI when you don't — the workflow automation platform built for technical teams who refuse to choose.

View details
95
Repo Health
87
Technical
66
Dependency
Built with
TypeScript92%
Updated today
TypeScript
80%
Apache 2.0

nao

AI Development · Analytics

1,611

Build and deploy an open-source analytics agent that understands your data warehouse and answers business questions in plain English.

View details
84
Repo Health
76
Technical
67
Dependency
Built with
TypeScript80%
Python19%
Updated yesterday
TypeScript
99%
Other

openclaude

AI Agents · AI Code Assistants

32,842

Run Claude Code workflows against any LLM — OpenAI, Gemini, Ollama, and 200+ backends — from a single terminal-first CLI.

View details
85
Repo Health
78
Technical
78
Dependency
Built with
TypeScript99%
Updated yesterday
TypeScript
95%
Apache 2.0

Void

AI Code Assistants · Code Editors · Automation

28,810

Open-source AI code editor with direct LLM integration and data privacy

View details
46
Repo Health
84
Technical
68
Dependency
Built with
TypeScript95%
Updated 3 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search