{"id":26120553,"url":"https://github.com/karinjs/node-pty","last_synced_at":"2025-08-26T22:06:22.410Z","repository":{"id":281568517,"uuid":"945689760","full_name":"KarinJS/node-pty","owner":"KarinJS","description":"node-pty without compilation | 无需编译的node-pty","archived":false,"fork":false,"pushed_at":"2025-08-24T13:46:07.000Z","size":18131,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-24T18:00:12.039Z","etag":null,"topics":["electron","node-pty","nodejs","pty","terminal"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KarinJS.png","metadata":{"files":{"readme":"README.en.md","changelog":"CHANGELOG.md","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}},"created_at":"2025-03-10T01:04:19.000Z","updated_at":"2025-08-24T13:46:03.000Z","dependencies_parsed_at":"2025-03-10T02:32:10.229Z","dependency_job_id":"be2b89ce-dc31-431e-8edb-a9c518d3ad2d","html_url":"https://github.com/KarinJS/node-pty","commit_stats":null,"previous_names":["karinjs/node-pty","karinjs/-karinjs-pty"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/KarinJS/node-pty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fnode-pty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fnode-pty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fnode-pty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fnode-pty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KarinJS","download_url":"https://codeload.github.com/KarinJS/node-pty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KarinJS%2Fnode-pty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272260608,"owners_count":24902391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"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":["electron","node-pty","nodejs","pty","terminal"],"created_at":"2025-03-10T13:43:06.885Z","updated_at":"2025-08-26T22:06:22.402Z","avatar_url":"https://github.com/KarinJS.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @karinjs/node-pty\n\nA lightweight prebuilt node-pty package, optimized based on [@homebridge/node-pty-prebuilt-multiarch](https://github.com/homebridge/node-pty-prebuilt-multiarch).\n\nEnglish | [简体中文](./README.md)\n\n## Features\n\n- 🚀 Ultra-lightweight: Removed source code, keeping only necessary prebuilt binaries\n- 🇨🇳 China-friendly: Uses npmmirror.com mirror by default\n- 💪 Multi-arch support: Supports major operating systems and CPU architectures\n- 🔧 Ready to use: No compilation needed, supports multiple package managers\n\n\u003e [!WARNING]\n\u003e Currently only tested in Windows Node.js environment. Compatibility with other environments (Linux, macOS, etc.) needs to be verified by users. Feedback is welcome if you encounter any issues.\n\n## Installation\n\nUsing npm:\n\n```bash\nnpm install @karinjs/node-pty\n```\n\nUsing yarn:\n\n```bash\nyarn add @karinjs/node-pty\n```\n\nUsing pnpm:\n\n```bash\npnpm add @karinjs/node-pty\n```\n\nUsing aliases:\n\n```bash\nnpm install node-ptym:@karinjs/node-pty\n# or\nnpm install @homebridge/node-pty-prebuilt-multiarch:@karinjs/node-pty\n```\n\n## Supported Environments\n\n| OS            | Architectures             |\n| ------------- | ------------------------- |\n| macOS         | x64, arm64                |\n| Linux (glibc) | ia32, x64, armv6, aarch64 |\n| Linux (musl)  | x64, armv6, aarch64       |\n| Windows       | ia32, x64                 |\n\n\u003e Note: Only supports Node.js 16+ and Electron 16.0.0+ (excluding Electron 28)\n\n## Notes\n\nSince this package is distributed in prebuilt form, installation depends on network stability. If you encounter download issues, you can:\n\n1. Use a proxy\n2. Switch to another package manager\n3. Retry installation multiple times\n\n## Version Mapping\n\n| @karinjs/node-pty | @homebridge/node-pty-prebuilt-multiarch |\n| ----------------- | --------------------------------------- |\n| 1.0.2             | 0.11.14                                 |\n\n## Upstream Projects\n\nThis project is based on these excellent open source projects:\n\n- [microsoft/node-pty](https://github.com/microsoft/node-pty) - Original node-pty project\n- [homebridge/node-pty-prebuilt-multiarch](https://github.com/homebridge/node-pty-prebuilt-multiarch) - Provides multi-architecture prebuilt support\n\n## License\n\nThis project is open-sourced under the MIT License. Thanks to the contributions from:\n\n- Copyright (c) 2012-2015, Christopher Jeffrey (MIT License)\n- Copyright (c) 2016, Daniel Imms (MIT License)\n- Copyright (c) 2018, Microsoft Corporation (MIT License)\n- Copyright (c) 2018, David Wilson (MIT License)\n- Copyright (c) 2018, oznu (MIT License)\n- Copyright (c) 2023, Homebridge (MIT License)\n\n## Usage Example\n\n```typescript\nimport * as os from \"node:os\";\nimport * as pty from \"@karinjs/node-pty\";\n\nasync function run() {\n  const shell = os.platform() === \"win32\" ? \"powershell.exe\" : \"bash\";\n  const 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\n  ptyProcess.onData((data) =\u003e {\n    process.stdout.write(data);\n  });\n\n  ptyProcess.write(\"ls\\r\");\n  ptyProcess.resize(100, 40);\n  ptyProcess.write(\"ls\\r\");\n}\n\nrun();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarinjs%2Fnode-pty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarinjs%2Fnode-pty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarinjs%2Fnode-pty/lists"}