Run ripgrep in the browser
Search file contents recursively with a regex, fast, respecting .gitignore.
Try it live
Nothing is downloaded until you press Run.
Search files with ripgrep
Installs ripgrep 14.1.0 from the signed catalog (every chunk is verified before it is written), then runs the commands below in the VM's shell.
rg --version rg -n needle corpus.txt
$ rg --version ripgrep 14.1.0 (rev e50df40a19) features:-simd-accel,-pcre2 PCRE2 is not available in this build of ripgrep. $ rg -n needle corpus.txt 1:needle one 3:needle two 5:needle three
What it is
ripgrep (rg) walks a directory tree and searches every file for a regular expression, skipping hidden, binary and .gitignored files by default. It is one of the fastest grep tools available. In the browser it searches projects loaded into the VM with the same flags developers already know.
Package facts
- version
14.1.0- runs on
- RISC-V VM (
elf-app,riscv64gc-linux-musl) - download
- 9.2 MB compressed · 1 file
- command
rg- requires
- nothing else — a static binary
- license
Unlicense OR MIT(upstream)- upstream
- github.com/BurntSushi/ripgrep
- catalog
- generation 12, Ed25519-signed
Install and run it from your page
With the SDK, installApp resolves ripgrep in the signed index, fetches its content-addressed chunks from the CDN, verifies each one and writes the files into the VM. Details in Installing catalog apps.
import { createNano } from "@userland-run/nano-sdk";
const nano = await createNano({ image: { wasm: "/nano/console.wasm" }, ramMB: 512 });
await nano.installApp("ripgrep"); // signature-verified, cached in OPFS
const r = await nano.shExec("rg --version");
console.log(r.stdout);Typical usage of the upstream command-line tool:
rg -n 'TODO|FIXME' src/
Related apps
- fd10.2.0Find files by name with a simple syntax, smart case and sensible defaults — an alternative to find.RISC-V VM1.4 MB
- ast-grep0.44.0Search, lint and rewrite code by syntax-tree pattern instead of regex.RISC-V VM7.9 MB
- sd1.0.0Find and replace text with familiar regex syntax — a simpler sed for substitutions.RISC-V VM956 kB