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

@vantail/api

v0.1.21

Published

The Vantail JavaScript SDK: native APIs for your application.

Readme

@vantail/api

The JavaScript SDK for Vantail: native APIs for an application whose interface is a web page.

npm create @vantail my-app

Already have a project, this is installed for you by the scaffolder. Otherwise:

npm install @vantail/api

What it does

Your application is TypeScript and a web interface. This package is how it reaches the things a browser cannot: the filesystem, native dialogs, the menu bar, the tray, the clipboard, other processes, USB devices.

import { dialog, filesystem } from "@vantail/api";

const path = await dialog.openFile();

if (path) {
  console.log(await filesystem.readText(path));
}

There is no Node.js underneath. node:fs does not exist in a Vantail app and neither does require; any browser-compatible npm package works, and this is the replacement for the rest.

What is in it

app            identity, lifecycle, and an event bus between windows
appWindow      size, position, state, fullscreen, always-on-top, devtools
               titleBarStyle for drawing your own, titleBarMetrics to size it
               createWindow, getWindow, listWindows, currentWindow for more
               than one, and onWindowCreated / onWindowReady / onWindowClosed
               to hear about them

filesystem     read, write, copy, rename, watch - text and binary
dialog         open, save, message, confirm - drawn by the OS
fileDrop       files dragged onto the window, as real paths
clipboard      text and images

menu           the application menu, and context menus
tray           an icon in the menu bar or system tray
notification   a notification from the OS
shortcut       key combinations claimed system-wide
autostart      starting when the user logs in
power          notices when the machine suspends and resumes
screen         the monitors attached, in logical pixels
os             platform, architecture, and per-application directories
path           joining and splitting paths, without a round trip

process        run another program, stream its output
shell          hand a URL or file to whatever owns it
network        HTTP from the runtime, past CORS - buffered, streamed,
               or upgraded to a WebSocket
database       SQLite in a file the user owns, optionally encrypted
mdns           discover services on the local network
hid            talk to USB HID hardware
secrets        the platform keychain
deepLink       your own URL scheme
updater        check, download, install, relaunch

Everything returns a promise. Failures reject with a VantailError carrying a stable code, which is what you branch on:

import { filesystem, VantailError } from "@vantail/api";

try {
  await filesystem.readText("/etc/passwd");
} catch (error) {
  if (VantailError.is(error, "PERMISSION_DENIED")) {
    // ask the user to pick a file instead
  }
}

Nothing is available by default

Every native capability is denied until vantail.config.ts asks for it. A webview that can read any file is a webview that can exfiltrate any file, so the scope is something you write down:

permissions: {
  dialog: true,
  filesystem: {
    read: ["$DOCUMENT/**"],
    write: ["$APPDATA/**"],
  },
}

A path the user picks in a dialog, or drops on the window, is granted for the session on top of that - so the standing scope can stay narrow and dialog.openFile() still opens anything they choose.

Documentation

Zero dependencies. MIT licensed.