https://github.com/ahkohd/get-mac-apps
Get a list of installed apps or check if app is installed on a Mac. ๐๐จโ๐ป
https://github.com/ahkohd/get-mac-apps
apps macos nodejs
Last synced: about 1 year ago
JSON representation
Get a list of installed apps or check if app is installed on a Mac. ๐๐จโ๐ป
- Host: GitHub
- URL: https://github.com/ahkohd/get-mac-apps
- Owner: ahkohd
- License: mit
- Created: 2020-05-02T11:32:42.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-01-28T20:18:28.000Z (over 2 years ago)
- Last Synced: 2025-04-06T04:58:19.577Z (about 1 year ago)
- Topics: apps, macos, nodejs
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/get-mac-apps
- Size: 14.6 KB
- Stars: 7
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# get-mac-apps
A Node.JS package that lists apps installed or check if app is installed on a Mac. ๐๐จโ๐ป
## ๐จโ๐ป Install
```bash
$ npm install get-mac-apps
```
## ๐ Usage
```js
let getWinApps = require("get-mac-apps");
// ๐ฆ Get the list of all installed apps...
getMacApps
.getApps()
.then(apps => console.log(apps))
.catch(error => console.log(error.message));
// ๐ Check if Terminal app is installed...
getMacApps
.isInstalled("Terminal")
.then(isInstalled => console.log(isInstalled))
.catch(error => console.log(error.message));
```
### โ
OUTPUT
```ts
getApps() -> Array<{ _name: String,
arch_kind: String<'arch_i64' | any>,
lastModified: Date,
obtained_from: String<'unknown' | 'identified_developer', 'apple'>,
path: String,
version: String }> | Error
isInstalled(appName: String) -> boolean | Error
```
## ๐ค How it works
Easy as pie! We use Node.JS to spawn a `system profiler` process to profile apps installed on the Mac. We parse the resulting `plist`.
---
Try the `installed apps profiler` command on your terminal:
```bash
/usr/sbin/system_profiler -xml -detailLevel mini SPApplicationsDataType
```
## ๐ Development
```bash
git clone https://github.com/ahkohd/get-mac-apps.git
cd get-mac-apps
// run an example
npm test
```
## ๐งพ License
[MIT](./LICENSE.md)