npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

bash-web

v0.0.114

Published

WASM-first bash-compatible shell

Readme

Experimental and pre-1.0. Not on npm. Build from source. Status lists what works and what does not.

Run a script on the engine, natively, with no browser:

$ shell/target/release/shell-engine -c '
greet() { echo "hello, $1"; }
for name in web wasm; do greet "$name"; done
words=(a b c)
echo "${#words[@]} words, first is ${words[0]}"
printf "%q\n" "two words"
echo $((6 * 7))
seq 3; echo "seq exited $?"
'
hello, web
hello, wasm
3 words, first is a
two\ words
42
seq exited 127
/usr/bin/bash: seq: command not found

Run the same engine in a page. This needs a built checkout, Waffle at the version bash-web selects, installed as waffle@npm:@waffle-os/runtime (Waffle's API is early and can change), and dist/fs-worker.js served at /fs-worker.js. Embed a shell in a page has the install steps.

import { createRuntime } from "waffle";
import { createShell } from "bash-web";

const runtime = createRuntime({
  filesystem: { workerURL: new URL("/fs-worker.js", location.href) },
});
const shell = await createShell({ runtime, script: "echo hello" });
const { code } = await shell.done; // output arrives in shell.terminal
await shell.dispose();
await runtime.dispose();

Why

  • Bash behavior, measured. GNU Bash 5.3.15 is the oracle. The committed baseline passes 1,315 of 1,682 Oils builtins-only cases (78.2%), comparing stdout bytes and exit status, and CI fails any change that stops a passing case from passing. Reproduce it.
  • Pipelines stream. Every pipeline stage is a task on one thread, and pipes are bounded. producer | grep shows lines as they arrive, and Ctrl+C stops the foreground job without touching background jobs.
  • You pay for the commands you use. The shell core has no external commands. cat, grep, mkdir, and seq are separate WASM programs that you install on demand. Anything not installed exits 127.
  • One runtime per page. The shell borrows your Waffle runtime. It never creates one, and disposing a shell leaves the runtime and other shells alone.

The page creates the runtime and createShell borrows it. The terminal is two byte rings between the page and the worker.

Quick start

You need git and Rust through rustup, because the repository pins its Rust version in rust-toolchain.toml and rustup installs that version.

  1. Clone and build the engine:

    git clone https://github.com/ShaulLavo/bash-web.git
    cd bash-web
    cargo build --release --locked --manifest-path shell/Cargo.toml -p shell-engine --bin shell-engine
  2. Run a script:

    shell/target/release/shell-engine -c 'echo hello; exit 7'; echo "exit: $?"
    hello
    exit: 7

Getting started continues with pipelines and the utilities. The browser build also needs wasi-sdk 34.0 to compile the WASM guests. Start with Embed a shell in a page.

What you can do

How it works

The shell is a WASM program, not a runtime. A thin TypeScript adapter starts it in a worker on the Waffle runtime your page created. The page and the worker share a SharedArrayBuffer with an input ring and an output ring, so the page never blocks on the shell. The engine runs one async executor on one thread, and every pipeline stage, subshell, and background job is a task. External commands run as other WASM programs that Waffle starts with the right descriptors. How bash-web works explains the design and its three ADRs record why.

Docs

Docs map · Getting started · Guides · Concepts · API reference · Status and limits · ADRs · Development

Status

Experimental and pre-1.0. The version is 0.0.x, the package is private, and there are no releases. Any commit can change the API.

  • Native engine: builds and tests on macOS arm64 and Linux.
  • WASI guests and browser build: Linux only (CI). Not verified on macOS or Windows.
  • Browsers: Chromium and Firefox in CI. Safari is not verified.
  • Bash compatibility: 78.2% of Oils builtins-only cases. Missing: associative arrays, mapfile, running traps, printf floats.
  • Bun: not included. The Bun-specific browser tests are skipped.

Every gap, with a command that shows it, is in Status and limits.

License

MIT. The parser and several expansion rules started from Bashkit (MIT). See third-party notices.

Contributing

Build, test, and layout notes are in Development.