Reference
ptywright exposes an early CLI, Rust library, JSON-RPC automation protocol, trusted Lua plugin runtime, and shell completion generation.
Crate metadata
- Crate:
ptywright - Binary:
ptywright - Current version:
0.1.0 - License: MIT
- Repository: https://github.com/utensils/ptywright
- Docs site: https://utensils.io/ptywright/
Current public API families
TargetandTerminalSizefor spawn configuration.SessionandSessionConfigfor PTY-backed process lifecycle.Terminal,ScreenSnapshot, andCursorStatefor rendered terminal observation.ActionandKeyfor deterministic input.MatcherandMatchResultfor event-driven waits.TranscriptandTranscriptConfigfor bounded output retention.RpcServerandserve_ndjsonfor JSON-RPC automation.Extension,LuaExtension,ExtensionHandle,ExtensionStateSnapshot, andClassifyContextfor the generic plugin-backed automation layer that drives Claude Code and any future built-in TUI plugin.LuaPlugin,PluginManifest,DefaultTarget,PluginRuntime,PluginPermission,builtin_manifests, and host capability types for trusted extension planning.Pathsandexpand_tildefor the~/.ptywright/runtime directory layout.Config,LoggingConfig, andLogFormatfor on-disk configuration.init_for_run,init_for_serve_stdio,init_for_serve_socket,init_for_oneshot, andLogGuardfor the structured-logging stack with daily rotation, retention, and per-record redaction.
See the dedicated CLI, library, JSON-RPC, plugin reference, and Claude Code guide pages for details.