{"id":14978544,"url":"https://github.com/davidcann/node-mac-detect-browsers","last_synced_at":"2026-02-14T05:03:18.513Z","repository":{"id":197641586,"uuid":"699075368","full_name":"davidcann/node-mac-detect-browsers","owner":"davidcann","description":"Detect web browsers on macOS from Node.js or Electron via a native module","archived":false,"fork":false,"pushed_at":"2025-02-23T12:32:14.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T12:41:20.218Z","etag":null,"topics":["browser","electron","electronjs","macos","node","nodejs"],"latest_commit_sha":null,"homepage":"","language":"Objective-C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidcann.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,"governance":null}},"created_at":"2023-10-01T20:53:54.000Z","updated_at":"2025-02-23T12:32:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1b68e9f-7de7-44bb-b02b-d732361cf120","html_url":"https://github.com/davidcann/node-mac-detect-browsers","commit_stats":null,"previous_names":["davidcann/node-mac-detect-browsers"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Fnode-mac-detect-browsers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Fnode-mac-detect-browsers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Fnode-mac-detect-browsers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidcann%2Fnode-mac-detect-browsers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidcann","download_url":"https://codeload.github.com/davidcann/node-mac-detect-browsers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240636642,"owners_count":19832922,"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":["browser","electron","electronjs","macos","node","nodejs"],"created_at":"2024-09-24T13:57:52.882Z","updated_at":"2026-02-14T05:03:13.494Z","avatar_url":"https://github.com/davidcann.png","language":"Objective-C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-mac-detect-browsers\n\n\u003e Detect web browsers on macOS from Node.js or Electron via a native module\n\n## Installing\n\n    npm install node-mac-detect-browsers\n\n## API\n\n**detect([callback])** (macOS only)\n\n- `callback` Receives an `error`, if any, and an array of `results` sorted by the `name` property.\n\nEach `result` is an object with the following properties:\n\n- `name` string\n- `path` string – absolute path to executable\n- `default` bool (optional) – indicates the default application\n\nNote: an error occurs if no browsers were found.\n\n## Usage\n\nIn main process:\n\n    const { detect } = require(\"node-mac-detect-browsers\");\n    detect((err, results) =\u003e {\n    \tif (err) {\n    \t\tconsole.error(err);\n    \t}\n    \tconsole.log(results);\n    });\n\nor async:\n\n    (async () =\u003e {\n    \ttry {\n    \t\tconst browsers = await detect();\n    \t\tconsole.log(browsers);\n    \t} catch (err) {\n    \t\tconsole.error(err);\n    \t}\n    })();\n\nExample output:\n\n    [\n    \t{\n    \t\t\"name\": \"Arc\",\n    \t\t\"path\": \"/Applications/Arc.app\"\n    \t},\n    \t{\n    \t\t\"name\": \"Brave Browser\",\n    \t\t\"path\": \"/Applications/Brave Browser.app\"\n    \t},\n    \t{\n    \t\t\"name\": \"Chromium\",\n    \t\t\"path\": \"/Applications/Chromium.app\"\n    \t},\n    \t{\n    \t\t\"name\": \"Firefox\",\n    \t\t\"path\": \"/Applications/Firefox.app\"\n    \t},\n    \t{\n    \t\t\"name\": \"Google Chrome\",\n    \t\t\"path\": \"/Applications/Google Chrome.app\"\n    \t},\n    \t{\n    \t\t\"default\": true,\n    \t\t\"name\": \"Safari\",\n    \t\t\"path\": \"/System/Volumes/Preboot/Cryptexes/App/System/Applications/Safari.app\"\n    \t},\n    \t{\n    \t\t\"name\": \"Tor Browser\",\n    \t\t\"path\": \"/Applications/Tor Browser.app\"\n    \t}\n    ]\n\n## License\n\nMIT License\n\n## Acknowledgements\n\n- [RSWeb](https://github.com/Ranchero-Software/RSWeb), part of NetNewsWire\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcann%2Fnode-mac-detect-browsers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidcann%2Fnode-mac-detect-browsers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidcann%2Fnode-mac-detect-browsers/lists"}