{
 "kind": "tool",
 "slug": "open",
 "path": "tools/open/",
 "name": "open",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Dev workflow and config",
   "tools/dev-workflow/"
  ]
 ],
 "lead": "Launch a link, file or app from Node.js.",
 "chips": [
  {
   "label": "Dev workflow and config",
   "path": "tools/dev-workflow/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install open"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/sindresorhus/open"
  },
  {
   "label": "Website",
   "href": "https://github.com/sindresorhus/open#readme"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software",
   "note": "Any use, including paid and closed-source tools.",
   "src": "https://github.com/sindresorhus/open/blob/main/license"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Sep 14, 2026",
   "note": "Latest GitHub release Sep 14, 2026. ",
   "src": "https://github.com/sindresorhus/open"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "31 projects",
   "status": "info",
   "sub": "#42 of 299 in its category",
   "note": "Dependency in 31 public GitHub projects set up for AI coding agents that we scanned (0.5%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Community skills",
   "status": "info",
   "sub": "1 skills by others",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 11, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What open does",
   "parts": [
    {
     "t": "prose",
     "text": "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."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Sign-in page from a terminal tool",
       "text": "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.",
       "idea": false
      },
      {
       "title": "Show a report the script just made",
       "text": "A script builds a PDF or a chart and opens it in the default viewer, then waits until the person closes the viewer.",
       "idea": false
      },
      {
       "title": "A chosen browser or private window",
       "text": "Open a test page in Chrome or Firefox, or in a private window, without writing different code for each system.",
       "idea": false
      },
      {
       "title": "Start a desktop app",
       "text": "A setup script opens an app such as an editor or a browser with extra options.",
       "idea": false
      },
      {
       "title": "Open the local site after start",
       "text": "Your dev script starts a local server and then opens its address in the browser, so the person sees the site right away.",
       "idea": true
      },
      {
       "title": "Open the folder with results",
       "text": "After an export finishes, the tool opens the output folder so the person finds the files at once.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "open popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "67",
       "of": "/ 100",
       "l": "Gid Score, #521 overall"
      },
      {
       "n": "238M",
       "l": "downloads a week, npm"
      },
      {
       "n": "3,523",
       "l": "GitHub stars"
      },
      {
       "n": "31",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How open is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "open is a dependency in 31 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (0.6% of the 4,867 JavaScript/TypeScript ones), #42 of 299 in dev workflow and config.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 121; those are left out of every share on this page.",
      "Projects that use it most often also use Express (54.8%), Marked (51.6%), Commander (45.2%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "25 projects, 0.8%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "14 projects, 0.5%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "11 projects, 2.3%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "6 projects, 0.2%",
       "v": "Cursor",
       "path": "agents/cursor/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 54.8% of its projects",
       "v": "Express",
       "path": "tools/express/"
      },
      {
       "l": "In 51.6% of its projects",
       "v": "Marked",
       "path": "tools/marked/"
      },
      {
       "l": "In 45.2% of its projects",
       "v": "Commander",
       "path": "tools/commander/"
      },
      {
       "l": "In 41.9% of its projects",
       "v": "uuid",
       "path": "tools/uuid/"
      },
      {
       "l": "In 48.4% of its projects",
       "v": "tsx",
       "path": "tools/tsx/"
      },
      {
       "l": "In 38.7% of its projects",
       "v": "cross-env",
       "path": "tools/cross-env/"
      },
      {
       "l": "In 38.7% of its projects",
       "v": "ora",
       "path": "tools/ora/"
      },
      {
       "l": "In 38.7% of its projects",
       "v": "undici",
       "path": "tools/undici/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about open",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/sindresorhus",
        "Open Collective: https://opencollective.com/sindresorhus",
        "Buy Me a Coffee: https://buymeacoffee.com/sindresorhus",
        "Own page: https://sindresorhus.com/donate",
        "186 GitHub sponsors"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        "open: Boot the session, load context from the vault, and surface what matters"
       ]
      },
      {
       "title": "More in Dev workflow and config",
       "path": "tools/dev-workflow/",
       "items": [
        {
         "text": "dotenv",
         "path": "tools/dotenv/"
        },
        {
         "text": "Husky",
         "path": "tools/husky/"
        },
        {
         "text": "python-dotenv",
         "path": "tools/python-dotenv/"
        },
        {
         "text": "lint-staged",
         "path": "tools/lint-staged/"
        },
        {
         "text": "concurrently",
         "path": "tools/concurrently/"
        },
        {
         "text": "Rich",
         "path": "tools/rich/"
        },
        {
         "text": "Pydantic Settings",
         "path": "tools/pydantic-settings/"
        },
        {
         "text": "cross-env",
         "path": "tools/cross-env/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "open",
       "me": true,
       "facts": [
        "MIT",
        "Gid 67",
        "238M/wk"
       ]
      },
      {
       "name": "open-cli",
       "why": "Pick open-cli when you want the same opening behaviour as a terminal command, without writing Node.js code.",
       "path": "tools/open-cli/",
       "facts": []
      },
      {
       "name": "chrome-launcher",
       "why": "Pick chrome-launcher when you need a Chrome window your code can control for automation, not just a page for a person to look at.",
       "path": "tools/chrome-launcher/",
       "facts": []
      },
      {
       "name": "execa",
       "why": "Pick execa when you need to run any program and read its output, not just open something in its default app.",
       "path": "tools/execa/",
       "facts": []
      }
     ],
     "more": "Compare open with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "In this Node.js command-line tool, use open@11.0.4 (ES module import, Node.js 20+) to open the sign-in link in the default browser; only pass links the tool built itself, never raw user input."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install it in your Node.js project (Node.js 20 or newer).",
       "code": "npm install open",
       "src": "https://github.com/sindresorhus/open/blob/main/readme.md"
      },
      {
       "text": "Import it as an ES module and call open() with a link, a file or an app.",
       "code": "import open, {openApp, apps} from 'open';\n\n// Opens the URL in the default browser.\nawait open('https://example.com');\n\n// Open an app.\nawait openApp('xcode');\n",
       "src": "https://github.com/sindresorhus/open/blob/main/readme.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "const open = require('open')",
       "fix": "import open from 'open', or const {default: open} = await import('open') in CommonJS",
       "why": "The package has no CommonJS export; require() fails with ERR_REQUIRE_ESM on older Node.js."
      },
      {
       "dont": "await open(req.query.url) or opening a file name a user sent",
       "fix": "Only open links and paths your code built itself; check the scheme is https and the file is one you created",
       "why": "The library passes the value on as is; untrusted input can start other programs."
      },
      {
       "dont": "{app: {name: 'google chrome'}} hard-coded in a shared tool",
       "fix": "{app: {name: apps.chrome}}",
       "why": "App names differ by system (google chrome, google-chrome, chrome); apps picks the right one."
      },
      {
       "dont": "await open(url, {wait: true}) to wait until the person closes the browser tab",
       "fix": "Do not use wait with browsers; on a Mac add newInstance true if you must wait",
       "why": "A running browser takes the link and the command ends at once."
      },
      {
       "dont": "Calling open() on a web server to show something to a site visitor",
       "fix": "Send the visitor a link or use window.open in their browser",
       "why": "open() starts a program on the machine where the code runs, which on a server is the server itself."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Does it work in a website?",
       "a": "No. It runs in Node.js on the person's own computer; in a browser page use a normal link or window.open.",
       "evidence": {
        "url": "https://github.com/sindresorhus/open/blob/main/readme.md",
        "quote": "This is meant to be used in command-line tools and scripts, not in the browser."
       }
      },
      {
       "q": "Why does wait not wait when I open a link?",
       "a": "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.",
       "evidence": {
        "url": "https://github.com/sindresorhus/open/blob/main/readme.md",
        "quote": "When opening URLs in browsers while the browser is already running, the wait option will not work as expected."
       }
      },
      {
       "q": "Can I use it with require()?",
       "a": "Not directly. It is an ES module only; use import, or the dynamic import() function from older code.",
       "evidence": {
        "url": "https://github.com/sindresorhus/open/blob/main/readme.md",
        "quote": "If your project uses CommonJS, you will have to convert to ESM or use the dynamic import() function."
       }
      },
      {
       "q": "Does it work in WSL on Windows?",
       "a": "Yes. It uses Windows through PowerShell when it can and falls back to the Linux opener.",
       "evidence": {
        "url": "https://github.com/sindresorhus/open/blob/main/readme.md",
        "quote": "The package automatically uses Windows integration (PowerShell) when available, and falls back to xdg-open if PowerShell is inaccessible (e.g., sandboxed environments)."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm open"
  ],
  [
   "Category",
   "Dev workflow and config"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "67.4"
  ],
  [
   "Rank in category",
   "#42 of 299"
  ],
  [
   "GitHub",
   "sindresorhus/open"
  ],
  [
   "Last change",
   "Sep 14, 2026"
  ]
 ],
 "good": [
  "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."
 ],
 "checked_line": "Read by AgentGid from 6 official pages, card checked Nov 11, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/sindresorhus.png"
}