{"id":20906032,"url":"https://github.com/telanflow/node-pty-prebuilt","last_synced_at":"2026-04-30T05:33:51.760Z","repository":{"id":133912528,"uuid":"422252606","full_name":"telanflow/node-pty-prebuilt","owner":"telanflow","description":"A fork of Microsoft's node-pty that offers prebuilt binaries built with Github Actions","archived":false,"fork":false,"pushed_at":"2021-10-28T15:47:38.000Z","size":382,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-28T22:58:26.730Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/telanflow.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}},"created_at":"2021-10-28T15:14:07.000Z","updated_at":"2021-10-28T15:47:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"d67ea10b-7960-49af-81c8-f311c3a08cdb","html_url":"https://github.com/telanflow/node-pty-prebuilt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/telanflow/node-pty-prebuilt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telanflow%2Fnode-pty-prebuilt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telanflow%2Fnode-pty-prebuilt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telanflow%2Fnode-pty-prebuilt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telanflow%2Fnode-pty-prebuilt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telanflow","download_url":"https://codeload.github.com/telanflow/node-pty-prebuilt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telanflow%2Fnode-pty-prebuilt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32456165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":"2024-11-18T13:28:42.533Z","updated_at":"2026-04-30T05:33:51.735Z","avatar_url":"https://github.com/telanflow.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-pty\n\n[![Build Status](https://dev.azure.com/vscode/node-pty/_apis/build/status/Microsoft.node-pty)](https://dev.azure.com/vscode/node-pty/_build/latest?definitionId=11)\n\n`forkpty(3)` bindings for node.js. This allows you to fork processes with pseudoterminal file descriptors. It returns a terminal object which allows reads and writes.\n\nThis is useful for:\n\n- Writing a terminal emulator (eg. via [xterm.js](https://github.com/sourcelair/xterm.js)).\n- Getting certain programs to *think* you're a terminal, such as when you need a program to send you control sequences.\n\n`node-pty` supports Linux, macOS and Windows. Windows support is possible by utilizing the [Windows conpty API](https://blogs.msdn.microsoft.com/commandline/2018/08/02/windows-command-line-introducing-the-windows-pseudo-console-conpty/) on Windows 1809+ and the [winpty](https://github.com/rprichard/winpty) library in older version.\n\n## API\n\nThe full API for node-pty is contained within the [TypeScript declaration file](https://github.com/microsoft/node-pty/blob/main/typings/node-pty.d.ts), use the branch/tag picker in GitHub (`w`) to navigate to the correct version of the API.\n\n## Example Usage\n\n```js\nvar os = require('os');\nvar pty = require('node-pty');\n\nvar shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';\n\nvar ptyProcess = pty.spawn(shell, [], {\n  name: 'xterm-color',\n  cols: 80,\n  rows: 30,\n  cwd: process.env.HOME,\n  env: process.env\n});\n\nptyProcess.on('data', function(data) {\n  process.stdout.write(data);\n});\n\nptyProcess.write('ls\\r');\nptyProcess.resize(100, 40);\nptyProcess.write('ls\\r');\n```\n\n## Real-world Uses\n\n`node-pty` powers many different terminal emulators, including:\n\n- [Microsoft Visual Studio Code](https://code.visualstudio.com)\n- [Hyper](https://hyper.is/)\n- [Upterm](https://github.com/railsware/upterm)\n- [Script Runner](https://github.com/ioquatix/script-runner) for Atom.\n- [Theia](https://github.com/theia-ide/theia)\n- [FreeMAN](https://github.com/matthew-matvei/freeman) file manager\n- [terminus](https://atom.io/packages/terminus) - An Atom plugin for providing terminals inside your Atom workspace.\n- [x-terminal](https://atom.io/packages/x-terminal) - Also an Atom plugin that provides terminals inside your Atom workspace.\n- [Termination](https://atom.io/packages/termination) - Also an Atom plugin that provides terminals inside your Atom workspace.\n- [atom-xterm](https://atom.io/packages/atom-xterm) - Also an Atom plugin that provides terminals inside your Atom workspace.\n- [electerm](https://github.com/electerm/electerm) Terminal/SSH/SFTP client(Linux, macOS, Windows).\n- [Extraterm](http://extraterm.org/)\n- [Wetty](https://github.com/krishnasrinivas/wetty) Browser based Terminal over HTTP and HTTPS\n- [nomad](https://github.com/lukebarnard1/nomad-term)\n- [DockerStacks](https://github.com/sfx101/docker-stacks) Local LAMP/LEMP stack using Docker\n- [TeleType](https://github.com/akshaykmr/TeleType): cli tool that allows you to share your terminal online conveniently. Show off mad cli-fu, help a colleague, teach, or troubleshoot.\n- [mesos-term](https://github.com/criteo/mesos-term): A web terminal for Apache Mesos. It allows to execute commands within containers.\n- [Commas](https://github.com/CyanSalt/commas): A hackable terminal and command runner.\n- [ENiGMA½ BBS Software](https://github.com/NuSkooler/enigma-bbs): A modern BBS software with a nostalgic flair!\n- [Tinkerun](https://github.com/tinkerun/tinkerun): A new way of running Tinker.\n- [Tess](https://github.com/SquitchYT/Tess/): Hackable, simple and rapid terminal for the new era of technology 👍\n- [NxShell](https://nxshell.github.io/): An easy to use new terminal for Windows/Linux/MacOS platform.\n\nDo you use node-pty in your application as well? Please open a [Pull Request](https://github.com/Tyriar/node-pty/pulls) to include it here. We would love to have it in our list.\n\n## Building\n\n```bash\n# Install dependencies and build C++\nnpm install\n# Compile TypeScript -\u003e JavaScript\nnpm run build\n```\n\n## Dependencies\n\nNode.JS 12+ or Electron 8+ is required to use `node-pty`.\n\n### Linux (apt)\n\n```sh\nsudo apt install -y make python build-essential\n```\n\n### macOS\n\nXcode is needed to compile the sources, this can be installed from the App Store.\n\n### Windows\n\n`npm install` requires some tools to be present in the system like Python and C++ compiler. Windows users can easily install them by running the following command in PowerShell as administrator. For more information see https://github.com/felixrieseberg/windows-build-tools:\n\n```sh\nnpm install --global --production windows-build-tools\n```\n\nThe following are also needed:\n\n- [Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) - only the \"Desktop C++ Apps\" components are needed to be installed\n\n## Debugging\n\n[The wiki](https://github.com/Microsoft/node-pty/wiki/Debugging) contains instructions for debugging node-pty.\n\n## Security\n\nAll processes launched from node-pty will launch at the same permission level of the parent process. Take care particularly when using node-pty inside a server that's accessible on the internet. We recommend launching the pty inside a container to protect your host machine.\n\n## Thread Safety\n\nNote that node-pty is not thread safe so running it across multiple worker threads in node.js could cause issues.\n\n## Flow Control\n\nAutomatic flow control can be enabled by either providing `handleFlowControl = true` in the constructor options or setting it later on:\n\n```js\nconst PAUSE = '\\x13';   // XOFF\nconst RESUME = '\\x11';  // XON\n\nconst ptyProcess = pty.spawn(shell, [], {handleFlowControl: true});\n\n// flow control in action\nptyProcess.write(PAUSE);  // pty will block and pause the child program\n...\nptyProcess.write(RESUME); // pty will enter flow mode and resume the child program\n\n// temporarily disable/re-enable flow control\nptyProcess.handleFlowControl = false;\n...\nptyProcess.handleFlowControl = true;\n```\n\nBy default `PAUSE` and `RESUME` are XON/XOFF control codes (as shown above). To avoid conflicts in environments that use these control codes for different purposes the messages can be customized as `flowControlPause: string` and `flowControlResume: string` in the constructor options. `PAUSE` and `RESUME` are not passed to the underlying pseudoterminal if flow control is enabled.\n\n## Troubleshooting\n\n### Powershell gives error 8009001d\n\n\u003e Internal Windows PowerShell error.  Loading managed Windows PowerShell failed with error 8009001d.\n\nThis happens when PowerShell is launched with no `SystemRoot` environment variable present.\n\n### ConnectNamedPipe failed: Windows error 232\n\nThis error can occur due to anti-virus software intercepting winpty from creating a pty. To workaround this you can exclude this file from your anti-virus scanning `node-pty\\build\\Release\\winpty-agent.exe`\n\n## pty.js\n\nThis project is forked from [chjj/pty.js](https://github.com/chjj/pty.js) with the primary goals being to provide better support for later Node.JS versions and Windows.\n\n## License\n\nCopyright (c) 2012-2015, Christopher Jeffrey (MIT License).\u003cbr\u003e\nCopyright (c) 2016, Daniel Imms (MIT License).\u003cbr\u003e\nCopyright (c) 2018, Microsoft Corporation (MIT License).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelanflow%2Fnode-pty-prebuilt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelanflow%2Fnode-pty-prebuilt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelanflow%2Fnode-pty-prebuilt/lists"}