gPTY

io.github.godot-pty由 GitHub 账号 godot-pty 发布v0.8.0更新于 Nov 7, 2026

Spawn panes, inject input and read output in a tiling terminal workspace

概览

AI 生成的概览

让助手操控本地平铺终端工作区:新建窗格、注入输入、读取输出、运行命令并检索 Markdown 知识库。

可以做什么
  • 新建、列出、聚焦和关闭终端窗格,保存与加载命名布局。
  • 向窗格注入文本,读取屏幕与回滚内容,查看窗格状态。
  • 在新窗格中运行命令并等待输出匹配,或向带标签的窗格广播。
  • 搜索并读取 Markdown wiki 库,并对库内结果加权。
  • 管理 GUI 守护进程与概念触发器,查询版本信息。
适用场景
适合需要助手在用户桌面的真实 shell 会话中工作的情况,例如运行构建或测试、观察输出、协调多个终端,而不必抓取终端界面。也适合读取本地 Markdown 知识库。
运行要求
需本地安装 gpty CLI(cargo install gpty 需要 Rust 工具链和 C 编译器),MCP 客户端通过 stdio 启动 gpty mcp。多数命令需要已运行的 gPTY GUI,通过 Unix socket(GPTY_SOCKET 或默认运行时路径)连接。仅限桌面端;未声明身份验证。
安装前请注意
工具会向 shell 注入输入并执行命令,助手因此可运行任意命令并改动机器上的文件。窗格可能被关闭,布局可能被覆盖。插件以用户身份执行操作。二进制未做代码签名,运行前应校验发布校验和与来源证明。项目仍在活跃开发且大量由 LLM 生成,可能存在缺陷。

安装

在 SourceWeft 中

  1. 打开 控制台中的 gPTY,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

gPTY - a desktop workspace built on Rust and Godot. It provides a tiling grid for panes (terminals, code viewers, file trees, wikis, media, and more), 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. Every pane can be driven from a shell, a script, or an agent over one public API. It is a side project in active development and a vast majority of this codebase, including most of the Godot UI layout and the Rust (gpty-core) GDExtension bridge, was generated using various LLMs under human review; and as such, the underlying code may contain unidiomatic patterns and/or bugs. It does not follow the core UNIX philosophy very well, as in, it does aim to do several things; though it does also intend to do them all well.

[A script drives gPTY: a concept routes cat into a viewer pane, pane-run opens a build pane, pane-wait blocks on its output, and cli_view streams git log]

Features

Panes

Watch: the pane grid split and reflow

[Two more shells split in beside the first, then one closes and the grid reflows]

  • Tiling grid - split, resize, and rearrange independent shell sessions; save and reload named layouts, workspaces (tab sets), and profiles.
  • Emulation - alacritty_terminal grid with 16/256/true color, scrollback with regex search, and wrapped text selection.
  • Memory - scrollback, settings, and workspaces restore on restart, with full-text search across each pane's history.
  • File Tree - Native Godot OS file tree browser.
  • Code Viewer - Text and Markdown rendered in a pane.
  • Wiki - a vault of plain Markdown notes with full-text search, a live-preview editor, [[wikilinks]], backlinks, and a link graph, reopened where you left off. The shipped Knowledge Base profile opens the bundled wiki inside a release.
  • Media - play local audio and video in a pane through a pinned, minimal FFmpeg backend (v0.7).
  • cli_view - stream any command's output into a pane, so a plugin can add UI without a Godot SDK.
  • Interface - one design system across every pane, overlay and dialog: a dark theme and a light theme that follows the desktop, a UI scale, keyboard rings on the pane chrome, the Wiki pane and the vault graph, and accessible names for screen readers (v0.8).
Watch: the wiki vault, its link graph and a CLI search

[The wiki pane, the link graph, and a vault search over the same notes]

Watch: audio and video in a pane

[A video clip playing in a media pane beside a terminal]

Watch: a command streamed into its own pane

[Two cli_view panes streaming git log and git status]

Agents & Automation

Watch: tagged panes, one broadcast and agent state badges

[Two tagged panes run the same broadcast, then declare working and failed]

Watch: a concept routing output into the adjacent pane

[A concept routing git log output into a code viewer]

  • One API, three doors - the same operations are available as a JSON-RPC socket, the gpty CLI, and an MCP server: spawn panes, inject input, read output, run a command and wait for a pattern, broadcast to tagged panes. The server is listed in the official MCP registry as io.github.godot-pty/gpty.
  • Agent state badges - an agent declares working or needs attention from its own pane and the tab shows it. Display only.
  • Observability panes - Reasoning passively shows documented agent lifecycle events (OMP today, adapter-neutral vocabulary); Inspector is a private, tool-free Q&A session. gPTY never orchestrates agent state.
  • Concepts - regex triggers on terminal output capture the reply and route it into an adjacent pane. Write your own in Settings, by hand or in the visual graph editor. Concepts display only; they never type into a shell.

Limited Extensibility

  • Plugins - manifest-based, reviewed in the GUI before install, with a public registry.

Status

