# open - OS 기본 앱을 마음대로 여는 크로스 플랫폼 실행기

> Clean Markdown view of GeekNews topic #24761. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=24761](https://news.hada.io/topic?id=24761)
- GeekNews Markdown: [https://news.hada.io/topic/24761.md](https://news.hada.io/topic/24761.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2025-12-02T09:31:01+09:00
- Updated: 2025-12-02T09:31:01+09:00
- Original source: [github.com/sindresorhus](https://github.com/sindresorhus/open)
- Points: 6
- Comments: 0

## Summary

**open**은 Node.js 환경에서 URL·파일·실행 파일을 **운영체제 기본 앱으로 여는** 기능을 단일 API로 제공합니다. macOS의 `open`, Windows의 `start`, Linux의 `xdg-open`을 내부적으로 호출해 플랫폼별 차이를 숨기며, `spawn` 기반으로 보안성과 안정성을 높였습니다. CLI 도구나 배포 스크립트에서 기본 브라우저나 뷰어를 호출해야 할 때 간결하게 통합할 수 있는 실용적 유틸리티입니다.

## Topic Body

- **CLI 도구**나 **스크립트**에서 URL, 파일, 실행 파일을 **OS 기본 앱으로 여는 기능**을 제공하는 NodeJS용 라이브러리  
- 기본 브라우저로 URL 열기, 이미지 보기 앱으로 파일 열기, 지정 앱(name + arguments)으로 열기 등 다양한 “open” 동작 지원  
  - 자식 프로세스에 대한 **`Promise`를 리턴**해서, 커스텀 이벤트 리스너를 붙이거나, 다른 동작 가능   
  - 내부적으로 macOS에서는 `open`, Windows에서는 `start`, 그 외 플랫폼에서는 [`xdg-open`](https://gitlab.freedesktop.org/xdg/xdg-utils/-/blob/master/scripts/xdg-open.in) 사용 — 플랫폼 간 동작 일관성 보장  
- 보안 취약점이 많았던 기존 `exec` 방식 대신 `spawn` 을 사용  
- 오리지널 `node-open`의 이슈들도 해결  
- **ESM 기반** 패키지로, CommonJS 환경이라면 dynamic import 필요함  
- 개발, 배포 스크립트나 CLI 툴 만들 때 “운영체제 기본 앱”을 호출해야 할 경우 유용  
- 이 모듈을 활용한 [Open-CLI](https://github.com/sindresorhus/open-cli)도 별도 제공

## Comments



_No public comments on this page._
