GitShow/sindresorhus/open
sindresorhus

open

Open stuff like URLs, files, executables. Cross-platform.

by sindresorhus
Star on GitHubForknpm

JavaScript

3.5k stars257 forks57 contributorsActive · 1w agoSince 2014v11.0.1MIT

Meet the team

See all 57 on GitHub →
sindresorhus
sindresorhus150 contributions
Richienb
Richienb8 contributions
watson
watson4 contributions
kuzalekon
kuzalekon3 contributions
Kudo
Kudo3 contributions
alan-agius4
alan-agius42 contributions
pluma
pluma2 contributions
arthurvr
arthurvr2 contributions

Languages

View on GitHub →
JavaScript97.7%
TypeScript2.3%

Commit activity

Last 12 weeks · 3 commits

Full graph →

Community health

4 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template

Recent PRs & issues

Active · 1 in progress · Last activity 1w ago
See all on GitHub →
chuanghiduoc
fix: use own-property check for default browser id lookupOpenPR

also matches keys. A default browser whose id collides with a prototype key passed the check, resolved to an inherited function through , and produced — launching a bogus app instead of failing with " is not supported as a default browser". On Windows the id comes from the registry ( reads the user-writable ProgId), so an id like or is reachable in practice. Before Fix Use and throw the existing unsupported-browser error for any id that does not map to a known browser. Test locks the own-property semantics the fix relies on.

chuanghiduoc · 23h ago
alljinx
Can't open a local file anymore in v11OpenIssue

Hi, I've been using this library successfully for quite some time to open a local file (the "index.html" file containing a Jest coverage report). Unfortunately, since the update to v11, it no longer works. Is this a breaking change (I haven't been able to find the changelog)? Or is it a bug? I am on Windows 10. Thanks.

alljinx · 7mo ago

Recent fixes

View closed PRs →
yGuy
`open()` fails under WSL when CWD is not accessible to distro default userClosedIssue

Description On WSL/Ubuntu, can fail depending on the current working directory. This happens when running as a non-default WSL user whose CWD is not traversable by the distro's default user. Reproduction If is not traversable by the distro's default user, the URL does not open. Making the directory traversable immediately fixes it: Likely cause Under WSL, launches Windows PowerShell. The spawned Windows process inherits Node's Linux CWD. That CWD is exposed to Windows as something like: Windows access to the WSL filesystem uses the distro's default Linux user. If that user cannot traverse the CWD, the spawned PowerShell process appears to fail before opening the URL. ' PowerShell availability check succeeds because it only checks whether is executable; it does not verify that PowerShell can actually start from the current WSL CWD. Expected behavior Opening an HTTP(S) URL should not depend on whether the Windows-side process can access the caller's Linux CWD. Potential fix: when spawning PowerShell from WSL, use a known Windows-accessible instead of inheriting the current Linux directory. should work, or should also work, in my tests I could also go to (if that is available) and it worked - it doesn't do anything with the directory, AFAICT, so this shouldn't really matter?

yGuy · 1w ago
puneetdixit200
Detach non-wait PowerShell launchesMergedPR

Summary: detach non-wait PowerShell launches after stdio is ignored so Windows targets can keep opening after the parent process exits add an AVA regression test that loads the module with mocked to and verifies the spawn options Tests: Fixes #367

puneetdixit200 · 3mo ago
txtsd
Allow xdg-open alternativesClosedIssue

Please offer a way to use handlr as an alternative to xdg-open.

txtsd · 4mo ago
Structured data for AI agents

Repository: sindresorhus/open. Description: Open stuff like URLs, files, executables. Cross-platform. Stars: 3497, Forks: 257. Primary language: JavaScript. Languages: JavaScript (97.7%), TypeScript (2.3%). License: MIT. Latest release: v11.0.1 (1w ago). Open PRs: 1, open issues: 2. Last activity: 1w ago. Community health: 85%. Top contributors: sindresorhus, Richienb, watson, kuzalekon, Kudo, alan-agius4, pluma, arthurvr, reneleonhardt, tim-stasse and others.

·@ofershap

Replace github.com with gitshow.dev