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

@rescript-tauri/plugin-shell

v0.1.1

Published

ReScript bindings for @tauri-apps/plugin-shell (Tauri 2.x shell plugin)

Readme

@rescript-tauri/plugin-shell

ReScript bindings for @tauri-apps/plugin-shell — Tauri 2.x's shell plugin (spawn external processes, open files / URLs with the OS-default app).

Status

Phase 2+, first iteration. Awaiting first npm publish (plugin-shell-v0.1.0).

Bundled in this iteration: the Command class (string- and raw-encoded variants, sidecar variants), Child process handle, and the top-level openPath function — covering 100% of the stable public surface of @tauri-apps/plugin-shell v2.3.5.

The TypeScript-level conditional return type of upstream's Command.create({encoding: 'raw'}) is unrolled into separate ReScript functions (Command.create / Command.createRaw / Command.sidecar / Command.sidecarRaw) so the result type stays static.

The upstream top-level open is exposed as openPath to avoid clashing with ReScript's open keyword.

Install (planned)

pnpm add @rescript-tauri/plugin-shell @rescript-tauri/core @tauri-apps/plugin-shell @tauri-apps/api

Add to rescript.json:

{
  "dependencies": ["@rescript/core", "@rescript-tauri/core", "@rescript-tauri/plugin-shell"]
}

Quick example

module Shell = RescriptTauriPluginShell.PluginShell

// Open a URL in the system default browser.
let openHomepage = async () => {
  await Shell.openPath("https://github.com/tauri-apps/tauri")
}

// Run a command, collect its output.
let listFiles = async () => {
  let cmd = Shell.Command.create("ls", ~args=["-la"])
  let output = await cmd->Shell.Command.execute
  Console.log(output.stdout)
}

// Spawn a long-running command and stream its output.
let tail = async () => {
  let cmd =
    Shell.Command.create("tail", ~args=["-f", "/var/log/system.log"])
    ->Shell.Command.onStdoutData(line => Console.log2("stdout:", line))
    ->Shell.Command.onStderrData(line => Console.log2("stderr:", line))
    ->Shell.Command.onClose(payload =>
      Console.log4("closed code=", payload.code, " signal=", payload.signal)
    )

  let _child = await cmd->Shell.Command.spawn
}

Compatibility

| Component | Supported range | |---|---| | @rescript-tauri/plugin-shell | this package | | @rescript-tauri/core | ^0.1.0 (peer) | | @tauri-apps/plugin-shell | ^2.3.0 (peer) | | @tauri-apps/api | ^2.0.0 (transitive via core) | | Rust tauri-plugin-shell | 2.x | | rescript | >=12.0.0 | | @rescript/core | >=1.6.0 | | OS | Linux / macOS / Windows |

Public API

| Symbol | Purpose | |---|---| | openPath(path, ~openWith=?) | Open a URL or file with the OS default (or specified) app | | Command.create / Command.createRaw | Build a string- or bytes-encoded command | | Command.sidecar / Command.sidecarRaw | Build a sidecar command (program declared in tauri.conf.json > bundle > externalBin) | | Command.spawn | Start the command, return a Child.t handle | | Command.execute | Run the command to completion, return its childProcess<'o> output | | Command.onClose / Command.onError | Subscribe to lifecycle events | | Command.onStdoutData / Command.onStderrData | Subscribe to streamed output | | Command.removeAllListeners | Detach all listeners on the command | | Command.stdout / Command.stderr | Low-level access to the underlying EventEmitter | | Child.pid / Child.write / Child.kill | Child process accessors and operations | | EventEmitter module | 9 generic methods (on / once / off / addListener / removeListener / removeAllListeners / listenerCount / prependListener / prependOnceListener) | | spawnOptions | {cwd?: string, env?: Dict.t<string>, encoding?: string} | | childProcess<'o> | {code, signal, stdout, stderr} returned by execute | | terminatedPayload | Payload of the close event |

See src/PluginShell.resi for full doc comments and matching upstream URLs.

See also