userland.run70Try the demo
Catalog app · RISC-V VM

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.

catalog app

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.

bash
rg --version
rg -n needle corpus.txt
loading…
Expected output
$ 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.

javascript
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:

bash
rg -n 'TODO|FIXME' src/

← All 32 catalog apps