|
| 1 | +# @karinjs/node-pty |
| 2 | + |
| 3 | +A lightweight prebuilt node-pty package, optimized based on [@homebridge/node-pty-prebuilt-multiarch](https://github.com/homebridge/node-pty-prebuilt-multiarch). |
| 4 | + |
| 5 | +English | [简体中文](./README.md) |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- 🚀 Ultra-lightweight: Removed source code, keeping only necessary prebuilt binaries |
| 10 | +- 🇨🇳 China-friendly: Uses npmmirror.com mirror by default |
| 11 | +- 💪 Multi-arch support: Supports major operating systems and CPU architectures |
| 12 | +- 🔧 Ready to use: No compilation needed, supports multiple package managers |
| 13 | + |
| 14 | +> [!WARNING] |
| 15 | +> 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. |
| 16 | +
|
| 17 | +## Installation |
| 18 | + |
| 19 | +Using npm: |
| 20 | + |
| 21 | +```bash |
| 22 | +npm install @karinjs/node-pty |
| 23 | +``` |
| 24 | + |
| 25 | +Using yarn: |
| 26 | + |
| 27 | +```bash |
| 28 | +yarn add @karinjs/node-pty |
| 29 | +``` |
| 30 | + |
| 31 | +Using pnpm: |
| 32 | + |
| 33 | +```bash |
| 34 | +pnpm add @karinjs/node-pty |
| 35 | +``` |
| 36 | + |
| 37 | +Using aliases: |
| 38 | + |
| 39 | +```bash |
| 40 | +npm install node-ptym:@karinjs/node-pty |
| 41 | +# or |
| 42 | +npm install @homebridge/node-pty-prebuilt-multiarch:@karinjs/node-pty |
| 43 | +``` |
| 44 | + |
| 45 | +## Supported Environments |
| 46 | + |
| 47 | +| OS | Architectures | |
| 48 | +| ------------- | ------------------------- | |
| 49 | +| macOS | x64, arm64 | |
| 50 | +| Linux (glibc) | ia32, x64, armv6, aarch64 | |
| 51 | +| Linux (musl) | x64, armv6, aarch64 | |
| 52 | +| Windows | ia32, x64 | |
| 53 | + |
| 54 | +> Note: Only supports Node.js 16+ and Electron 16.0.0+ (excluding Electron 28) |
| 55 | +
|
| 56 | +## Notes |
| 57 | + |
| 58 | +Since this package is distributed in prebuilt form, installation depends on network stability. If you encounter download issues, you can: |
| 59 | + |
| 60 | +1. Use a proxy |
| 61 | +2. Switch to another package manager |
| 62 | +3. Retry installation multiple times |
| 63 | + |
| 64 | +## Version Mapping |
| 65 | + |
| 66 | +| @karinjs/node-pty | @homebridge/node-pty-prebuilt-multiarch | |
| 67 | +| ----------------- | --------------------------------------- | |
| 68 | +| 1.0.1 | 0.11.14 | |
| 69 | + |
| 70 | +## Upstream Projects |
| 71 | + |
| 72 | +This project is based on these excellent open source projects: |
| 73 | + |
| 74 | +- [microsoft/node-pty](https://github.com/microsoft/node-pty) - Original node-pty project |
| 75 | +- [homebridge/node-pty-prebuilt-multiarch](https://github.com/homebridge/node-pty-prebuilt-multiarch) - Provides multi-architecture prebuilt support |
| 76 | + |
| 77 | +## License |
| 78 | + |
| 79 | +This project is open-sourced under the MIT License. Thanks to the contributions from: |
| 80 | + |
| 81 | +- Copyright (c) 2012-2015, Christopher Jeffrey (MIT License) |
| 82 | +- Copyright (c) 2016, Daniel Imms (MIT License) |
| 83 | +- Copyright (c) 2018, Microsoft Corporation (MIT License) |
| 84 | +- Copyright (c) 2018, David Wilson (MIT License) |
| 85 | +- Copyright (c) 2018, oznu (MIT License) |
| 86 | +- Copyright (c) 2023, Homebridge (MIT License) |
0 commit comments