Launch and terminate apps on macOS
If you're on macOS 10.14.3 or earlier, you need to download the Swift runtime support libraries.
$ npm install macos-manage-apps
const {launchApp, terminateApp} = require('macos-manage-apps');
(async () => {
await launchApp('com.sindresorhus.Dato');
await terminateApp('com.sindresorhus.Dato');
})();
Tries to launch the app with the given bundle identifier. It will resolve if it succeeds, and reject with an error otherwise.
The bundle identifier of the app.
Tries to terminate the app with the given bundle identifier. It will resolve if it succeeds, and reject with an error otherwise.
The bundle identifier of the app.
Check whether the app with the given bundle identifier is running. It will resolve with true if it's running and false otherwise.
The bundle identifier of the app.
- mac-focus-window - Focus a window and bring it to the front on macOS
- mac-windows - Provide Information about Application Windows running
MIT