locate-app
Find apps installed on your system. This util will help to find executables of a known app like Chrome, Firefox,... on Windows, Linux, and macOS out of the box.
Last updated 3 months ago by hejny .
SEE LICENSE IN LICENSE · Repository · Bugs · Original npm · Tarball · package.json
$ npm install locate-app 
SYNC missed versions from official npm registry.

🕵️ Locate ANY APP

License of Locate ANY APP NPM Version of Locate ANY APP Quality of package Locate ANY APP Known Vulnerabilities Issues Socket

Find apps installed on your system. This util will help to find executables of a known app like Chrome, Firefox,... on Windows, Linux, and macOS out of the box.

Wallpaper of 🕵️ Locate ANY APP

Social media wallpaper for Locate app project

🔎 Locating the Firefox

Via this utility it is extremely easy to get the path to some browser:

import { locateChrome } from 'locate-app';

const executablePathOfFirefox = await locateFirefox();

Then you can use executablePathOfFirefox to open (spawn) the browser:

import { locateChrome } from 'locate-app';
import { spawn } from 'child_process';

spawn(await locateFirefox(), ['https://github.com/hejny/locate-app']);

Locate app will ensure that file is executable. If it can not find the browser it will throw an error. Or you can use the path to the browser as you want:

🔍 Locating the Chrome

import { locateChrome } from 'locate-app';

const executablePathOfChrome = await locateChrome();
import { locateChrome } from 'locate-app';
import { spawn } from 'child_process';

spawn(await locateChrome(), ['https://github.com/hejny/locate-app']);

Locate app will ensure that file is executable. If it can not find the browser it will throw an error. Or you can use the path to the browser as you want:

import { locateChrome } from 'locate-app';
import puppeteer from 'puppeteer-core';

await puppeteer.launch({ executablePath: await locateChrome() });

🔎 Locating arbitrary browser

You can use functions locateChrome, locateEdge, locateFirefox, locateInternetExplorer, locateSafari or universal locateBrowser which recieves param which browser to locate:

import { locateBrowser } from 'locate-app';

const executablePathOfSafari = await locateBrowser('safari');
const executablePathOfEdge = await locateBrowser('edge');

👨‍💻 Locating VSCode

import { locateChrome } from 'locate-app';
import { spawn } from 'child_process';

spawn(await locateVSCode(), ['~/work/my-awesome-project']);

🔍 Locating arbitrary app

You can locate any app very easily. You need to provide breadcrumbs for each platform. If you omit some platform it does not matter but there will be an error in runtime if you try to run it on the omitted os.

import { locateApp } from 'locate-app';

await locateApp({
    appName: 'Chrome',
    linuxWhich: 'google-chrome',
    windowsSuffix: '\\Google\\Chrome\\Application\\chrome.exe',
    macOsName: 'Google Chrome',
});

📖 Documentation

The project is fully typed so you probably do not need the documentation. But if so, here it is https://hejny.github.io/locate-app/index.html

⌚ Changelog

See CHANGELOG.md

🖋️ Contributing

I am open to pull requests, feedback, and suggestions. Or if you like this utility, you can ☕ buy me a coffee or donate via cryptocurrencies.

You can also ⭐ star the locate-app package, follow me on GitHub or various other social networks.

✨ Partners

Collboard       WebGPT       Promptbook

Become a partner

Current Tags

  • 2.4.43                                ...           latest (2 months ago)

83 Versions

  • 2.4.43                                ...           2 months ago
  • 2.4.41                                ...           2 months ago
  • 2.4.40                                ...           2 months ago
  • 2.4.39                                ...           2 months ago
  • 2.4.38                                ...           2 months ago
  • 2.4.37                                ...           2 months ago
  • 2.4.36                                ...           2 months ago
  • 2.4.35                                ...           2 months ago
  • 2.4.34                                ...           2 months ago
  • 2.4.33                                ...           3 months ago
  • 2.4.32                                ...           3 months ago
  • 2.4.31                                ...           3 months ago
  • 2.4.30                                ...           3 months ago
  • 2.4.29                                ...           3 months ago
  • 2.4.28                                ...           3 months ago
  • 2.4.27                                ...           3 months ago
  • 2.4.26                                ...           3 months ago
  • 2.4.25                                ...           3 months ago
  • 2.4.24                                ...           3 months ago
  • 2.4.23                                ...           3 months ago
  • 2.4.22                                ...           3 months ago
  • 2.4.21                                ...           5 months ago
  • 2.4.20                                ...           5 months ago
  • 2.4.19                                ...           5 months ago
  • 2.4.18                                ...           5 months ago
  • 2.4.17                                ...           5 months ago
  • 2.4.16                                ...           5 months ago
  • 2.4.15                                ...           6 months ago
  • 2.4.14                                ...           6 months ago
  • 2.4.13                                ...           6 months ago
  • 2.4.12                                ...           6 months ago
  • 2.4.11                                ...           7 months ago
  • 2.4.10                                ...           7 months ago
  • 2.4.9                                ...           7 months ago
  • 2.4.8                                ...           7 months ago
  • 2.4.7                                ...           7 months ago
  • 2.4.6                                ...           7 months ago
  • 2.4.5                                ...           7 months ago
  • 2.4.4                                ...           7 months ago
  • 2.4.3                                ...           7 months ago
  • 2.4.2                                ...           7 months ago
  • 2.4.1                                ...           7 months ago
  • 2.4.0                                ...           7 months ago
  • 2.3.0                                ...           7 months ago
  • 2.2.30                                ...           7 months ago
  • 2.2.29                                ...           7 months ago
  • 2.2.28                                ...           7 months ago
  • 2.2.27                                ...           8 months ago
  • 2.2.26                                ...           8 months ago
  • 2.2.25                                ...           8 months ago
  • 2.2.24                                ...           8 months ago
  • 2.2.23                                ...           8 months ago
  • 2.2.22                                ...           8 months ago
  • 2.2.21                                ...           8 months ago
  • 2.2.20                                ...           9 months ago
  • 2.2.19                                ...           9 months ago
  • 2.2.18                                ...           9 months ago
  • 2.2.17                                ...           9 months ago
  • 2.2.16                                ...           9 months ago
  • 2.2.15                                ...           10 months ago
  • 2.2.14                                ...           10 months ago
  • 2.2.13                                ...           10 months ago
  • 2.2.12                                ...           10 months ago
  • 2.2.11                                ...           10 months ago
  • 2.2.10                                ...           10 months ago
  • 2.2.9                                ...           10 months ago
  • 2.2.8                                ...           10 months ago
  • 2.2.7                                ...           10 months ago
  • 2.2.6                                ...           10 months ago
  • 2.2.5                                ...           10 months ago
  • 2.2.4                                ...           10 months ago
  • 2.2.3                                ...           10 months ago
  • 2.2.2                                ...           10 months ago
  • 2.2.1                                ...           a year ago
  • 2.2.0                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           2 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (9)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE