A high-performance PTY (Pseudo-Terminal) terminal emulator for Godot 4.2+, implemented as a GDExtension in C++.
- Native PTY support (forkpty) for Linux and macOS.
- Integrated terminal emulator widget (
GodotTerminal). - ANSI escape sequence support (basic).
- Scrollback history.
- Godot 4.2 or later.
- SCons (for building the GDExtension).
- A C++17 compiler (g++, clang++, or MSVC).
- Linux only:
libutil(usually part of glibc, but may needlibutil-devon some distros).
To build the GDExtension binaries, run the provided build.sh script:
./build.shThis script will:
- Clone the
godot-cpprepository (if missing) ataddons/godot_pty/godot-cpp. - Build
godot-cppfor your platform. - Build the
GodotPTYGDExtension.
The resulting binaries will be placed in addons/godot_pty/bin/.
If you prefer to run SCons manually:
cd addons/godot_pty
scons platform=linux target=template_debug- Build the GDExtension (see above).
- Open the project in Godot 4.2+.
- Run the main scene (
scenes/terminal.tscn).
addons/godot_pty/core/: C++ source code for the PTY node.addons/godot_pty/ui/: GDScript and Scene files for the terminal widget.addons/godot_pty/godot_pty.gdextension: GDExtension configuration file.scenes/: Demo/Main scenes.