{"id":50714617,"url":"https://github.com/vitejs/launch-editor","last_synced_at":"2026-06-14T22:01:12.579Z","repository":{"id":28156642,"uuid":"116504780","full_name":"vitejs/launch-editor","owner":"vitejs","description":"Open file in editor from Node.js.","archived":false,"fork":false,"pushed_at":"2026-06-08T16:51:20.000Z","size":286,"stargazers_count":715,"open_issues_count":23,"forks_count":92,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-06-12T05:02:24.163Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vitejs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"vitejs","open_collective":"vite"}},"created_at":"2018-01-06T18:08:42.000Z","updated_at":"2026-06-09T14:01:56.000Z","dependencies_parsed_at":"2024-05-31T13:06:17.031Z","dependency_job_id":"dedad7d2-50af-4f11-9b4c-8238597ee137","html_url":"https://github.com/vitejs/launch-editor","commit_stats":{"total_commits":35,"total_committers":11,"mean_commits":"3.1818181818181817","dds":0.5714285714285714,"last_synced_commit":"931700829d330cb95d173db1230d9ee2cb7c56ad"},"previous_names":["vitejs/launch-editor"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/vitejs/launch-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Flaunch-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Flaunch-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Flaunch-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Flaunch-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitejs","download_url":"https://codeload.github.com/vitejs/launch-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitejs%2Flaunch-editor/sbom","scorecard":{"id":1238664,"data":{"date":"2025-09-01","repo":{"name":"github.com/yyx990803/launch-editor","commit":"0de38964058db8c8f89babc12ed463586390358e"},"scorecard":{"version":"v5.2.1-41-g40576783","commit":"40576783fda6698350fcbbeaea760ff827433034"},"score":4.5,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":4,"reason":"Found 14/30 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#code-review"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#pinned-dependencies"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#packaging"}},{"name":"Maintained","score":8,"reason":"8 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/40576783fda6698350fcbbeaea760ff827433034/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-10-08T21:24:24.362Z","repository_id":28156642,"created_at":"2025-10-08T21:24:24.362Z","updated_at":"2025-10-08T21:24:24.362Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34339195,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-09T18:00:32.673Z","updated_at":"2026-06-14T22:01:12.569Z","avatar_url":"https://github.com/vitejs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/vitejs","https://opencollective.com/vite"],"categories":["JavaScript"],"sub_categories":[],"readme":"# launch-editor\n\nOpen file with line numbers in editor from Node.js.\n\nThe main functionality is extracted from [react-dev-utils](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-dev-utils/launchEditor.js) with slight modifications so that it can be used as a standalone package. The original source code is licensed under MIT.\n\nAlso added column number support.\n\n## Why\n\nThere are also a few other existing packages with the same purpose:\n\n- [lahmatiy/open-in-editor](https://github.com/lahmatiy/open-in-editor)\n- [sindresorhus/open-editor](https://github.com/sindresorhus/open-editor)\n\nHowever, both expects env variables like `EDITOR` to be set in order to open files. This package infers the editor to open by checking current running processes before falling back to env variables.\n\nOn the other hand,`react-dev-utils` includes many other utilities and dependencies and is thus not suitable for standalone usage.\n\n## Usage\n\n```js\nconst launch = require('launch-editor')\n\nlaunch(\n  // filename:line:column\n  // both line and column are optional\n  // `file://` URIs are also supported\n  'foo.js:12:34',\n  // try specific editor bin first (optional)\n  'code',\n  // callback if failed to launch (optional)\n  (fileName, errorMsg) =\u003e {\n    // log error if any\n  },\n)\n```\n\n### Middleware\n\nAn express/connect/webpack-dev-server compatible middleware is also available:\n\n```js\nconst launchMiddleware = require('launch-editor-middleware')\n\napp.use('/__open-in-editor', launchMiddleware())\n```\n\nThe middleware factory function accepts the following arguments (all optional, the callback can be in any position as long as it's the last argument):\n\n1. A specific editor bin to try first. Defaults to inferring from running processes, then fallback to env variables like `EDITOR` and `VISUAL`.\n2. The root directory of source files, in case the file path is relative. Defaults to `process.cwd()`.\n3. a callback when it fails to launch the editor.\n\nTo launch files, send requests to the server like the following:\n\n```text\n/__open-in-editor?file=src/main.js:13:24\n```\n\n### Supported editors\n\n| Value           | Editor                                                                 | Linux | Windows | macOS |\n| --------------- | ---------------------------------------------------------------------- | :---: | :-----: | :---: |\n| `appcode`       | [AppCode](https://www.jetbrains.com/objc/)                             |       |         |   ✓   |\n| `atom`          | [Atom](https://atom.io/)                                               |   ✓   |    ✓    |   ✓   |\n| `atom-beta`     | [Atom Beta](https://atom.io/beta)                                      |       |         |   ✓   |\n| `brackets`      | [Brackets](http://brackets.io/)                                        |   ✓   |    ✓    |   ✓   |\n| `clion`         | [Clion](https://www.jetbrains.com/clion/)                              |       |    ✓    |   ✓   |\n| `code`          | [Visual Studio Code](https://code.visualstudio.com/)                   |   ✓   |    ✓    |   ✓   |\n| `code-insiders` | [Visual Studio Code Insiders](https://code.visualstudio.com/insiders/) |   ✓   |    ✓    |   ✓   |\n| `codium`        | [VSCodium](https://github.com/VSCodium/vscodium)                       |   ✓   |    ✓    |   ✓   |\n| `cursor`        | [Cursor](https://www.cursor.com/)                                      |   ✓   |    ✓    |   ✓   |\n| `emacs`         | [Emacs](https://www.gnu.org/software/emacs/)                           |   ✓   |         |       |\n| `idea`          | [IDEA](https://www.jetbrains.com/idea/)                                |   ✓   |    ✓    |   ✓   |\n| `notepad++`     | [Notepad++](https://notepad-plus-plus.org/download/v7.5.4.html)        |       |    ✓    |       |\n| `pycharm`       | [PyCharm](https://www.jetbrains.com/pycharm/)                          |   ✓   |    ✓    |   ✓   |\n| `phpstorm`      | [PhpStorm](https://www.jetbrains.com/phpstorm/)                        |   ✓   |    ✓    |   ✓   |\n| `rider`         | [Rider](https://www.jetbrains.com/rider/)                              |   ✓   |    ✓    |   ✓   |\n| `rubymine`      | [RubyMine](https://www.jetbrains.com/ruby/)                            |   ✓   |    ✓    |   ✓   |\n| `sublime`       | [Sublime Text](https://www.sublimetext.com/)                           |   ✓   |    ✓    |   ✓   |\n| `vim`           | [Vim](http://www.vim.org/)                                             |   ✓   |         |       |\n| `visualstudio`  | [Visual Studio](https://www.visualstudio.com/vs/)                      |       |         |   ✓   |\n| `webstorm`      | [WebStorm](https://www.jetbrains.com/webstorm/)                        |   ✓   |    ✓    |   ✓   |\n| `zed`           | [Zed](https://zed.dev/)                                                |   ✓   |    ✓    |   ✓   |\n\n### Custom editor support\n\nYou can use the `LAUNCH_EDITOR` environment variable\n\n#### to force a specific supported editor\n\n```bash\nLAUNCH_EDITOR=codium\n```\n\n#### to run a custom launch script\n\n```bash\nLAUNCH_EDITOR=my-editor-launcher.sh\n```\n\n```shell\n# gets called with 3 args: filename, line, column\nfilename=$1\nline=$2\ncolumn=$3\n\n# call your editor with whatever args it expects\nmy-editor -l $line -c $column -f $filename\n```\n\n## UNC paths on Windows\n\nOn Windows, `launch-editor` refuses to open files whose resolved path is a [UNC path](https://learn.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), that is, a path that starts with `\\\\`, such as `\\\\server\\share\\file.js`.\n\nWhen a UNC path points at a remote host, any filesystem operation `launch-editor` performs on it (such as the `fs.existsSync` check used to verify the file before launching the editor) causes Windows to connect to that host over SMB. An attacker who controls the requested file path could point it at a server they control and abuse this to leak the current user's NTLM credentials: Windows automatically attempts NTLM authentication against the remote host, sending the user's NTLM challenge-response, which the attacker can capture for offline cracking or relay to another service (an NTLM relay attack). Because the file path frequently originates from untrusted input (for example, the `file` query parameter handled by `launch-editor-middleware`), `launch-editor` rejects UNC paths up front so it never performs any filesystem operation on them.\n\nWhen a UNC path is rejected, the error callback is invoked with:\n\n\u003e UNC paths are not supported on Windows to avoid security issues.\n\nIf you need to edit a file on a network share, map the share to a drive letter first and pass that path (e.g. `Z:\\file.js`) instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitejs%2Flaunch-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitejs%2Flaunch-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitejs%2Flaunch-editor/lists"}