# app-path

> Get the path to an app (macOS)

Latest version **4.0.0** (published 2021-05-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install app-path
pnpm add app-path
yarn add app-path
bun add app-path
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-05-03 |
| First published | 2015-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | >=12 |
| Dependencies | 1 |
| Unpacked size | 118.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 63 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | macos, applescript, app, application, path, directory, bundle, location |

## Links

- npm: https://www.npmjs.com/package/app-path
- Repository: https://github.com/sindresorhus/app-path
- Homepage: https://github.com/sindresorhus/app-path#readme
- Issues: https://github.com/sindresorhus/app-path/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/app-path

## Dependencies (1)

- [execa](https://npm.io/package/execa.md) ^5.0.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-05-03
- 3.3.0 — 2021-04-29
- 3.2.0 — 2019-03-31
- 3.1.0 — 2019-03-20
- 3.0.0 — 2018-12-01
- 2.2.0 — 2016-06-14
- 2.1.0 — 2016-03-17
- 2.0.0 — 2016-03-08
- 1.0.2 — 2015-05-19
- 1.0.1 — 2015-05-18
- 1.0.0 — 2015-05-18

## README

# app-path

> Get the path to an app *(macOS)*

## Install

```
$ npm install app-path
```

## Usage

```js
import appPath from 'app-path';

console.log(await appPath('Safari'));
//=> '/Applications/Safari.app'

console.log(await appPath('com.apple.Safari'));
//=> '/Applications/Safari.app'

console.log(appPath.sync('Safari'));
//=> '/Applications/Safari.app'
```

## API

### appPath(appName)

Returns a `Promise<string>` with the path to the app specified in `appName`. Rejects when run on any other operating system than macOS.

### appPath.sync(appName)

Returns the path to the app specified in `appName`. Throws when run on any other operating system than macOS.

#### appName

Type: `string`

An app name or bundle identifier.

## Related

- [app-path-cli](https://github.com/sindresorhus/app-path-cli) - CLI for this module

---
_Source: https://npm.io/package/app-path · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
