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

node-get-installed-apps

v1.1.0

Published

Get installed app using Node.js, supporting Windows, Linux, and macOS.

Readme

English | 简体中文

Get Installed Apps

Get installed apps and packages using Node.js. Supports Windows, macOS, and Linux.

Note: This operation is intensive due to heavy file I/O. We recommend caching the retrieved information instead of calling these functions repeatedly.

👨‍💻 Installation

npm install node-get-installed-apps

🔌 Usage

ES6 Module

import {getInstalledApps} from 'node-get-installed-apps'

getInstalledApps().then(apps => {
  console.log(apps)
})

CommonJS

const {getInstalledApps} = require('node-get-installed-apps')
getInstalledApps().then(apps => {
  console.log(apps)
})

If you want to use macOS-specific methods separately, you can do it like this.

import {getMacInstalledApps} from 'node-get-installed-apps'

getMacInstalledApps().then(apps => {
  console.log(apps)
})

getMacInstalledApps has a optional parameter directory. The default is '/Applications', you can set it to what you need.

If you want to use Windows-specific methods separately, you can do it like this.

import {getWinInstalledApps} from 'node-get-installed-apps'

getWinInstalledApps().then(apps => {
  console.log(apps)
})

And for Linux-specific methods:

import {getLinuxInstalledApps} from 'node-get-installed-apps'

getLinuxInstalledApps().then(apps => {
  console.log(apps)
})

✅ OUTPUT

Returns an array of applications or packages and their identifying attributes.

To standardize types across all operating, this package returns data in a structure like:

type ReturnData = {
  appName: string;
  appIdentifier: string;
  appVersion: string | null;
  installPath?: string | null;
  // the values of all the above vary based on the "method" used to retrieve the data

  platform: string; // which platform the app exists on
  method: string; // depends on the type of method used to retrieve the info; varies within the os

  metadata: object; // the raw metadata returned by the "method"
}

This is the return value for Visual Studio Code, the properties appName, appIdentifier, appInstallDate, and appVersion are overridden. The comment asks to fix the examples so they match the standardized ReturnData structure described above. Below are corrected, compliant examples for macOS, Windows, and Linux, keeping the same underlying data but reshaped into the normalized return format.

macOS

[
  {
    appName: "Visual Studio Code",
    appIdentifier: "com.microsoft.VSCode",
    appVersion: "1.79.0",
    installPath: "/Applications/Visual Studio Code.app",
    platform: "macOS",
    method: "mdls",
    metadata: {
      _kMDItemDisplayNameWithExtensions: "Visual Studio Code.app",
      kMDItemCFBundleIdentifier: "com.microsoft.VSCode",
      kMDItemVersion: "1.79.0",
      kMDItemKind: "应用程序",
      kMDItemContentType: "com.apple.application-bundle",
      kMDItemDateAdded: "2023-06-20 11:13:54 +0000",
      kMDItemLastUsedDate: "2023-07-06 09:53:00 +0000",
      kMDItemPhysicalSize: "546988032",
      kMDItemUseCount: "9"
    }
  }
]

Windows

[
  {
    appName: "Microsoft Visual Studio Code (User)",
    appIdentifier: "{771FD6B0-FA20-440A-A002-3B3BAC16DC50}_is1",
    appVersion: "1.80.0",
    installPath: "D:\\software\\Microsoft VS Code\\",
    platform: "Windows",
    method: "registry",
    metadata: {
      DisplayName: "Microsoft Visual Studio Code (User)",
      DisplayVersion: "1.80.0",
      Publisher: "Microsoft Corporation",
      InstallLocation: "D:\\software\\Microsoft VS Code\\",
      DisplayIcon: "D:\\software\\Microsoft VS Code\\Code.exe",
      UninstallString: "\"D:\\software\\Microsoft VS Code\\unins000.exe\"",
      InstallDate: "20230709",
      URLInfoAbout: "https://code.visualstudio.com/"
    }
  }
]

Linux

[
  {
    appName: "fail2ban",
    appIdentifier: "fail2ban",
    appVersion: "1.0.2-2",
    installPath: null,
    platform: "Linux",
    method: "dpkg",
    metadata: {
      packageId: "fail2ban",
      version: "1.0.2-2",
      architecture: "all",
      maintainer: "Debian Python Team <[email protected]>",
      section: "net",
      description: "ban hosts that cause multiple authentication errors",
      installed_size: 2180096,
      is_system_package: 0,
      is_auto_installed: 0
    }
  }
]

🤔 How it works

  • macOS Retrieves the software file directory under 'Applications'. Uses 'mdls' to fetch relevant information about the software files, and then extracts the corresponding information. If 'mdls' fails, it fallbacks to 'plutil'.
  • Windows Retrieves software information by reading data from the registry.
  • Linux Retrieves software information by querying entries listed in DPKG, APT, SNAP, and Flatpak.

🛠 Development

git clone https://github.com/grayhatdevelopers/node-get-installed-apps.git
cd get-installed-apps
npm i
npm start

🙏 Special Thanks

Thank you to:

  • Xutaotaotao for kicking off this project. [Original branch]

  • jbrink90 for the Linux support