floorp-location
v1.0.0
Published
Approximates the current location of the Floorp browser across platforms.
Maintainers
Readme
Approximates the current location of the Floorp browser across platforms.
floorp-location

- By default checks only
stable. - Supports macOS / Windows / Linux
- Works both as an ES module or CommonJS
Installation
npm i floorp-locationSupport table
This table lists the default locations where Floorp is typically installed for each supported platform and channel. By default, only the Stable channel is checked.
Returns the first existing path found (given selected channels), or null if none are found.
Usage
Via Node.js (strict by default):
import floorpLocation from 'floorp-location'
import {
locateFloorpOrExplain,
getInstallGuidance,
getFloorpVersion
} from 'floorp-location'
// Strict (Stable only)
console.log(floorpLocation())
// => "/Applications/Floorp.app/Contents/MacOS/Floorp" or null
// Throw with an install guide when not found
try {
const bin = locateFloorpOrExplain({allowFallback: true})
console.log(bin)
// Cross-platform version (no exec by default)
console.log(getFloorpVersion(bin)) // e.g. "128.0" or null
// Opt-in: allow executing the binary (Linux/other)
console.log(getFloorpVersion(bin, {allowExec: true}))
} catch (e) {
console.error(String(e))
// Or print getInstallGuidance() explicitly
}CommonJS:
const api = require('floorp-location')
const locateFloorp = api.default || apiVia CLI:
npx floorp-location
# Respect environment overrides
FLOORP_BINARY=/custom/path/to/floorp npx floorp-location
# Print browser version (empty + exit code 2 if unavailable)
npx floorp-location --floorp-version
npx floorp-location --browser-version
# Opt-in: allow executing the binary to fetch version
npx floorp-location --browser-version --allow-execEnvironment overrides
If this environment variable is set and points to an existing binary, it takes precedence:
FLOORP_BINARY
API
default export locateFloorp(allowFallback?: boolean): string | nulllocateFloorpOrExplain(options?: boolean | { allowFallback?: boolean }): stringgetFloorpVersion(bin: string, opts?: { allowExec?: boolean }): string | nullgetInstallGuidance(): string
Related projects
- brave-location
- chrome-location2
- chromium-location
- edge-location
- firefox-location2
- safari-location2
- opera-location2
- vivaldi-location2
- waterfox-location
- yandex-location
License
MIT (c) Cezar Augusto.
