@mmmbuto/node-pty-android-arm64
v1.1.2
Published
Android/Termux-only fork of node-pty for ARM64 (bionic)
Maintainers
Readme
node-pty-android-arm64
The npm package is a scriptless Android ARM64 prebuilt: installation does not
run install or postinstall hooks and does not compile on the device. The
tracked prebuilds/android-arm64/pty.node is loaded directly by the standard
node-pty loader. Its SHA-256 is
660a3025230f6035b7b8c000e8cca6ca3992bedaa05f7b165e7c3a5f1ae8ec8a.
Android/Termux-only fork of node-pty targeting ARM64 (bionic). It provides the same API as the upstream node-pty package but is focused on working reliably under Termux.
Scope
- Platform:
android - CPU:
arm64 - Intended environment: Termux on Android
If you need Linux/macOS/Windows support, use the upstream project: https://github.com/microsoft/node-pty
Install
npm install node-pty-android-arm64If you want to keep require('node-pty') in your code, you can use an npm alias:
npm install node-pty@npm:node-pty-android-arm64Build on Termux
Prerequisites:
pkg install -y nodejs python make clang pkg-config gitBuild and install:
npm install
npm run buildNotes:
- If
prebuilds/android-arm64exists, it will be used. - When building from source on Termux,
android_ndk_pathis derived fromANDROID_NDK_HOME/ANDROID_NDK_ROOTor falls back to$PREFIX.
Usage
import * as os from 'node:os';
import * as pty from 'node-pty';
const shell = os.platform() === 'win32' ? 'powershell.exe' : 'bash';
const ptyProcess = pty.spawn(shell, [], {
name: 'xterm-color',
cols: 80,
rows: 30,
cwd: process.env.HOME,
env: process.env
});
ptyProcess.onData((data) => {
process.stdout.write(data);
});
ptyProcess.write('ls\r');Credits
Based on the original node-pty project by Microsoft and contributors.
License
Original node-pty work by Microsoft, contributors, and prior maintainers (as credited in the project and license).
MIT License (see LICENSE).
Termux-port maintenance by Davide A. Guglielmi
Made in Italy 🇮🇹
Fork maintainer
This fork is maintained by DioNanos for Termux/Android use.
- Fork issues (build, packaging, mobile-specific): [email protected]
- Fork security disclosures: [email protected]
Upstream-relevant issues should be reported on the upstream project.
