Godot-based Rust multi-PTY emulator desktop application
1
stars
561
commits
GDScript
primary language
Sep 11, 2026
updated
gPTY - a PTY foundation built on Godot and Rust. Provides a tiling grid for panes (terminal, code, file-tree, etc.), a concept capture engine, and a JSON-RPC/MCP control surface so AI agents and automation tools can spawn panes, inject text, and observe output on terminals without scraping a TUI.
DEC STD 070 via alacritty_terminal: 16/256/true color, scrollback with regex search, wrapped text selection.gpty new-pane, gpty inject, …) + MCP server. AI agents, scripts, and orchestrators drive the workspace over a documented, versioned protocol.gpty-core) GDExtension bridge, was generated using LLMs; and as such, the underlying code may contain unidiomatic patterns and/or bugs.| Component | Choice | Rationale |
|---|---|---|
| PTY library | portable-pty | Cross-platform (Linux /dev/ptmx + Windows ConPTY) with a single API |
| ANSI parsing | vte crate | Fast Rust ANSI state machine |
| Async runtime | tokio | Per-terminal tasks; channel-driven capture state machine |
| I/O threading | Dedicated std::thread per PTY | Predictable blocking reads; bridges to tokio via mpsc |
| Concept capture | Rust regex over parsed LineParser output | Linear-time matching (ReDoS-safe); captures buffer raw bytes for grid-faithful replay |
| Grid rendering | alacritty_terminal | Full DEC STD 070 grid state machine; pass arrays to Godot _draw() |
| Godot bridge | gdext 0.5 | Native GDExtension for Godot 4.7+ |
| Rust edition | 2024 | Requires Rust >= 1.85 |
Standalone binaries (no Godot install required) are published on GitHub Releases for Linux, macOS, and Windows.
| Platform | Package |
|---|---|
| Linux | gpty-v0.5.3-linux-x86_64.tar.gz - extract and run ./gpty |
| macOS | gpty-v0.5.3-macos.zip - unzip, right-click the .app → Open |
| Windows | gpty-v0.5.3-windows-x86_64.zip - unzip and run gpty.exe |
The gpty binary controls a running GUI over JSON-RPC IPC. Build it with cargo build -p gpty (or cargo build --workspace).
Once the GUI is running (launched from Godot or a release binary), the CLI connects over a Unix socket ($XDG_RUNTIME_DIR/gpty.sock on Linux, or GPTY_SOCKET env var):
# Check if the GUI is running
gpty version
# Print the bundled agent skill (for coding agents running inside a pane)
gpty --skill
# Spawn a new terminal pane
gpty new-pane --pane-type terminal
# List all active panes
gpty list-panes
# Send text to a pane (by label, e.g. T1)
gpty inject T1 --text "echo hello"
# Close a pane
gpty kill-pane T1
# Save and load named layouts
gpty layout save my-setup
gpty layout load my-setup
gpty layout list
# Manage the GUI daemon
gpty daemon status
gpty daemon stop
# Generate AI tool manifests (no GUI needed)
gpty schema
gpty schema --format mcp
# Run as MCP server over stdio (no GUI needed)
echo '{"jsonrpc":"2.0","id":1,"method":"initialize"}' | gpty mcp
See gpty --help for all subcommands and flags.
gpty ships an MCP (Model Context Protocol) server so AI agents and coding harnesses can control the workspace. The repo-root mcp.json declares it for auto-discovery:
{"mcpServers": {"gpty": {"command": "gpty", "args": ["mcp"]}}}
gpty mcp over stdio - exposes a tool per CLI subcommand (new-pane, list-panes, kill-pane, focus-pane, inject, pane-read, pane-status, pane-run, pane-wait, broadcast, layout-*, daemon-*, concept-*, version).gpty schema --format mcp prints the MCP tool manifest (JSON Schema, works without a running GUI) for hand-off to agent configurations.Tool schemas are generated from the same clap definitions as the CLI (crates/gpty-cli/src/commands/schema.rs), so they cannot drift from gpty --help.
See ROADMAP.md for the full feature inventory.
See SECURITY.md for the threat model, reporting process, and what gpty does not defend against. Implementation rules - the Concept Engine's ReDoS stance, PTY environment sanitization, IPC hardening, OSC 52 restrictions - live in AGENTS.md.
See CONTRIBUTING.md for setup instructions, build commands, testing, code style, and the pull request process.
See CHANGELOG.md for the complete versioned changes and history.
gPTY is free software, licensed under the GNU General Public License, version 3 or later — see LICENSE for the full text.
LICENSE-EXCEPTIONS.md adds two permissions under section 7 of that license, so the ecosystem side stays permissive:
*.json files shipped with gPTY are Apache-2.0.Copyright (C) 2026 Neil Pathare.
gPTY is distributed in the hope that it will be useful, but absolutely without any warranty and assumes no liability for any usage by end-users; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
561 commits
GDScript
65.2%
Rust
31.2%
Shell
2.2%
Godot-based Rust multi-PTY emulator desktop application
1
stars
561
commits
GDScript
primary language
Sep 11, 2026
updated
gPTY - a PTY foundation built on Godot and Rust. Provides a tiling grid for panes (terminal, code, file-tree, etc.), a concept capture engine, and a JSON-RPC/MCP control surface so AI agents and automation tools can spawn panes, inject text, and observe output on terminals without scraping a TUI.
DEC STD 070 via alacritty_terminal: 16/256/true color, scrollback with regex search, wrapped text selection.gpty new-pane, gpty inject, …) + MCP server. AI agents, scripts, and orchestrators drive the workspace over a documented, versioned protocol.gpty-core) GDExtension bridge, was generated using LLMs; and as such, the underlying code may contain unidiomatic patterns and/or bugs.| Component | Choice | Rationale |
|---|---|---|
| PTY library | portable-pty | Cross-platform (Linux /dev/ptmx + Windows ConPTY) with a single API |
| ANSI parsing | vte crate | Fast Rust ANSI state machine |
| Async runtime | tokio | Per-terminal tasks; channel-driven capture state machine |
| I/O threading | Dedicated std::thread per PTY | Predictable blocking reads; bridges to tokio via mpsc |
| Concept capture | Rust regex over parsed LineParser output | Linear-time matching (ReDoS-safe); captures buffer raw bytes for grid-faithful replay |
| Grid rendering | alacritty_terminal | Full DEC STD 070 grid state machine; pass arrays to Godot _draw() |
| Godot bridge | gdext 0.5 | Native GDExtension for Godot 4.7+ |
| Rust edition | 2024 | Requires Rust >= 1.85 |
Standalone binaries (no Godot install required) are published on GitHub Releases for Linux, macOS, and Windows.
| Platform | Package |
|---|---|
| Linux | gpty-v0.5.3-linux-x86_64.tar.gz - extract and run ./gpty |
| macOS | gpty-v0.5.3-macos.zip - unzip, right-click the .app → Open |
| Windows | gpty-v0.5.3-windows-x86_64.zip - unzip and run gpty.exe |
The gpty binary controls a running GUI over JSON-RPC IPC. Build it with cargo build -p gpty (or cargo build --workspace).
Once the GUI is running (launched from Godot or a release binary), the CLI connects over a Unix socket ($XDG_RUNTIME_DIR/gpty.sock on Linux, or GPTY_SOCKET env var):
# Check if the GUI is running
gpty version
# Print the bundled agent skill (for coding agents running inside a pane)
gpty --skill
# Spawn a new terminal pane
gpty new-pane --pane-type terminal
# List all active panes
gpty list-panes
# Send text to a pane (by label, e.g. T1)
gpty inject T1 --text "echo hello"
# Close a pane
gpty kill-pane T1
# Save and load named layouts
gpty layout save my-setup
gpty layout load my-setup
gpty layout list
# Manage the GUI daemon
gpty daemon status
gpty daemon stop
# Generate AI tool manifests (no GUI needed)
gpty schema
gpty schema --format mcp
# Run as MCP server over stdio (no GUI needed)
echo '{"jsonrpc":"2.0","id":1,"method":"initialize"}' | gpty mcp
See gpty --help for all subcommands and flags.
gpty ships an MCP (Model Context Protocol) server so AI agents and coding harnesses can control the workspace. The repo-root mcp.json declares it for auto-discovery:
{"mcpServers": {"gpty": {"command": "gpty", "args": ["mcp"]}}}
gpty mcp over stdio - exposes a tool per CLI subcommand (new-pane, list-panes, kill-pane, focus-pane, inject, pane-read, pane-status, pane-run, pane-wait, broadcast, layout-*, daemon-*, concept-*, version).gpty schema --format mcp prints the MCP tool manifest (JSON Schema, works without a running GUI) for hand-off to agent configurations.Tool schemas are generated from the same clap definitions as the CLI (crates/gpty-cli/src/commands/schema.rs), so they cannot drift from gpty --help.
See ROADMAP.md for the full feature inventory.
See SECURITY.md for the threat model, reporting process, and what gpty does not defend against. Implementation rules - the Concept Engine's ReDoS stance, PTY environment sanitization, IPC hardening, OSC 52 restrictions - live in AGENTS.md.
See CONTRIBUTING.md for setup instructions, build commands, testing, code style, and the pull request process.
See CHANGELOG.md for the complete versioned changes and history.
gPTY is free software, licensed under the GNU General Public License, version 3 or later — see LICENSE for the full text.
LICENSE-EXCEPTIONS.md adds two permissions under section 7 of that license, so the ecosystem side stays permissive:
*.json files shipped with gPTY are Apache-2.0.Copyright (C) 2026 Neil Pathare.
gPTY is distributed in the hope that it will be useful, but absolutely without any warranty and assumes no liability for any usage by end-users; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
561 commits
GDScript
65.2%
Rust
31.2%
Shell
2.2%