@lemonaid-dev/open
v0.1.2
Published
Open URLs and files with the platform default application
Maintainers
Readme
@lemonaid-dev/open
Open URLs and files with the platform default application.
The GitLab repository is private. The npm package is public.
Install
bun install -g @lemonaid-dev/openUsage
open https://example.com
open README.md package.json
open -- -filename-starting-with-a-dash
open --helpEach target is opened in order. The command stops and returns the backend's status when a target cannot be opened.
Supported platforms
- macOS:
/usr/bin/open - Linux:
xdg-open, falling back togio open - WSL:
wslview, falling back to the Linux backends - Windows:
explorer.exe
Programmatic API
import { openTargets } from "@lemonaid-dev/open";
const status = await openTargets(["https://example.com"]);resolveOpenBackend and dependency injection points are exported for callers
and tests that need deterministic backend selection.
Requirements
- Bun
Releasing
Releases are published by GitLab CI from protected vX.Y.Z tags through npm
Trusted Publishing. No npm publishing token belongs in GitLab.
