# open — card for AI agents

Cross-platform utility to open URLs, files and applications.

Category: Dev workflow and config · npm package `open` · latest version 11.0.4 (checked 2026-11-01)
Install: `npm install open`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Agent Skills for it
- open from davepoon/buildwithclaude: `npx skills add davepoon/buildwithclaude --skill open`

## Numbers (AgentGid data)
- Gid Score: 67.4 (#521 of all tools, 39 of 299 in its category)
- Used in 31 public projects set up for AI coding agents (0.5%)
- Downloads last week: 238,498,170 (as of 2026-11-24), +45.3% over 4 weeks
- GitHub stars: 3,523 (as of 2026-11-24)
- Last push: 2026-09-14

## Often used with
Express 54.8%, Marked 51.6%, Commander 45.2%, uuid 41.9%, tsx 48.4%, cross-env 38.7%

## Links
- AgentGid page: https://agentgid.com/tools/open/
- Homepage: https://github.com/sindresorhus/open#readme
- Repository: https://github.com/sindresorhus/open


## open: launch a link, file or app from Node.js

open is a small free Node.js library that opens a web link in the default browser, a file in its usual program, or an app. It works the same on Mac, Windows and Linux. It is made for command-line tools and scripts on your own computer, not for websites or servers.

### Where to use it
- Sign-in page from a terminal tool: Your command-line tool needs the person to log in; it opens the sign-in page in their usual browser instead of asking them to copy a link.
- Show a report the script just made: A script builds a PDF or a chart and opens it in the default viewer, then waits until the person closes the viewer.
- A chosen browser or private window: Open a test page in Chrome or Firefox, or in a private window, without writing different code for each system.
- Start a desktop app: A setup script opens an app such as an editor or a browser with extra options.
- Open the local site after start: Your dev script starts a local server and then opens its address in the browser, so the person sees the site right away. (idea, not from the official pages)
- Open the folder with results: After an export finishes, the tool opens the output folder so the person finds the files at once. (idea, not from the official pages)

### How to start
- Install it in your Node.js project (Node.js 20 or newer).

```
npm install open
```

- Import it as an ES module and call open() with a link, a file or an app.

```
import open, {openApp, apps} from 'open';

// Opens the URL in the default browser.
await open('https://example.com');

// Open an app.
await openApp('xcode');
```


### License
Free to use, also in paid and closed-source products, under the MIT license. Keep the copyright and license notice with copies you ship.

### Good to know
- It needs Node.js 20 or newer since version 11.
- It only works with import, not with require(); older code must switch or load it with import().
- It does not check what you pass in. Opening a file or link a stranger sent can start programs on the computer.
- Inside an Electron desktop app, use Electron's own shell.openPath() instead.
- The project is maintained; 11.0.4 came out on 14 September 2026 and fixed default browser detection for Safari and Brave.

Checked 2026-11-11 against: https://github.com/sindresorhus/open/blob/main/readme.md, https://github.com/sindresorhus/open/blob/main/license, https://github.com/sindresorhus/open/releases/tag/v11.0.0, https://github.com/sindresorhus/open/releases/tag/v11.0.4, https://registry.npmjs.org/open/11.0.4, https://registry.npmjs.org/open

### Mistakes to avoid
- Don't: const open = require('open') → Do: import open from 'open', or const {default: open} = await import('open') in CommonJS (The package has no CommonJS export; require() fails with ERR_REQUIRE_ESM on older Node.js.)
- Don't: await open(req.query.url) or opening a file name a user sent → Do: Only open links and paths your code built itself; check the scheme is https and the file is one you created (The library passes the value on as is; untrusted input can start other programs.)
- Don't: {app: {name: 'google chrome'}} hard-coded in a shared tool → Do: {app: {name: apps.chrome}} (App names differ by system (google chrome, google-chrome, chrome); apps picks the right one.)
- Don't: await open(url, {wait: true}) to wait until the person closes the browser tab → Do: Do not use wait with browsers; on a Mac add newInstance true if you must wait (A running browser takes the link and the command ends at once.)
- Don't: Calling open() on a web server to show something to a site visitor → Do: Send the visitor a link or use window.open in their browser (open() starts a program on the machine where the code runs, which on a server is the server itself.)

### Questions
- Does it work in a website? No. It runs in Node.js on the person's own computer; in a browser page use a normal link or window.open.
- Why does wait not wait when I open a link? When the browser is already running, the link is handed to it and the command ends at once. On a Mac, newInstance forces a new browser.
- Can I use it with require()? Not directly. It is an ES module only; use import, or the dynamic import() function from older code.
- Does it work in WSL on Windows? Yes. It uses Windows through PowerShell when it can and falls back to the Linux opener.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
