{"id":17472785,"url":"https://github.com/shinnn/frontmost-app","last_synced_at":"2025-06-25T13:33:46.108Z","repository":{"id":57242063,"uuid":"145348352","full_name":"shinnn/frontmost-app","owner":"shinnn","description":"Get information of the frontmost app – the app that receives key events","archived":false,"fork":false,"pushed_at":"2019-03-22T23:08:31.000Z","size":47,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-04T04:12:01.135Z","etag":null,"topics":["application","javascript","macos","nodejs","objective-c","workspace"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinnn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-08-20T00:43:05.000Z","updated_at":"2023-02-16T13:59:30.000Z","dependencies_parsed_at":"2022-09-04T20:13:18.711Z","dependency_job_id":null,"html_url":"https://github.com/shinnn/frontmost-app","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/shinnn/frontmost-app","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffrontmost-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffrontmost-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffrontmost-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffrontmost-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinnn","download_url":"https://codeload.github.com/shinnn/frontmost-app/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinnn%2Ffrontmost-app/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261883219,"owners_count":23224455,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["application","javascript","macos","nodejs","objective-c","workspace"],"created_at":"2024-10-18T17:36:28.382Z","updated_at":"2025-06-25T13:33:46.082Z","avatar_url":"https://github.com/shinnn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# frontmost-app\n\n[![npm version](https://img.shields.io/npm/v/frontmost-app.svg)](https://www.npmjs.com/package/frontmost-app)\n[![Build Status](https://travis-ci.com/shinnn/frontmost-app.svg?branch=master)](https://travis-ci.com/shinnn/frontmost-app)\n[![Coverage Status](https://img.shields.io/coveralls/shinnn/frontmost-app.svg)](https://coveralls.io/github/shinnn/frontmost-app?branch=master)\n\nGet information of the frontmost app – the app that receives key events\n\n```javascript\nconst frontmostApp = require('frontmost-app');\n\n(async () =\u003e {\n  await frontmostApp(); /*=\u003e {\n    localizedName: 'Safari',\n    bundleId: 'com.apple.Safari',\n    bundlePath: '/Applications/Safari.app',\n    executablePath: '/Applications/Safari.app/Contents/MacOS/Safari',\n    isLaunched: true,\n    pid: 30096\n  } */\n})();\n```\n\n*This module only supports macOS.*\n\n## Installation\n\n[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/getting-started/what-is-npm).\n\n```\nnpm install frontmost-app\n```\n\n## API\n\n```javascript\nconst frontmostApp = require('frontmost-app');\n```\n\n### frontmostApp()\n\nReturn: `Promise\u003cObject\u003e`\n\nThe resultant object has the following properties:\n\n#### localizedName\n\nType: `string`\n\nThe localized name of the frontmost application.\n\n#### bundleId\n\nType: `string`\n\nThe bundle identifier of the frontmost application.\n\n#### bundlePath\n\nType: `string`\n\nThe path to the frontmost application's bundle.\n\n#### executablePath\n\nType: `string`\n\nThe path to the frontmost application's executable.\n\n#### isLaunched\n\nType: `boolean`\n\nWhether the frontmost application has finished launching.\n\n#### pid\n\nType: `integer`\n\nThe process identifier of the frontmost application.\n\n## License\n\n[ISC License](./LICENSE) © 2018 Shinnosuke Watanabe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Ffrontmost-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinnn%2Ffrontmost-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinnn%2Ffrontmost-app/lists"}