ComponentChoiceRationale
PTY libraryportable-ptyCross-platform (Linux /dev/ptmx + Windows ConPTY) with a single API
ANSI parsingvte crateFast Rust ANSI state machine
Async runtimetokioPer-terminal tasks; channel-driven capture state machine
I/O threadingDedicated std::thread per PTYPredictable blocking reads; bridges to tokio via mpsc
Concept captureRust regex over parsed LineParser outputLinear-time matching (ReDoS-safe); captures buffer raw bytes for grid-faithful replay
Grid renderingalacritty_terminalFull DEC STD 070 grid state machine; pass arrays to Godot _draw()
Godot bridgegdext 0.5Native GDExtension for Godot 4.7+
Rust edition2024Requires Rust >= 1.85

Installation & Usage

Standalone binaries (no Godot install required) are published on GitHub Releases for Linux, macOS, and Windows.

PlatformPackage
Linuxgpty-v<version>-linux-x86_64.tar.gz - extract; ./gpty-gui.sh starts the GUI, ./gpty is the CLI
macOSgpty-v<version>-macos.zip - unzip, right-click the .app → Open; gpty beside it is the CLI
Windowsgpty-v<version>-windows-x86_64.zip - unzip; gpty-gui.exe starts the GUI, gpty.exe is the CLI

Every release also bundles the gPTY knowledge base; the Knowledge Base profile in the sidebar opens the bundled wiki from your user data.

In the file names, <version> is the release tag you downloaded (for example v0.7.0).

Verifying releases

Each release publishes a SHA256SUMS listing every asset. Check the file you downloaded before running it:

bash
sha256sum -c SHA256SUMS            # Linuxshasum -a 256 -c SHA256SUMS        # macOScertutil -hashfile <asset> SHA256  # Windows

Checksums catch a corrupted or tampered download in transit. Each asset also carries a build-provenance attestation binding it to the workflow run that built it:

bash
gh attestation verify <asset> --repo godot-pty/gpty

The binaries are not code-signed (see SECURITY.md).

CLI

The gpty binary controls a running GUI over JSON-RPC IPC, and every release bundle ships it next to the GUI. It is also on crates.io - cargo install gpty puts the same binary on PATH (a Rust toolchain and a C compiler are required, for its bundled SQLite), and that copy is what an MCP client launches for gpty mcp. The CLI starts one on demand only for commands a fresh workspace can satisfy - new-pane and layout load - while gpty daemon start starts one explicitly and --no-daemon never starts one. Every other command needs a workspace that already exists, so it fails with no gpty GUI is running (start one with \gpty daemon start`) instead of opening a window it cannot use. Building from source (cargo build -p gpty, or cargo build --workspace) is only needed when working on the CLI itself; if you install it that way, **reinstall it after a version bump** (cargo install --path crates/gpty-cli --force). A stale gptyearlier onPATH` shadows the release's CLI and fails opaquely (a subcommand it lacks dies in clap before any IPC), which is why the CLI warns once, on stderr, when it sees that the running GUI's version or IPC protocol differs from its own - the warning names both sides, but the reinstall is the fix.

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):

bash
# Check if the GUI is running (exit 1 when it is not)gpty daemon status
# Print the bundled agent skill (for coding agents running inside a pane)gpty --skill
# Declare this pane's agent state, from inside the pane (display only)gpty state working
# Spawn a new terminal panegpty new-pane --pane-type terminal
# List all active panesgpty list-panes
# Target a pane by id (what list-panes reports) or by a label that is unique# across workspaces; a label two workspaces share is refused, not guessedgpty inject T1 --text "echo hello"
# Read a pane's screen and scrollback; run a command in a new pane and wait for its outputgpty pane-read T1 --lines 200gpty pane-run --command "cargo test"gpty pane-wait T1 --pattern "tests passed" --timeout-ms 30000
# Search and read a wiki vaultgpty vault search <vault> <pattern>gpty vault read <vault> <path>
# Close a panegpty kill-pane T1
# Save and load named layoutsgpty layout save my-setupgpty layout load my-setupgpty layout list
# Install a plugin (reviewed in the GUI - its actions run as you)gpty plugin install godot-pty/gpty-ompgpty plugin list
# Manage the GUI daemongpty daemon startgpty daemon statusgpty daemon stop
# Generate AI tool manifests (no GUI needed)gpty schemagpty 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.

MCP integration

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:

json
{"mcpServers": {"gpty": {"command": "gpty", "args": ["mcp"]}}}
  • Direct: run 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, vault-search, vault-read, vault-weight, layout-*, daemon-*, concept-*, version).
  • Manifest: 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.


Roadmap

See ROADMAP.md for what is released, in progress, and planned, one page per release chain.


Security

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 the security rules.


Contributing

See CONTRIBUTING.md for setup instructions, build commands, testing, code style, and the pull request process. Project roles, access and succession are in MAINTAINERS.md and GOVERNANCE.md. Participation is covered by CODE_OF_CONDUCT.md; where to ask for help is in SUPPORT.md.


Changelog

See CHANGELOG.md for the complete versioned changes and history.


License

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:

  • Plugins, extensions, and adapters are not required to be GPLv3. Anything that works with gPTY over its CLI, JSON-RPC, MCP, or event interfaces - including native pane types - may be licensed under Apache-2.0, MIT, or any other terms you choose, and shipped alongside gPTY without obligation.
  • Configuration and data files carry no copyleft. Profiles, workspaces, layouts, concepts, and settings are yours to license however you like; the default *.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.

来源:README.md,提交 fccb971

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

4
  1. v0.8.0最新Nov 7, 2026
  2. v0.7.2Nov 3, 2026
  3. v0.7.1Nov 1, 2026
  4. v0.7.0Oct 26, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分