macos-launch-application
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

macos-launch-application

Launch or kill applications on macOS.

macOS 10.14.3 or earlier needs to download the Swift runtime support libraries. More Info Here.

Install

$ npm install macos-launch-application

Usage

const {launchApp, killApp} = require('macos-launch-application');
 
launchApp('com.sindresorhus.Dato');
 
killApp('com.sindresorhus.Dato');

API

launchApp(bundleId: string): Promise<true>

Tries to launch the app with the given bundle identifier. It will resolve to true if it succeeds, and reject with an error otherwise.

bundleId

The bundle identifier of the app

killApp(bundleId: string): Promise<true>

Tries to kill the app with the given bundle identifier. It will resolve to true if it succeeds, and reject with an error otherwise.

bundleId

The bundle identifier of the app

Related

  • mac-focus-window - Focus a window and bring it to the front on macOS
  • mac-windows - Provide Information about Application Windows running

License

MIT

Package Sidebar

Install

npm i macos-launch-application

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

60.4 kB

Total Files

6

Last publish

Collaborators

  • gkaragkiaouris