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

@nwutils/packager

v0.4.0

Published

Package NW.js applications for Linux, MacOS and Windows.

Readme

@nwutils/packager

npm

Package NW.js applications for Linux, MacOS and Windows.

Supported output formats, selected via format:

| Format | Platform | Status | | ---------- | -------- | ----------- | | AppImage | Linux | Implemented | | deb | Linux | Planned | | rpm | Linux | Planned | | msix | Windows | Planned | | nsis | Windows | Planned | | dmg | MacOS | Planned |

Getting Started

  1. npm i to install third party dependencies

Usage

This composes with @nwutils/builder: run it against the outDir (and app.name) that @nwutils/builder produced.

import build from "@nwutils/builder";
import packager from "@nwutils/packager";

await build({
  version: "0.115.0",
  platform: "linux",
  arch: "x64",
  srcDir: "./src",
  cacheDir: "./cache",
  outDir: "./out",
  app: {
    name: "Demo",
    icon: "icon.png",
    categories: "Utility;",
  },
});

const appImagePath = await packager({
  format: "AppImage",
  appDir: "./out",
  appName: "Demo",
  cacheDir: "./cache",
  outDir: "./dist",
});

console.log(`AppImage written to ${appImagePath}`);

packager({ format, ...options }) dispatches to the packager for format - options is whatever that packager expects (see appImage(options) below). Passing a format that isn't "AppImage" yet throws a clear "not implemented yet" error rather than doing nothing. appImage is also exported directly, if you'd rather skip the dispatch and know you only ever target AppImage.

The first time it runs for a given architecture, appImage() downloads appimagetool into cacheDir and reuses it on subsequent calls. appimagetool is a native Linux binary, so appImage() only runs on a Linux host, targeting the host's own architecture by default.

appimagetool is invoked with APPIMAGE_EXTRACT_AND_RUN=1, so a FUSE mount is never required - useful in containers, CI runners and other sandboxes where FUSE is typically unavailable.

API Reference

packager({ format, ...options })

| Name | Type | Description | | ------ | -------------------------------------------------- | ---------------------------------------------------------------------------- | | format | "AppImage" \| "deb" \| "rpm" \| "MSIX" \| "NSIS" | Which packager to run. Only "AppImage" is implemented today. | | ... | - | The remaining options are passed through to the packager for format as-is. |

Resolves with the path to the resulting packaged artifact.

appImage(options)

Options

| Name | Type | Description | | --------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | appDir | string | Path to a built NW.js Linux application, ie. the outDir produced by @nwutils/builder for platform: "linux" | | appName | string | Name of the application. Must match the app.name value used to build appDir | | icon | string | Path to a .png or .svg icon. Defaults to the Icon value read from <appDir>/<appName>.desktop | | arch | "ia32" \| "x64" \| "arm64" | Target architecture. Defaults to the host architecture | | outDir | string | Directory the resulting .AppImage file is written to. Defaults to the parent directory of appDir | | cacheDir | string | Directory used to cache the downloaded appimagetool binary. Defaults to "./cache" | | cache | boolean | If true, reuse a cached appimagetool binary. Otherwise redownload it. Defaults to true | | appImageToolUrl | string | Base URL appimagetool-<arch>.AppImage is downloaded from. Defaults to the AppImage/appimagetool "continuous" release |

Resolves with the path to the resulting .AppImage file.

The application's desktop entry file (<appDir>/<appName>.desktop, as written by @nwutils/builder) is copied into the AppImage with its Exec and Icon keys rewritten to match the AppImage's own layout, and a Categories key added (defaulting to Utility;) if one isn't already present, since appimagetool refuses to build an AppImage without one.

Contributing

External contributor

  • Use Node.js standard libraries whenever possible.
  • Prefer to use syncronous APIs over modern APIs which have been introduced in later versions.

Maintainer

  • npm trusted publishing is used for releases
  • a package is released when a maintainer creates a release note for a specific version